Uh oh!
There was an error while loading. Please reload this page.
test(desktop): merge same-fixture e2e assertions into coherent journeys - #2486
Conversation
Part of apache#2390 (Electron E2E half; the Storybook matrix is a separate PR per the issue). Every e2e window fixture is function-scoped, so 69 tests paid 69 Electron launches — with most tests re-launching and re-seeding the exact state their file-mates had just built. Tests that share one fixture and compatible assertions now run as consecutive phases of one journey; every merge is annotated with the ordering constraint that made it safe (count pins run first, destructive phases run last, don't-ask-again phases end their window). Merged: ask-user-question 2->1, attachment 2->1, bot-onboarding 2->1, composer-mention-token 4->1, composer-skill-invocation 7->3, keyboard-help 2->1, mcp 5->2, new-messages-indicator 2->1 (also stops re-seeding the six-message transcript), providers 3->1, quote-companion 12->4, send-message 4->2, session-workbar 2->1, settings-projects 3->1, settings 6->2, skill-delete-scope 2->1. Kept separate deliberately: - storage-root-conflict (cold-start race is the subject), - permission-mode-surface (two different fixture scenarios), - the staged-Skills draft-restoration test (its contract is editor rebuilds on external value changes; concurrent session activity in a shared window perturbs exactly that — observed, not guessed), - quote-companion's batch-close (needs the confirmation dialog the numbered-tab journey suppresses via don't-ask-again). Also removes 11 window fixtures that no spec references (dead seeding code left behind by earlier test deletions): longTranscriptWindow, shortFinalTurnWindow, overflowingRailWindow, sidebarLongSessionsWindow, disclosureOutputWindow, staleSessionsWindow, gitReviewWindow, gitReviewLargeWindow, artifactPaneWindow, localeSwitchWindow, planRemindersWindow. 69 tests / 69 launches -> 34 tests / 34 launches. Local (4 workers): 57.9s -> 47.3/43.2/40.8s across three green rounds. CI runs a single worker, where launch count dominates wall time.
jackwener
commented
Aug 8, 2026
Review decisionProblem is real: function-scoped fixtures re-launch Electron for identical seeds; launch count dominates CI wall time. Approach is correct: merge same-fixture assertions into ordered phases (count pins first, destructive last, turn-settle between sends), keep must-isolate cases (storage-root-conflict, permission-mode dual scenarios, staged-Skills draft restore). Landing via maintainer branch because the fork head conflicts with main after #2478 presentation cleanup. Rebase drops reintroduced presentation journeys (MCP layout matrix, providers header geometry, settings back-icon rail) while keeping product journeys and dead-fixture removal. See the rebased PR for the final tree. |
jackwener
commented
Aug 8, 2026
Landing via rebased #2489 (presentation pins already removed on main via #2478 are not reintroduced). Thanks @UncertaintyDeterminesYou4ndMe! |
Part of #2390 (Electron E2E half; the Storybook matrix reduction is #2481 per the issue's separate-PR requirement).
Problem
Every e2e window fixture is function-scoped, so 69 tests paid 69 Electron launches — and most of them re-launched and re-seeded exactly the state their file-mates had just built.
quote-companion.spec.tsalone launched 12 windows over one identical seed;new-messages-indicator.spec.tsre-ran its six-message transcript seed from scratch for its second test.Change
Tests that share one fixture and compatible assertions now run as consecutive phases of one journey. 69 tests / 69 launches → 34 tests / 34 launches. Every merge is annotated in-file with the ordering constraint that made it safe:
总消息数 === 1phases, the blocked-Skill phase that pins zero turns and zero sessions).Also removes 11 window fixtures no spec references (dead seeding code left behind by earlier test deletions,
fixtures.ts592 → 427 lines).Deliberately not merged, and why
storage-root-conflict: the cold-start race is the subject; sharing a window would erase the precondition.permission-mode-surface: its two tests boot two different fixture scenarios./skill:text instead of chips, because concurrent session activity triggers exactly the external-value-change editor rebuild the test guards. That failure mode is worth a launch.invocableSkillsWindowfamily spans 5 files;sandboxBoundaryWindowspans 2) are left as a maintainer decision — merging across files moves regression ownership between files, which is an organizational call, not a mechanical one.Distinct contracts preserved
All IPC, focus, scrolling, remount, persistence, lifecycle, and animation assertions are unchanged — phases are the original test bodies with their assertions intact (three assertions were strengthened in passing: hostile-Mermaid now pins settled-turn count 2, the markdown
--markdownscan asserts exit 0 explicitly, ask-user-question now answers after the reload, proving the rehydrated prompt is the live parked turn).Timing
Same machine, warm build; CI runs
workers=1where launch count dominates:Electron launches: 69 → 34. Typecheck and biome are clean.
cc @Astro-Han