Continue restructuring e2e tests - #246
Conversation
EskiMojo14
commented
Aug 21, 2026
- colocate models and tests with their routes/components
- only set up fixtures needed for the test
- fix sidebar being "visible" while offscreen
… instead of relying on try/catch
✅ Deploy Preview for schemabenchmarks ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Pull request overview
This PR continues the Playwright E2E test restructure in website/ by colocating page/component object models alongside their route/component tests, switching to a per-test createTest() fixture setup, and adjusting the sidebar markup so the closed modal sidebar is hidden from the accessibility tree (addressing “visible while offscreen” selectors in tests).
Changes:
- Introduces
createTest()to register only the object-model fixtures a given test file needs, and removes the global fixtures registry exports. - Moves/creates route/component E2E page models next to their corresponding
*.e2e.test.tsfiles and updates imports accordingly. - Updates Playwright discovery (
testDir,testMatch) to run colocated E2E tests across thewebsite/tree, and updates lint targeting for new E2E file locations.
Reviewed changes
Copilot reviewed 34 out of 41 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| website/src/shared/components/sidebar/index.tsx | Adds aria-hidden on the modal sidebar when closed to improve role-based test selectors and a11y tree. |
| website/src/shared/components/sidebar/index.e2e.test.ts | Switches to createTest() and local sidebar model fixture. |
| website/src/shared/components/sidebar/index.e2e.model.ts | Adjusts sidebar open logic to rely on visibility/role behavior. |
| website/src/shared/components/header/index.e2e.model.ts | Adds a header component object model for reuse in route tests. |
| website/src/shared/components/dialog/pref.e2e.test.ts | Switches to createTest() and local prefs dialog model fixture. |
| website/src/shared/components/dialog/pref.e2e.model.ts | Simplifies open logic using isVisible() + retry. |
| website/src/routes/json-schema/compliance/-$tab.e2e.test.ts | Switches to createTest() and colocated compliance page model. |
| website/src/routes/json-schema/compliance/-$tab.e2e.model.ts | Adds a colocated compliance page/tab model with desktop/mobile table/list helpers. |
| website/src/routes/json-schema/_conversion/to-json/-$tab.e2e.test.ts | Switches to createTest() and colocated to-json page model. |
| website/src/routes/json-schema/_conversion/to-json/-$tab.e2e.model.ts | Adds a colocated to-json page model with tab models and table/list helpers. |
| website/src/routes/json-schema/_conversion/from-json/-index.e2e.test.ts | Switches to createTest() and colocated from-json page model. |
| website/src/routes/json-schema/_conversion/from-json/-index.e2e.model.ts | Adds a colocated from-json page model with desktop/mobile helpers. |
| website/src/routes/blog/-index.e2e.test.ts | Switches to createTest() and uses colocated blog page model plus shared header model. |
| website/src/routes/blog/-index.e2e.model.ts | Adds a colocated blog page model for blog listing assertions. |
| website/src/routes/_benchmarks/stack/-index.e2e.test.ts | Switches to createTest() and colocated stack page model. |
| website/src/routes/_benchmarks/stack/-index.e2e.model.ts | Adds a colocated stack page model with desktop/mobile helpers. |
| website/src/routes/_benchmarks/download/-index.e2e.test.ts | Switches to createTest() and colocated download page model. |
| website/src/routes/_benchmarks/download/-index.e2e.model.ts | Updates constants import to be route-local for the colocated model. |
| website/src/routes/_benchmarks/_runtime/validation/-index.e2e.test.ts | Switches to createTest() and colocated runtime validation page model. |
| website/src/routes/_benchmarks/_runtime/validation/-index.e2e.model.ts | Updates runtime fixture import to new centralized runtime model helpers. |
| website/src/routes/_benchmarks/_runtime/string/-index.e2e.test.ts | Switches to createTest() and colocated runtime string page model. |
| website/src/routes/_benchmarks/_runtime/string/-index.e2e.model.ts | Updates runtime fixture import to new centralized runtime model helpers. |
| website/src/routes/_benchmarks/_runtime/standard/-index.e2e.test.ts | Switches to createTest() and colocated runtime standard page model. |
| website/src/routes/_benchmarks/_runtime/standard/-index.e2e.model.ts | Updates runtime fixture import to new centralized runtime model helpers. |
| website/src/routes/_benchmarks/_runtime/parsing/-index.e2e.test.ts | Switches to createTest() and colocated runtime parsing page model. |
| website/src/routes/_benchmarks/_runtime/parsing/-index.e2e.model.ts | Updates runtime fixture import to new centralized runtime model helpers. |
| website/src/routes/_benchmarks/_runtime/initialization/-index.e2e.test.ts | Switches to createTest() and colocated runtime initialization page model. |
| website/src/routes/_benchmarks/_runtime/initialization/-index.e2e.model.ts | Updates runtime fixture import to new centralized runtime model helpers. |
| website/src/routes/_benchmarks/_runtime/codec/-index.e2e.test.ts | Switches to createTest() and colocated runtime codec page model. |
| website/src/routes/_benchmarks/_runtime/codec/-index.e2e.model.ts | Updates runtime fixture import to new centralized runtime model helpers. |
| website/playwright.config.ts | Updates Playwright to discover colocated E2E tests via testDir: "." and testMatch. |
| website/e2e/helpers/runtime/mobile.ts | Switches helper test.step source to @playwright/test and updates runtime type imports. |
| website/e2e/helpers/runtime/index.ts | Switches helper test.step source to @playwright/test and updates runtime type imports. |
| website/e2e/helpers/runtime/desktop.ts | Switches helper test.step source to @playwright/test and updates runtime type imports. |
| website/e2e/helpers/desktop.ts | Switches helper test.step source to @playwright/test. |
| website/e2e/fixtures/test.ts | Introduces createTest() and moves common per-test setup (API mocking) into the base test. |
| website/e2e/fixtures/runtime.ts | Adds a centralized runtime page model + mixins for runtime benchmark pages. |
| website/e2e/fixtures/pages/index.ts | Removes the global page-model export registry (no longer needed). |
| website/e2e/fixtures/index.ts | Switches exports to createTest + expect only. |
| website/e2e/fixtures/components/index.ts | Removes the global component-model export registry (no longer needed). |
| oxlint.config.ts | Expands Playwright lint targeting to include colocated *.e2e.*.ts files. |
Suppressed comments (1)
website/src/routes/json-schema/_conversion/to-json/-$tab.e2e.test.ts:9
- Prefer importing from
#e2e/utilsinstead of#e2e/utils/index.tsto keep module specifiers consistent across the e2e suite and avoid loading the same file under multiple module IDs.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.