fix(e2e): green main — retarget stale specs + fix update-preferences flake#116
Merged
Conversation
- account-switcher: the email now also renders in ProfileMenu + SettingsPanel's ProfileChip (3 nodes), so scope the two email assertions to their `[data-account-id]` switcher rows. - ai: the server redacts provider API keys unconditionally (#111) — `GET /api/ai/status` returns `providers.claude.apiKeySet: true`, not the raw key. Poll `apiKeySet` → `true` and widen the inline type. Test-only; product behaviour is intended and correct. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KFk2T9k3p7ghCjdzMfkA5w
Block-doc HTML export now mounts the island-hydrated OpenBookViewer (PresentBlocks, the real block renderer, locked-but-interactive) over the static body; the bespoke `.reactive`/`[data-val]`/`.slider` runtime was retired (e177f38). Await `.obe-present-blocks` (present only after hydration) before asserting, then read the live kit DOM: - block-editor:377 — `.expr [data-val]` → `.obe-formula-out`; `.slider input` → `.obe-kit-slider input[type=range]`. - kit:236 — `.reactive.expr [data-val]` → `.obe-formula-out`; `.kitlight[data-status]` → `.obe-kit-status[data-status]`; `[data-chart] svg rect/text` → `.obe-chart-svg rect/text`; the number input is `.obe-kit-number .obe-kit-stepper input` (the `number` block renders a stepper, not a range). Numeric expectations (6→18, 70/30, rect count 3, ticks 20→5) unchanged. Test-only; product behaviour is intended and correct. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KFk2T9k3p7ghCjdzMfkA5w
Prove the restore by the name-suffixed twin ("Backup Spec Page
(imported)") rather than a raw page-count delta, and widen both polls to
20s so a slow whole-workspace restore on a long-lived dev server no
longer flakes the too-tight window.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KFk2T9k3p7ghCjdzMfkA5w
The custom Select opens its listbox side=bottom, directly over whatever sits below the trigger. A caller that interacts with that control next (e.g. the "Security updates only" toggle under the Updates cadence Select) could land on the still-mounted listbox and loop until timeout. Wait for `[role=option]` to reach count 0 after picking — the Select closes without an exit animation, so this resolves immediately in the normal case. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KFk2T9k3p7ghCjdzMfkA5w
…store The updates spec reopens settings after page.reload() and flaked under load: the shell re-initialises async (NavigationProvider resolves the page + writes the URL, DocumentArea flips from its loading null-render to content), and a dialog opened inside that transition is torn back down, detaching the settings tab buttons mid-click. Reliably reproduced 20/20 under `--repeat-each=20`. Retry the open with expect(...).toPass() until the General panel is actually up and stays up. Test-only; the Updates product code path is unchanged. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KFk2T9k3p7ghCjdzMfkA5w
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Problem
mainCI had been red for 8+ consecutive runs. The Playwright e2e job is a non-required check, so recent PRs (the AI-usage batch #111–#115, the island-hydrated viewer rearch, the identity work) merged over it and the failures accumulated. Latest red run: https://github.com/eliotlim/OpenBook/actions/runs/28804748447Recon verdict: every consistent failure is a stale/mis-scoped test trailing an intentional, correct product change — not a product regression. One was a pre-existing flake. No product code needs to change.
Board: Epic: Green main — fix failing e2e (2026-07) → T1 (stale-locator retargets) + T2 (update-preferences flake).
Solution
Test-only fixes across 6 e2e specs + one shared fixture. Why test-side, not product-side: each failure is a test asserting old behavior after the product deliberately changed (verified against source, commit-attributed):
getByTexthit 3 nodes. Scoped the two email assertions to their[data-account-id]switcher rows (strictly stronger).GET /api/ai/statusreturnsapiKeySet:true, not the raw key. Poll asserts the presence flag.OpenBookViewer(.obe-*DOM) instead of the retired bespoke reactive runtime (e177f38). Retargeted the offline-compute assertions to the real hydrated-viewer DOM; all numeric proofs preserved (6→18, 70/30, chart rect count 3, tick 20→5).… (imported)twin instead of a raw count delta; poll windows widened.page.reload()(not the originally-reported popover intercept). HardenedopenGeneralSettings(expect(...).toPass(), reopens on transient remount) and madechooseValue/chooseLabelwait for popover teardown.Key files:
packages/web/e2e/{account-switcher,ai,block-editor,kit,export,update-preferences}.spec.ts,packages/web/e2e/fixtures.ts. New deps: none. No product/runtime code touched.Before / After
No visual change (test-only PR) — behavioral state deltas below.
apiKey→ never equals test key → failapiKeySet:true→ 8 passed.reactive/[data-val]DOM → element not found.obe-*viewer DOM, 6→18 → 1 passed--repeat-each=20Test procedure
Per-spec, on the web e2e harness (
pnpm --filter @book.dev/web exec playwright test <spec> --project=chromium); the flaky ones under load:The full sharded suite runs in this PR's CI — that is the real proof
maingoes green (and that the sharedfixtures.tschange has no blast radius across other specs).Operational notes
chooseValue/chooseLabelfixture change touches every spec that opens a Select; reviewed for blast radius (the added wait is a no-op when no options are open) and proven by the full CI e2e run.mainso PRs can't merge over red e2e again — the root cause of the 8-run pileup.Verify: T1 — typecheck/lint/unit green (sdk 171 / ui 948 / server 645), 5 specs green individually. T2 — full
pnpm verifyexit 0, spec 20/20. Merge is the clean union of both (7 files, 60/30), no conflicts.Reviews:
code(Quinn) — T1 cleared; T2 in review. Nosecurity/design/productgates (test-only, no trust boundary, no user-visible change).