Repository navigation
improvement(desktop-e2e): one shared harness with a bounded quit, flake fixes, and a trimmed suite - #10390
Conversation
…nd fix live-sim consent handling local-files: four tests (consent, Full file access, fs races, restart/sign-out) on the desktop fixture with bounded restarts; a minimal fixture page replaces apps/sim's Settings component; the shared-prompt step waits for a real join; fs patches restore in finally and assert they ran. desktop-tools-live-sim: launches through the harness, approves only folder consent dialogs, and merges the two awaiting-approval tests into one launch. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…-in prompts onto the shared harness - Launch, servers, fixture bundling, tool authorization, focus, and panel bounds come from the harness; Chromium for source-connect is Playwright's own context fixture. Report files and check() wrappers give way to test.step. - browser-page.ts shares the shell fixture server, browser-chrome actions, and exact-URL page reads and trusted input between the dialogs and sign-in specs. - Typed input is awaited until it lands before the next action; page lookups match the exact URL. - Sign-in links record clicks so "nothing happened" checks only run after a click landed; the sign-in retry loop and the two-outcome passkey Enter check are gone; the suite is split into two tests so it no longer needs a longer timeout. - source-connect waits for observable effects before asserting a stale callback, a repeated Connect, and the retried inventory left state alone; page errors are asserted at the end. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…the shared harness Launch through the desktop fixture (launchAgainst), so every app quits under a deadline and every profile, ZDOTDIR and temp dir is removed. Replace fixed sleeps with condition waits (journal state, inbox reads, a tmux attachment probe, a control run for relaunch recovery), deliver user input before the agent acts, make tmux required in CI, and drop or merge tests other suites already cover. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…updater and packaged specs onto the shared harness Every spec launches through the desktop fixture with a bounded quit, binds fixtures to loopback, and records checks as test.step. Merges duplicate launches in smoke and continue-sign-in, folds the packaged launch-telemetry check into the offline-page launch, replaces fixed sleeps and one-shot reads with condition waits, and deletes the check-report file report. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…unch, quit and fixture styles
…-parity specs onto the shared harness Browser tools share one app across read-only tests with a disposed provisional scope per test; window-state and sign-out tests launch their own. Fixes focus, fire-and-forget IPC, and load races; drops unasserted screenshots, the duplicate confirm-dialog check, and the fixture-decided terminal test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nch, quit and bundling
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
There was a problem hiding this comment.
All reported issues were addressed across 37 files
Reply with feedback, questions, or to request a fix.
Turn on auto-fix | Re-trigger cubic
[Low impact] The PR appears safe to merge; no new blocking issues were found. SummaryMoves desktop E2E tests onto shared launch, cleanup, browser, and server helpers.
Reviews (3) · Last reviewed commit: "fix(desktop-e2e): correct three migrated..." · Reviewed by Greptile |
This comment has been minimized.
This comment has been minimized.
… per browser-tools test, quit before cleanup
|
@cubic-dev-ai review this PR |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
|
@cubic-dev-ai review this PR |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
Summary
The desktop E2E suite had 22 hand-rolled
electron.launchsites, no shared teardown, and unboundedapp.close()calls, so the same flake patterns kept recurring one spec at a time. This moves every spec onto one harness, fixes the remaining race patterns, and trims tests that caught nothing.Shared harness (
apps/desktop/e2e/harness.ts)desktopfixture:launch/close/tempDir. It tracks every app and temp dir a test creates and tears them all down, even when the test fails midwayElectronApplication.close()waits for exit with no deadline, so a blocked or cancelled quit hung tests to their timeout and then hung worker teardown (the smokeafterEachfailure). Now the quit gets 15s. On a stall it attaches windows, asampleof the main thread, the app's output anddesktop-events.log, kills the process group, and fails the test: a stalled quit is the same path as Cmd+Q, so it's a real bug, not noiseserve(loopback fixture server),focusFirstWindow(waits for OS focus),attachBrowserPanel(bounds follow resizes; replaces 200ms intervals),bundleSimFixture,ToolAuthorizer, andstopAndRemoveProfile, which packaged-smoke now reuses.browser-page.tsandsession-fixture.tsreplace per-spec copiesFlake patterns fixed across specs
sendInputEventwithout waiting for its effect: page-dialogs typing, background-executor I/I2, password-autofillCuts and merges (each deletion is covered elsewhere, or only asserted what its own fixture guaranteed)
local-filessplit from one 25-step test into four, and no longer bundles apps/sim's Settings UIcheck-reportreplaced bytest.step(CI already writes Playwright's JSON report, which survives worker restarts)Speed
CI
forbidOnlyin CIgithubreporter restored (the runner's explicit--reporterdropped failure annotations)SIM_DESKTOP_E2E_MAINand*_REPORT_PATHplumbing removedType of Change
Testing
bun run type-check(desktop) and biome passcheck:unused-exports,check:explicit-any(baseline shrunk),check:comment-hygiene,check:test-patterns,check:utils,check:file-names,check:egress-boundaryand actionlint passChecklist
test-auditauthoring gate)