Skip to content

chore: add playwright fixtures package with initial configuration and …#2050

Merged
PupilTong merged 2 commits intolynx-family:mainfrom
PupilTong:p/hw/split-web-e2e-fixtures
Dec 25, 2025
Merged

chore: add playwright fixtures package with initial configuration and …#2050
PupilTong merged 2 commits intolynx-family:mainfrom
PupilTong:p/hw/split-web-e2e-fixtures

Conversation

@PupilTong
Copy link
Copy Markdown
Collaborator

@PupilTong PupilTong commented Dec 24, 2025

…utilities

Summary by CodeRabbit

  • New Features

    • Added a new internal Playwright fixtures package to provide shared test utilities and configuration.
  • Chores

    • Centralized Playwright testing configuration and utilities into the new fixtures package for more consistent, maintainable test suites.
    • Updated web-platform tests to consume the shared fixtures/configuration.

✏️ Tip: You can customize this high-level summary in your review settings.

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).
  • Changeset added, and when a BREAKING CHANGE occurs, it needs to be clearly marked (or not required).

@PupilTong PupilTong self-assigned this Dec 24, 2025
@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Dec 24, 2025

⚠️ No Changeset found

Latest commit: a4e5510

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Dec 24, 2025

📝 Walkthrough

Walkthrough

A new @lynx-js/playwright-fixtures package is created under packages/web-platform/playwright-fixtures/ to consolidate Playwright test configuration, coverage utilities, and shared test helpers. Web-tests now imports from this centralized package instead of maintaining local fixtures. The change establishes a TypeScript composite project structure with common configuration exported for reuse across test suites.

Changes

Cohort / File(s) Summary
New Playwright Fixtures Package Setup
packages/web-platform/playwright-fixtures/package.json, packages/web-platform/playwright-fixtures/tsconfig.json, packages/web-platform/playwright-fixtures/src/index.ts
Package configuration for @lynx-js/playwright-fixtures as private ESM module; TypeScript composite project config; central entry point re-exporting coverage-fixture, utils, and playwright.common.
Playwright Configuration Extraction
packages/web-platform/playwright-fixtures/src/playwright.common.ts
New shared Playwright config object with global settings, project presets (webkit, chromium, firefox), web server setup, and worker limit calculation based on CI status and CPU count.
Coverage and Utility Modules
packages/web-platform/playwright-fixtures/src/coverage-fixture.ts, packages/web-platform/playwright-fixtures/src/utils.ts
Coverage fixture with updated path resolution logic for main.js; utils with removed speed default (from 300) in swipe function. Caution: Speed parameter now requires explicit handling.
Project Structure Updates
packages/web-platform/tsconfig.json, packages/web-platform/web-tests/package.json, packages/web-platform/web-tests/playwright.config.ts
TypeScript project reference added for playwright-fixtures; new devDependency on @lynx-js/playwright-fixtures; playwright.config.ts refactored to import and spread playwrightConfigCommon, removing inline configuration.
Test File Import Migration
packages/web-platform/web-tests/tests/fp-only.spec.ts, packages/web-platform/web-tests/tests/main-thread-apis.test.ts, packages/web-platform/web-tests/tests/middleware.spec.ts, packages/web-platform/web-tests/tests/performance.test.ts, packages/web-platform/web-tests/tests/react.spec.ts, packages/web-platform/web-tests/tests/web-core.test.ts, packages/web-platform/web-tests/tests/web-elements.spec.ts
Updated imports to source test, expect, swipe, dragAndHold, and coverage fixtures from @lynx-js/playwright-fixtures instead of local modules; middleware.spec.ts additionally removed diffScreenShot helper and LynxView import.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested labels

platform:Web

Suggested reviewers

  • colinaaa
  • Sherry-hue

Poem

🐰 A fixtures package hops into view,
Consolidating Playwright tests, tried and true.
Coverage and config now shared and bright,
Tests align harmoniously—what a delight!

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title is partially related to the changeset; it describes creating a new Playwright fixtures package but omits crucial details about extracting/refactoring existing configuration and consolidating utilities from multiple test files.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@PupilTong PupilTong changed the title feat: add playwright fixtures package with initial configuration and … chore: add playwright fixtures package with initial configuration and … Dec 24, 2025
@codecov
Copy link
Copy Markdown

codecov bot commented Dec 24, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
packages/web-platform/web-tests/tests/performance.test.ts (1)

121-121: isCI ?? test.describe.configure(...) never actually configures retries

isCI is always a boolean (!!process.env['CI']), so the nullish-coalescing expression isCI ?? test.describe.configure({ retries: 8 }); will never evaluate the right-hand side. If the goal is to increase retries when not in CI, this should be written as an actual conditional.

-  isCI ?? test.describe.configure({ retries: 8 });
+  if (!isCI) {
+    test.describe.configure({ retries: 8 });
+  }
🧹 Nitpick comments (1)
packages/web-platform/playwright-fixtures/src/utils.ts (1)

8-19: swipe ignores the speed option — consider tightening the API

options still exposes speed?: number, but the implementation now destructures only { x, y, yDistance, xDistance, steps = 10 }, so speed is effectively ignored.

If this is intentional, consider either:

  • Dropping speed from the options type, or
  • Leaving it but documenting it as deprecated / no-op, to avoid confusing future callers.
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between abd5960 and 4df43c4.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (16)
  • packages/web-platform/playwright-fixtures/package.json
  • packages/web-platform/playwright-fixtures/src/coverage-fixture.ts
  • packages/web-platform/playwright-fixtures/src/index.ts
  • packages/web-platform/playwright-fixtures/src/playwright.common.ts
  • packages/web-platform/playwright-fixtures/src/utils.ts
  • packages/web-platform/playwright-fixtures/tsconfig.json
  • packages/web-platform/tsconfig.json
  • packages/web-platform/web-tests/package.json
  • packages/web-platform/web-tests/playwright.config.ts
  • packages/web-platform/web-tests/tests/fp-only.spec.ts
  • packages/web-platform/web-tests/tests/main-thread-apis.test.ts
  • packages/web-platform/web-tests/tests/middleware.spec.ts
  • packages/web-platform/web-tests/tests/performance.test.ts
  • packages/web-platform/web-tests/tests/react.spec.ts
  • packages/web-platform/web-tests/tests/web-core.test.ts
  • packages/web-platform/web-tests/tests/web-elements.spec.ts
🧰 Additional context used
🧠 Learnings (23)
📓 Common learnings
Learnt from: colinaaa
Repo: lynx-family/lynx-stack PR: 1453
File: vitest.config.ts:49-61
Timestamp: 2025-08-06T13:28:57.182Z
Learning: In the lynx-family/lynx-stack repository, the file `packages/react/testing-library/src/vitest.config.js` is source code for the testing library that gets exported for users, not a test configuration that should be included in the main vitest projects array.
Learnt from: upupming
Repo: lynx-family/lynx-stack PR: 1305
File: packages/react/testing-library/src/plugins/vitest.ts:4-6
Timestamp: 2025-08-11T05:59:28.530Z
Learning: In the lynx-family/lynx-stack repository, the `packages/react/testing-library` package does not have `vite` as a direct dependency. It relies on `vitest` being available from the monorepo root and accesses Vite types through re-exports from `vitest/node`. Direct imports from `vite` should not be suggested for this package.
Learnt from: colinaaa
Repo: lynx-family/lynx-stack PR: 1453
File: vitest.config.ts:49-61
Timestamp: 2025-08-06T13:28:57.182Z
Learning: In the lynx-family/lynx-stack repository, the file `packages/rspeedy/create-rspeedy/template-react-vitest-rltl-js/vitest.config.js` is a template file for scaffolding new Rspeedy projects, not a test configuration that should be included in the main vitest projects array.
Learnt from: colinaaa
Repo: lynx-family/lynx-stack PR: 1917
File: packages/mcp-servers/devtool-mcp-server/tsconfig.json:8-8
Timestamp: 2025-11-06T01:19:23.670Z
Learning: The lynx-js/devtool-mcp-server package in lynx-family/lynx-stack targets Node.js >=18.19 (specified in its package.json engines), which is different from the root project's requirement of Node.js ^22 || ^24. The package uses "lib": ["ES2024.Promise"] in its tsconfig.json because it manually includes polyfills for Promise.withResolvers while maintaining compatibility with Node.js v18.
Learnt from: colinaaa
Repo: lynx-family/lynx-stack PR: 1523
File: vitest.config.ts:5-6
Timestamp: 2025-08-13T11:46:43.737Z
Learning: In the lynx-stack codebase, default imports are consistently used for Node.js built-in modules (e.g., `import os from 'node:os'`, `import fs from 'node:fs'`). The TypeScript configuration supports esModuleInterop and allowSyntheticDefaultImports, making default imports the preferred pattern over namespace imports for Node.js built-ins.
Learnt from: upupming
Repo: lynx-family/lynx-stack PR: 1305
File: packages/testing-library/testing-environment/src/index.ts:255-258
Timestamp: 2025-08-11T05:57:18.212Z
Learning: In the ReactLynx testing environment (`packages/testing-library/testing-environment/src/index.ts`), the dual assignment pattern `target.console.method = console.method = () => {}` is required for rstest compatibility. This is because rstest provides `console` in an IIFE (Immediately Invoked Function Expression), and both the target and global console need to have these methods defined for proper test execution.
Learnt from: upupming
Repo: lynx-family/lynx-stack PR: 1670
File: packages/webpack/css-extract-webpack-plugin/test/hotCases/hot/hot-update-json/dual-thread/__snapshot__/index.css:6-8
Timestamp: 2025-09-23T08:54:39.966Z
Learning: In the lynx-stack CSS extract webpack plugin tests, many test fixture CSS files intentionally use invalid CSS syntax like `color: 'red';` with quoted values. The snapshots correctly reflect this invalid CSS from the source fixtures. To fix CSS validation issues, the source fixture files should be updated first, then snapshots regenerated, rather than manually editing snapshots.
Learnt from: gaoachao
Repo: lynx-family/lynx-stack PR: 1736
File: .changeset/spotty-experts-smoke.md:1-3
Timestamp: 2025-09-12T09:43:04.847Z
Learning: In the lynx-family/lynx-stack repository, private packages (marked with "private": true in package.json) like lynx-js/react-transform don't require meaningful changeset entries even when their public APIs change, since they are not published externally and only affect internal development.
📚 Learning: 2025-10-11T06:16:12.517Z
Learnt from: Sherry-hue
Repo: lynx-family/lynx-stack PR: 1820
File: packages/web-platform/web-tests/tests/react.spec.ts:834-856
Timestamp: 2025-10-11T06:16:12.517Z
Learning: In packages/web-platform/web-tests/tests/react.spec.ts, the tests `basic-bindmouse` and `basic-mts-bindtouchstart` are NOT duplicates despite having similar test structures. They test different event types: `basic-bindmouse` validates mouse events (mousedown, mouseup, mousemove) with mouse-specific properties (button, buttons, x, y, pageX, pageY, clientX, clientY), while `basic-mts-bindtouchstart` validates touch events (touchstart) with touch arrays (touches, targetTouches, changedTouches). The similar test structure is coincidental and follows testing conventions.

Applied to files:

  • packages/web-platform/web-tests/tests/performance.test.ts
  • packages/web-platform/web-tests/tests/main-thread-apis.test.ts
  • packages/web-platform/web-tests/tests/middleware.spec.ts
  • packages/web-platform/web-tests/tests/react.spec.ts
  • packages/web-platform/web-tests/tests/fp-only.spec.ts
  • packages/web-platform/web-tests/tests/web-elements.spec.ts
📚 Learning: 2025-09-10T10:27:32.903Z
Learnt from: PupilTong
Repo: lynx-family/lynx-stack PR: 1706
File: .github/workflows/test.yml:0-0
Timestamp: 2025-09-10T10:27:32.903Z
Learning: MULTI_THREAD×SSR combination is NYI (Not Yet Implemented) in the Playwright test configuration, which is why it's excluded from the test matrix in .github/workflows/test.yml.

Applied to files:

  • packages/web-platform/web-tests/tests/performance.test.ts
  • packages/web-platform/web-tests/tests/main-thread-apis.test.ts
  • packages/web-platform/web-tests/tests/middleware.spec.ts
  • packages/web-platform/web-tests/tests/web-core.test.ts
  • packages/web-platform/web-tests/playwright.config.ts
  • packages/web-platform/web-tests/tests/react.spec.ts
  • packages/web-platform/web-tests/tests/fp-only.spec.ts
  • packages/web-platform/web-tests/tests/web-elements.spec.ts
📚 Learning: 2025-08-27T12:42:01.095Z
Learnt from: upupming
Repo: lynx-family/lynx-stack PR: 1616
File: packages/webpack/cache-events-webpack-plugin/test/cases/not-cache-events/lazy-bundle/index.js:3-3
Timestamp: 2025-08-27T12:42:01.095Z
Learning: In webpack, properties like __webpack_require__.lynx_ce are injected during compilation/build time when webpack processes modules and generates bundles, not at runtime when dynamic imports execute. Tests for such properties don't need to wait for dynamic imports to complete.

Applied to files:

  • packages/web-platform/web-tests/tests/performance.test.ts
  • packages/web-platform/web-tests/tests/main-thread-apis.test.ts
  • packages/web-platform/web-tests/tests/middleware.spec.ts
  • packages/web-platform/web-tests/tests/web-core.test.ts
  • packages/web-platform/web-tests/tests/react.spec.ts
  • packages/web-platform/web-tests/tests/fp-only.spec.ts
  • packages/web-platform/web-tests/tests/web-elements.spec.ts
  • packages/web-platform/web-tests/package.json
  • packages/web-platform/playwright-fixtures/package.json
📚 Learning: 2025-08-11T05:57:18.212Z
Learnt from: upupming
Repo: lynx-family/lynx-stack PR: 1305
File: packages/testing-library/testing-environment/src/index.ts:255-258
Timestamp: 2025-08-11T05:57:18.212Z
Learning: In the ReactLynx testing environment (`packages/testing-library/testing-environment/src/index.ts`), the dual assignment pattern `target.console.method = console.method = () => {}` is required for rstest compatibility. This is because rstest provides `console` in an IIFE (Immediately Invoked Function Expression), and both the target and global console need to have these methods defined for proper test execution.

Applied to files:

  • packages/web-platform/web-tests/tests/performance.test.ts
  • packages/web-platform/web-tests/tests/main-thread-apis.test.ts
  • packages/web-platform/web-tests/tests/middleware.spec.ts
  • packages/web-platform/web-tests/tests/web-core.test.ts
  • packages/web-platform/web-tests/playwright.config.ts
  • packages/web-platform/web-tests/tests/react.spec.ts
  • packages/web-platform/web-tests/tests/fp-only.spec.ts
  • packages/web-platform/web-tests/tests/web-elements.spec.ts
📚 Learning: 2025-09-10T10:24:40.137Z
Learnt from: PupilTong
Repo: lynx-family/lynx-stack PR: 1706
File: .github/workflows/test.yml:109-109
Timestamp: 2025-09-10T10:24:40.137Z
Learning: In Playwright, when fullyParallel: true is set, the --shard option distributes individual tests across shards rather than splitting by files. This provides better load balancing compared to the default file-level sharding when fullyParallel is false.

Applied to files:

  • packages/web-platform/web-tests/tests/performance.test.ts
  • packages/web-platform/web-tests/tests/web-core.test.ts
  • packages/web-platform/web-tests/playwright.config.ts
  • packages/web-platform/web-tests/tests/fp-only.spec.ts
📚 Learning: 2025-08-13T11:46:43.737Z
Learnt from: colinaaa
Repo: lynx-family/lynx-stack PR: 1523
File: vitest.config.ts:5-6
Timestamp: 2025-08-13T11:46:43.737Z
Learning: In the lynx-stack codebase, default imports are consistently used for Node.js built-in modules (e.g., `import os from 'node:os'`, `import fs from 'node:fs'`). The TypeScript configuration supports esModuleInterop and allowSyntheticDefaultImports, making default imports the preferred pattern over namespace imports for Node.js built-ins.

Applied to files:

  • packages/web-platform/playwright-fixtures/src/index.ts
  • packages/web-platform/web-tests/tests/web-core.test.ts
  • packages/web-platform/web-tests/tests/fp-only.spec.ts
  • packages/web-platform/web-tests/tests/web-elements.spec.ts
  • packages/web-platform/playwright-fixtures/src/coverage-fixture.ts
  • packages/web-platform/playwright-fixtures/package.json
📚 Learning: 2025-10-10T08:22:12.051Z
Learnt from: Sherry-hue
Repo: lynx-family/lynx-stack PR: 1837
File: packages/web-platform/web-mainthread-apis/src/prepareMainThreadAPIs.ts:266-266
Timestamp: 2025-10-10T08:22:12.051Z
Learning: In packages/web-platform/web-mainthread-apis, the handleUpdatedData function returned from prepareMainThreadAPIs is internal-only, used to serve web-core. It does not require public documentation, type exports, or SSR support.

Applied to files:

  • packages/web-platform/web-tests/tests/main-thread-apis.test.ts
  • packages/web-platform/web-tests/tests/react.spec.ts
📚 Learning: 2025-08-06T13:28:57.182Z
Learnt from: colinaaa
Repo: lynx-family/lynx-stack PR: 1453
File: vitest.config.ts:49-61
Timestamp: 2025-08-06T13:28:57.182Z
Learning: In the lynx-family/lynx-stack repository, the file `packages/react/testing-library/src/vitest.config.js` is source code for the testing library that gets exported for users, not a test configuration that should be included in the main vitest projects array.

Applied to files:

  • packages/web-platform/web-tests/tests/middleware.spec.ts
  • packages/web-platform/web-tests/tests/web-core.test.ts
  • packages/web-platform/web-tests/playwright.config.ts
  • packages/web-platform/web-tests/tests/react.spec.ts
  • packages/web-platform/playwright-fixtures/tsconfig.json
  • packages/web-platform/web-tests/tests/fp-only.spec.ts
  • packages/web-platform/web-tests/tests/web-elements.spec.ts
  • packages/web-platform/web-tests/package.json
  • packages/web-platform/playwright-fixtures/package.json
📚 Learning: 2025-09-23T08:54:39.966Z
Learnt from: upupming
Repo: lynx-family/lynx-stack PR: 1670
File: packages/webpack/css-extract-webpack-plugin/test/hotCases/hot/hot-update-json/dual-thread/__snapshot__/index.css:6-8
Timestamp: 2025-09-23T08:54:39.966Z
Learning: In the lynx-stack CSS extract webpack plugin tests, many test fixture CSS files intentionally use invalid CSS syntax like `color: 'red';` with quoted values. The snapshots correctly reflect this invalid CSS from the source fixtures. To fix CSS validation issues, the source fixture files should be updated first, then snapshots regenerated, rather than manually editing snapshots.

Applied to files:

  • packages/web-platform/web-tests/tests/middleware.spec.ts
  • packages/web-platform/web-tests/tests/web-core.test.ts
  • packages/web-platform/web-tests/tests/react.spec.ts
  • packages/web-platform/web-tests/tests/fp-only.spec.ts
  • packages/web-platform/web-tests/tests/web-elements.spec.ts
📚 Learning: 2025-08-11T05:59:28.530Z
Learnt from: upupming
Repo: lynx-family/lynx-stack PR: 1305
File: packages/react/testing-library/src/plugins/vitest.ts:4-6
Timestamp: 2025-08-11T05:59:28.530Z
Learning: In the lynx-family/lynx-stack repository, the `packages/react/testing-library` package does not have `vite` as a direct dependency. It relies on `vitest` being available from the monorepo root and accesses Vite types through re-exports from `vitest/node`. Direct imports from `vite` should not be suggested for this package.

Applied to files:

  • packages/web-platform/web-tests/tests/middleware.spec.ts
  • packages/web-platform/web-tests/tests/web-core.test.ts
  • packages/web-platform/web-tests/tests/react.spec.ts
  • packages/web-platform/web-tests/tests/fp-only.spec.ts
  • packages/web-platform/web-tests/tests/web-elements.spec.ts
  • packages/web-platform/web-tests/package.json
  • packages/web-platform/playwright-fixtures/package.json
📚 Learning: 2025-08-21T08:46:54.494Z
Learnt from: upupming
Repo: lynx-family/lynx-stack PR: 1370
File: packages/webpack/cache-events-webpack-plugin/src/LynxCacheEventsRuntimeModule.ts:23-27
Timestamp: 2025-08-21T08:46:54.494Z
Learning: In Lynx webpack runtime modules, the team prioritizes performance and simplicity over defensive runtime error handling. They prefer relying on compile-time type safety (TypeScript) rather than adding runtime checks like try-catch blocks or type validation, especially for performance-critical code like cache event setup/cleanup functions.

Applied to files:

  • packages/web-platform/web-tests/tests/middleware.spec.ts
  • packages/web-platform/web-tests/tests/react.spec.ts
  • packages/web-platform/playwright-fixtures/src/coverage-fixture.ts
📚 Learning: 2025-07-16T06:26:22.230Z
Learnt from: PupilTong
Repo: lynx-family/lynx-stack PR: 1029
File: packages/web-platform/web-core-server/src/createLynxView.ts:0-0
Timestamp: 2025-07-16T06:26:22.230Z
Learning: In the lynx-stack SSR implementation, each createLynxView instance is used to render once and then discarded. There's no reuse of the same instance for multiple renders, so event arrays and other state don't need to be cleared between renders.

Applied to files:

  • packages/web-platform/web-tests/tests/middleware.spec.ts
📚 Learning: 2025-11-06T01:19:23.670Z
Learnt from: colinaaa
Repo: lynx-family/lynx-stack PR: 1917
File: packages/mcp-servers/devtool-mcp-server/tsconfig.json:8-8
Timestamp: 2025-11-06T01:19:23.670Z
Learning: The lynx-js/devtool-mcp-server package in lynx-family/lynx-stack targets Node.js >=18.19 (specified in its package.json engines), which is different from the root project's requirement of Node.js ^22 || ^24. The package uses "lib": ["ES2024.Promise"] in its tsconfig.json because it manually includes polyfills for Promise.withResolvers while maintaining compatibility with Node.js v18.

Applied to files:

  • packages/web-platform/web-tests/tests/web-core.test.ts
  • packages/web-platform/web-tests/tests/fp-only.spec.ts
  • packages/web-platform/web-tests/package.json
  • packages/web-platform/playwright-fixtures/package.json
📚 Learning: 2025-08-06T13:28:57.182Z
Learnt from: colinaaa
Repo: lynx-family/lynx-stack PR: 1453
File: vitest.config.ts:49-61
Timestamp: 2025-08-06T13:28:57.182Z
Learning: In the lynx-family/lynx-stack repository, the file `packages/rspeedy/create-rspeedy/template-react-vitest-rltl-js/vitest.config.js` is a template file for scaffolding new Rspeedy projects, not a test configuration that should be included in the main vitest projects array.

Applied to files:

  • packages/web-platform/web-tests/playwright.config.ts
  • packages/web-platform/web-tests/tests/react.spec.ts
  • packages/web-platform/playwright-fixtures/tsconfig.json
  • packages/web-platform/web-tests/package.json
  • packages/web-platform/playwright-fixtures/package.json
📚 Learning: 2025-11-11T08:05:14.163Z
Learnt from: Sherry-hue
Repo: lynx-family/lynx-stack PR: 1932
File: packages/web-platform/web-tests/tests/react/basic-element-x-input-ng-bindinput/index.jsx:10-26
Timestamp: 2025-11-11T08:05:14.163Z
Learning: In packages/web-platform/web-tests/tests/react/basic-element-x-input-ng-bindinput/index.jsx, the test intentionally uses selectionStart twice in the result string (instead of selectionStart and selectionEnd) because it prioritizes testing whether x-input-ng works functionally, rather than validating the correctness of selection values.

Applied to files:

  • packages/web-platform/web-tests/tests/react.spec.ts
  • packages/web-platform/web-tests/tests/web-elements.spec.ts
📚 Learning: 2025-10-29T10:28:27.519Z
Learnt from: upupming
Repo: lynx-family/lynx-stack PR: 1899
File: packages/react/transform/crates/swc_plugin_snapshot/tests/__swc_snapshots__/lib.rs/should_static_extract_dynamic_inline_style.js:20-24
Timestamp: 2025-10-29T10:28:27.519Z
Learning: Files inside packages/react/transform/crates/swc_plugin_snapshot/tests/__swc_snapshots__/ are auto-generated test snapshot files and should not be manually updated. Any issues with the generated code should be addressed in the code generator/transform logic, not in the snapshots themselves.

Applied to files:

  • packages/web-platform/web-tests/tests/react.spec.ts
  • packages/web-platform/web-tests/tests/fp-only.spec.ts
📚 Learning: 2025-08-07T04:00:59.645Z
Learnt from: colinaaa
Repo: lynx-family/lynx-stack PR: 1454
File: pnpm-workspace.yaml:46-46
Timestamp: 2025-08-07T04:00:59.645Z
Learning: In the lynx-family/lynx-stack repository, the webpack patch (patches/webpack5.101.0.patch) was created to fix issues with webpack5.99.9 but only takes effect on webpack5.100.0 and later versions. The patchedDependencies entry should use "webpack@^5.100.0" to ensure the patch applies to the correct version range.

Applied to files:

  • packages/web-platform/web-tests/package.json
  • packages/web-platform/playwright-fixtures/package.json
📚 Learning: 2025-09-12T09:43:04.847Z
Learnt from: gaoachao
Repo: lynx-family/lynx-stack PR: 1736
File: .changeset/spotty-experts-smoke.md:1-3
Timestamp: 2025-09-12T09:43:04.847Z
Learning: In the lynx-family/lynx-stack repository, private packages (marked with "private": true in package.json) like lynx-js/react-transform don't require meaningful changeset entries even when their public APIs change, since they are not published externally and only affect internal development.

Applied to files:

  • packages/web-platform/web-tests/package.json
  • packages/web-platform/playwright-fixtures/package.json
📚 Learning: 2025-08-13T11:36:12.075Z
Learnt from: colinaaa
Repo: lynx-family/lynx-stack PR: 1523
File: vitest.config.ts:52-72
Timestamp: 2025-08-13T11:36:12.075Z
Learning: The lynx-stack project requires Node.js >=22 as specified in package.json engines, so Node.js compatibility fallbacks for features introduced before v22 are unnecessary.

Applied to files:

  • packages/web-platform/web-tests/package.json
📚 Learning: 2025-08-19T11:25:36.127Z
Learnt from: colinaaa
Repo: lynx-family/lynx-stack PR: 1558
File: .changeset/solid-squids-fall.md:2-2
Timestamp: 2025-08-19T11:25:36.127Z
Learning: In the lynx-family/lynx-stack repository, changesets should use the exact package name from package.json#name, not generic or unscoped names. Each package has its own specific scoped name (e.g., "lynx-js/react-transform" for packages/react/transform).

Applied to files:

  • packages/web-platform/web-tests/package.json
  • packages/web-platform/playwright-fixtures/package.json
📚 Learning: 2025-08-27T08:10:09.932Z
Learnt from: colinaaa
Repo: lynx-family/lynx-stack PR: 1612
File: packages/rspeedy/create-rspeedy/template-react-vitest-rltl-ts/src/tsconfig.json:3-13
Timestamp: 2025-08-27T08:10:09.932Z
Learning: In the lynx-family/lynx-stack repository, Rspeedy templates use `lynx-js/rspeedy/client` types via `rspeedy-env.d.ts` instead of `vite/client` types. Rspeedy provides its own client-side environment type definitions and doesn't require direct Vite type references.

Applied to files:

  • packages/web-platform/web-tests/package.json
📚 Learning: 2025-09-12T09:43:04.847Z
Learnt from: gaoachao
Repo: lynx-family/lynx-stack PR: 1736
File: .changeset/spotty-experts-smoke.md:1-3
Timestamp: 2025-09-12T09:43:04.847Z
Learning: In the lynx-family/lynx-stack repository, empty changeset files (containing only `---\n\n---`) are used for internal changes that modify src/** files but don't require meaningful release notes, such as private package changes or testing-only modifications. This satisfies CI requirements without generating user-facing release notes.

Applied to files:

  • packages/web-platform/playwright-fixtures/package.json
🧬 Code graph analysis (1)
packages/web-platform/web-tests/playwright.config.ts (1)
packages/web-platform/playwright-fixtures/src/playwright.common.ts (1)
  • playwrightConfigCommon (42-124)
🔇 Additional comments (14)
packages/web-platform/playwright-fixtures/package.json (1)

1-19: Manifest layout for the new fixtures package looks consistent

Private ESM package with main/typings pointing at src/index.ts and @playwright/test listed as both dev and peer dependency is a reasonable setup for an internal fixtures module. Nothing blocking here from the manifest side.

packages/web-platform/tsconfig.json (1)

13-18: Project reference wiring for playwright-fixtures looks correct

The added reference to ./playwright-fixtures/tsconfig.json cleanly brings the new fixtures TS project into the web-platform composite build. No further changes needed here.

packages/web-platform/playwright-fixtures/src/coverage-fixture.ts (1)

1-3: Coverage converter path now tracks the test file location

Switching the v8ToIstanbul source path to

path.join(path.dirname(testInfo.file), '..', 'www', 'main.js')

anchors coverage mapping to the directory of the current test file instead of the fixture’s own directory, which is more robust if tests are reorganized. The rest of the fixture behavior is preserved.

Also applies to: 40-41

packages/web-platform/web-tests/tests/main-thread-apis.test.ts (1)

5-7: Using centralized Playwright fixtures is a clean improvement

Importing { test, expect } from @lynx-js/playwright-fixtures keeps this suite aligned with the shared coverage/test utilities while preserving existing test behavior. Page remains correctly typed via @playwright/test.

packages/web-platform/web-tests/tests/web-elements.spec.ts (1)

4-7: Centralizing test/expect/swipe/dragAndHold imports looks good

Switching to

import { test, expect, swipe, dragAndHold } from '@lynx-js/playwright-fixtures';

removes local coupling and ensures all suites use the same fixture/gesture helpers. Given the shared swipe implementation changed recently, it’s worth eyeballing a couple of the more swipe-heavy tests to confirm behaviour still matches expectations, but nothing in this file itself is problematic.

packages/web-platform/web-tests/tests/fp-only.spec.ts (1)

1-5: fp-only suite correctly switched to shared fixtures

Importing { test, expect } from @lynx-js/playwright-fixtures aligns this file with the new centralized Playwright fixtures package and should be a no-op behaviorally for the tests.

packages/web-platform/web-tests/tests/web-core.test.ts (1)

5-5: Shared fixtures import for test/expect looks correct

Routing test/expect through @lynx-js/playwright-fixtures keeps this suite aligned with the new central fixtures. As long as the package re-exports the standard Playwright test (with { page, browserName, context, title } fixtures) and expect, no further changes are needed here.

packages/web-platform/web-tests/package.json (1)

29-29: Dev dependency on @lynx-js/playwright-fixtures is appropriate

This matches the new imports in the test files and config. Since @lynx-js/web-tests is private, wiring this workspace devDependency doesn’t require a public changeset entry.

packages/web-platform/web-tests/tests/performance.test.ts (1)

7-7: Using shared fixtures in performance tests is consistent

Importing test/expect from @lynx-js/playwright-fixtures keeps this suite on the same shared fixture surface as the rest of web-tests, which is desirable as long as the package exposes the standard Playwright test API.

packages/web-platform/web-tests/tests/middleware.spec.ts (1)

4-4: Middleware tests correctly switch to shared fixtures

Importing test/expect from @lynx-js/playwright-fixtures aligns this suite with the central fixtures package and should preserve behavior if that package simply re-exports Playwright’s test API.

packages/web-platform/playwright-fixtures/src/index.ts (1)

1-3: Barrel re-exports define a clean fixtures API

Re-exporting coverage-fixture, utils, and playwright.common from the package index keeps consumer imports (@lynx-js/playwright-fixtures) concise and centralized. This matches the intended design of the new fixtures package.

packages/web-platform/web-tests/tests/react.spec.ts (1)

4-4: Consolidated import of test/expect/swipe/dragAndHold is sensible

Pulling test, expect, swipe, and dragAndHold from @lynx-js/playwright-fixtures nicely centralizes shared helpers. Please just confirm that the new swipe/dragAndHold implementations are equivalent to the old local ones, since many gesture and screenshot tests rely on their exact behavior.

packages/web-platform/playwright-fixtures/src/playwright.common.ts (1)

42-123: Shared Playwright config is well-structured and suitable for reuse

The playwrightConfigCommon definition (timeouts, fullyParallel, CI-sensitive workers/retries/maxFailures, screenshot maxDiffPixelRatio, browser projects, and webServer pointing at npm run serve) is a solid central config to spread into individual suites like web-tests. Once the minor path/workerLimit issues above are addressed, this should make Playwright behavior consistent across packages with minimal duplication.

packages/web-platform/web-tests/playwright.config.ts (1)

5-6: Composing web-tests config from playwrightConfigCommon is a good simplification

Importing playwrightConfigCommon and spreading it into defineConfig keeps this file minimal while inheriting all shared settings (projects, baseURL, retries, etc.). Adding testIgnore afterward correctly layers local behavior on top; if you later need web-tests–specific projects or use options, adding them after the spread will override the shared ones as expected.

Also applies to: 22-25

Comment thread packages/web-platform/playwright-fixtures/src/playwright.common.ts
Comment thread packages/web-platform/playwright-fixtures/tsconfig.json
@relativeci
Copy link
Copy Markdown

relativeci bot commented Dec 24, 2025

Web Explorer

#6837 Bundle Size — 376.4KiB (0%).

a4e5510(current) vs 491c5ef main#6831(baseline)

Bundle metrics  Change 1 change
                 Current
#6837
     Baseline
#6831
No change  Initial JS 149.87KiB 149.87KiB
No change  Initial CSS 32.4KiB 32.4KiB
No change  Cache Invalidation 0% 0%
No change  Chunks 8 8
No change  Assets 8 8
Change  Modules 231(-0.43%) 232
No change  Duplicate Modules 16 16
No change  Duplicate Code 3.12% 3.12%
No change  Packages 4 4
No change  Duplicate Packages 0 0
Bundle size by type  no changes
                 Current
#6837
     Baseline
#6831
No change  JS 247.01KiB 247.01KiB
No change  Other 96.98KiB 96.98KiB
No change  CSS 32.4KiB 32.4KiB

Bundle analysis reportBranch PupilTong:p/hw/split-web-e2e-fix...Project dashboard


Generated by RelativeCIDocumentationReport issue

@relativeci
Copy link
Copy Markdown

relativeci bot commented Dec 24, 2025

React Example

#6677 Bundle Size — 237.01KiB (0%).

a4e5510(current) vs 491c5ef main#6671(baseline)

Bundle metrics  no changes
                 Current
#6677
     Baseline
#6671
No change  Initial JS 0B 0B
No change  Initial CSS 0B 0B
No change  Cache Invalidation 0% 0%
No change  Chunks 0 0
No change  Assets 4 4
No change  Modules 162 162
No change  Duplicate Modules 65 65
No change  Duplicate Code 46.75% 46.75%
No change  Packages 2 2
No change  Duplicate Packages 0 0
Bundle size by type  no changes
                 Current
#6677
     Baseline
#6671
No change  IMG 145.76KiB 145.76KiB
No change  Other 91.25KiB 91.25KiB

Bundle analysis reportBranch PupilTong:p/hw/split-web-e2e-fix...Project dashboard


Generated by RelativeCIDocumentationReport issue

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq bot commented Dec 24, 2025

CodSpeed Performance Report

Merging #2050 will improve performance by 5.93%

Comparing PupilTong:p/hw/split-web-e2e-fixtures (a4e5510) with main (abd5960)

Summary

⚡ 1 improvement
✅ 62 untouched
⏩ 3 skipped1

Benchmarks breakdown

Benchmark BASE HEAD Efficiency
transform 1000 view elements 46.9 ms 44.3 ms +5.93%

Footnotes

  1. 3 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@PupilTong PupilTong requested a review from Sherry-hue December 25, 2025 03:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants