Skip to content

test(e2e): bootstrap pages automatically - #6134

Open
loganj wants to merge 1 commit into
mainfrom
fix/e2e-origin-bootstrap
Open

test(e2e): bootstrap pages automatically#6134
loganj wants to merge 1 commit 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 explicit and enforced for desktop and web E2E tests. Test setup begins only after 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 expose guarded bootstrapE2ePage helpers and use explicit bootstrap before page/state access.
  • The checker rejects specs that omit bootstrap, including web home smoke coverage.
  • Bootstrap accepts Playwright's valid null response for a same-document/hash navigation, while still rejecting thrown navigation failures, non-OK HTTP responses, and an unexpected final origin.
  • Storage seed scripts remain origin-guarded. Genuine storage failures are not suppressed.

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

@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
@loganj
loganj force-pushed the fix/e2e-origin-bootstrap branch 3 times, most recently from a7ec674 to e06cd68 Compare August 19, 2026 01:21
@loganj
loganj marked this pull request as ready for review August 19, 2026 11:28
@loganj
loganj requested a review from a team as a code owner August 19, 2026 11:28
@loganj
loganj force-pushed the fix/e2e-origin-bootstrap branch 19 times, most recently from 690b438 to ef77a60 Compare August 21, 2026 00:28
Preserve unsafe bootstrap events through supported parenthesized forms and grant loop bootstrap credit only when syntax proves an enumerable runtime iteration.

Co-authored-by: Larry <larry@buzz.local>
Co-authored-by: Brother Darryl <darryl@buzz.local>
Signed-off-by: Logan Johnson <loganj@squareup.com>
@loganj
loganj force-pushed the fix/e2e-origin-bootstrap branch from ef77a60 to 091670f Compare August 21, 2026 00:36
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