Skip to content

test(e2e): bootstrap pages automatically - #6134

Draft
loganj wants to merge 2 commits into
mainfrom
fix/e2e-origin-bootstrap
Draft

test(e2e): bootstrap pages automatically#6134
loganj wants to merge 2 commits into
mainfrom
fix/e2e-origin-bootstrap

Conversation

@loganj

@loganj loganj commented Aug 17, 2026

Copy link
Copy Markdown
Collaborator

🤖

Summary

Playwright E2E runs can surface SecurityError: Failed to read the 'localStorage' property from 'Window' when the first app navigation never committed and the browser remains on opaque-origin about:blank. The storage error hides the real problem: a missing E2E build or unavailable preview server.

This PR makes app-origin bootstrap automatic for every desktop and web E2E test. Test bodies now begin only after a successful HTTP navigation to the configured origin, so a failed first navigation reports its expected origin, current URL, and the build/preview-server remedy at the fault.

  • Desktop and web suites export a shared test API that automatically bootstraps the page after beforeEach setup and before each test body. All E2E specs import that API rather than @playwright/test directly.
  • Tests that genuinely need setup before their first navigation can narrowly opt out with test.use({ e2eBootstrap: false }) and invoke the guarded bootstrap after registering setup. The draft-storage test demonstrates this path.
  • Storage seed scripts remain origin-guarded; the active-identity seed now follows the same rule. Genuine storage failures are not suppressed.
  • Bootstrap coverage verifies both the automatic positive path and the unavailable-server negative path. The root smoke entrypoint continues to build before running Playwright.

Related issue

None found — this hardens the E2E harness based on the Playwright-on-Blox root-cause probe.

@loganj

loganj commented Aug 17, 2026

Copy link
Copy Markdown
Collaborator Author

nope, sending this back

Brother Darryl added 2 commits August 17, 2026 13:04
Signed-off-by: Brother Darryl <146fb160a3266e6165bfa385f6048c975eda9e21cf65da097a0b5ea7952532a5@buzz.block.builderlab.xyz>
Signed-off-by: Brother Darryl <146fb160a3266e6165bfa385f6048c975eda9e21cf65da097a0b5ea7952532a5@buzz.block.builderlab.xyz>
@loganj
loganj force-pushed the fix/e2e-origin-bootstrap branch from 2429252 to f7fe05a Compare August 17, 2026 17:08
@loganj loganj changed the title test(e2e): make browser origin bootstrap explicit test(e2e): bootstrap pages automatically Aug 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant