fix(e2e): add smoke fail-fast project to abort on broken-infra runs - #13
Merged
Conversation
Add a one-shot smoke project that runs before every other Playwright project. It validates the most fundamental contract — dev server up, React app served, router redirects unauthenticated users to /login — in a single navigation. When it fails, Playwright skips downstream projects via the new dependencies wiring, so the suite exits in <2 min instead of running ~40 min of redundant red across 400+ tests. The smoke test is intentionally standalone: no auth, no storageState, no backend dependency beyond the login page being reachable. This lets it compose cleanly with the auth setup project that PR #12 introduces; chromium and ci can list both as dependencies in any order without coupling smoke to credential availability. - e2e/smoke.spec.ts: single test, asserts /login redirect and email field visible (proves React rendered, not a hydration crash) - playwright.config.ts: new "smoke" project (testMatch on smoke spec, retries: 0). chromium and ci gain dependencies: ['smoke'] and testIgnore on smoke.spec.ts so the smoke test only runs once. Verified: tsc --noEmit clean; playwright test --list shows 1 smoke test under the smoke project and 404 tests under chromium (smoke excluded as expected). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
mborgeson
force-pushed
the
fix/e2e-smoke-fail-fast
branch
from
April 30, 2026 10:31
f4e6205 to
e02631f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a one-shot smoke Playwright project that runs before every other project. When it fails, Playwright skips dependents and the suite exits in <2 minutes instead of running ~40 minutes of redundant red across 400+ tests.
What it does
The smoke test (
e2e/smoke.spec.ts) validates the most fundamental contract in a single navigation:page.goto('/')redirects an unauthenticated user to/login— proves dev server is reachable, Vite served the bundle, router booted, and the auth gate ran.getByLabel(/email/i)is visible on/login— proves React actually rendered (no white-screen hydration crash).Wire-up in
playwright.config.ts:smokeproject:testMatch: /smoke\.spec\.ts/,retries: 0.chromiumandcigaindependencies: ['smoke']andtestIgnore: /smoke\.spec\.ts/so the smoke spec runs exactly once, before everything else.Why standalone (no auth dependency)
The smoke test deliberately does NOT depend on auth, storageState, or any backend behavior beyond the login page being reachable. This is the right scope for a fail-fast check:
Composition with PR #12 (auth fixture setup)
PR #12 introduces a
setupproject that authenticates and persistsstorageStatetoe2e/.auth/admin.json. Both can coexist cleanly: when PR #12 lands,chromiumandcisimply listdependencies: ['smoke', 'setup']. The smoke project gates everything; the setup project warms credentials only for tests that need them. Order between them is unimportant because smoke does not consumestorageState.This PR is branched from
origin/main, so the conflict surface with PR #12 is just thedependenciesarray onchromiumandci. Trivial to resolve in whichever PR lands second.Expected impact
Test plan
npx tsc --noEmit playwright.config.ts e2e/smoke.spec.ts— cleannpx playwright test --list --project=smoke— 1 testnpx playwright test --list --project=chromium— 404 tests (smoke excluded; was 405 before testIgnore)🤖 Generated with Claude Code