Repository navigation
test(web): cut e2e specs already proved by integration tests - #228
Merged
Merged
Conversation
Eight web e2e specs, and four tests in two others, checked data and logic through a browser: composition, carried from main, run metrics, timings, the brief, native shots, parity, stale shots, the AI summary limit and the twin banner. Each assertion is now proved by a unit or integration test, or is looks only (theme, phone width). The e2e suite goes from 34 spec files and 69 tests to 26 and 51. Where a browser used to prove the page wiring, a render test does: a small memory-history router helper (src/test/render-routed.tsx) renders components that carry a link. To make pure pieces importable without the Worker runtime, walkAround (the j/k order), the summary counts line, findingsLine and toReviewText moved out of their server or component files unchanged. Two e2e tests in ai-review.spec.ts and the project settings test in twins.spec.ts stay: they need the settings forms, server functions and the stub model pipeline together. admin-health-now.test.ts is merged into admin-health.test.ts, with its fixtures in admin-health-kit.ts to keep the file under the line cap. summary-parse.test.ts stays separate: summary.test.ts is at the cap.
madangryscientist
deleted the
test-web-cut-e2e-specs-already-proved-by
branch
November 13, 2026 23:54
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
The web e2e suite ran 68 tests in 34 spec files. Many of them checked data and logic (a count, a sentence, a rule) through a real browser, slowly, when a render or integration test proves the same thing in milliseconds.
docs/testing.mdsays a behaviour is proved at the lowest layer that can prove it.Change
Eight specs are deleted whole, and three tests are cut from two others. The suite goes from 68 tests in 34 files to 51 in 26 (
bunx playwright test --listinapps/web, before and after).src/test/render-routed.tsxrenders a component that carries a<Link>inside a memory-history router;src/test/snapshot-view.tsandsrc/test/by-test-id.tsare shared fixtures.walkAround(the j/k order, nowlib/review-walk.ts), the summary counts line (lib/summary-counts.ts),findingsLine(now incomposition.tsx), andtoReviewTextis exported.composition,metaandmetricson a shot, the finalise body, the stub's brief answer). No helper file became an orphan: each is still imported by a kept spec.orgs.spec.tsgained one step (the org Timings tab: link,?tab=timingsURL, empty state), because the deletedtimings.spec.tswas the only walk of that wiring.admin-health-now.test.tsis merged intoadmin-health.test.ts(its fixtures moved toadmin-health-kit.tsto stay under the 300-line lint cap).docs/testing.mdstates the new count and lists this cut with what covers each spec.Not done, and kept on purpose
ai/summary-parse.test.tsis not merged intosummary.test.ts.summary.test.tsalready sits at the 300 code-linemax-linescap, so the merge fails lint, and lint rules are not disabled here.ai-review.spec.ts), and "the project settings link a twin project of the same org, and clear it" (twins.spec.ts). They need the hydrated settings forms, their server functions and the stub model pipeline together; no render test reaches that.<BuildBrief>on the build and branch pages in one line each. The component, its words and the data it reads are tested; that the route mounts it is not, short of a browser.Deleted e2e tests and what covers them
composition.spec.ts"one gap and one special case are listed and drawn on the branch shot"components/composition.test.tsx(overlay, row, toggle and legend, focus),components/shot-card.test.tsx(the card's findings line),api/composition.test.tscomposition.spec.ts"a new shot, which nothing measured, still has its boxes, placed on the image's own size"components/composition.test.tsx,api/composition.test.tscarried-from-main.spec.ts"a build held open by differences from main shows them as changed and new"diff/process-open-vs-main.test.ts,diff/process-open-vs-main-page.test.ts,lib/summary-counts.test.ts,lib/review-walk.test.tsmetrics.spec.ts"a diffed build states its wall time, counts and compare time, and the branch its window"components/run-metrics.test.tsx(build card, shot page, branch page),lib/run-card.test.ts,lib/run-metrics.test.ts,lib/branch-metrics.test.tsbrief.spec.ts"a brief is shown as text, and the summary reads the build against it"components/build-brief.test.tsx,components/brief-summary.test.tsx,api/brief.test.ts,ai/summary-brief.test.tsnative.spec.ts"an android import uploads and diffs against its own baseline; web is untouched; a new device is a re-baseline"diff/process-native.test.ts,components/snapshot-side-panel.test.tsx,api/native.test.ts,packages/cli/test/import-native.test.tsparity.spec.ts"the side panel opens the parity view: web and android side by side, no ios twin, a metrics sentence"components/parity-view.test.tsx,components/twins.test.tsx,api/parity.test.tsparity.spec.ts"all three platforms side by side, and an unlinked shot opens the view"components/parity-view.test.tsx,api/parity.test.ts,api/twins.test.tsparity.spec.ts"a web-only project has no Compare platforms link"components/parity-view.test.tsx,components/twins.test.tsxstale.spec.ts"accepting a web change makes the android twin stale until an android shot is accepted"components/stale.test.tsx,db/stale.test.ts,db/stale-review.test.ts,api/stale.test.ts,diff/process-stale.test.ts; accepting is walked by the keptreview.spec.tstimings.spec.ts"a diffed build shows its server timings, and the org's Timings tab their p50 and max"components/build-timings.test.tsx,components/org-timings.test.tsx,db/timings-stats.test.ts; the tab click is the new step inorgs.spec.tstimings.spec.ts"a build shows the CLI's full speed profile in both themes, at desktop and phone width"components/build-timings.test.tsx(the profile); the themes and phone width are looks onlytimings.spec.ts"a build from an older CLI shows its steps and no profile"components/build-timings.test.tsx,lib/timings.test.tstimings.spec.ts"with no build the Timings tab says so, not a row of dashes"components/org-timings.test.tsx; the tab wiring is the neworgs.spec.tsstepai-review.spec.ts"a build with 10 changed shots gets no summary, says why, and offers no Regenerate"components/build-summary.test.tsx(the 9 and 10 changed-shot boundary)ai-review.spec.ts"with no model a changed shot is reviewed as plain pixels"components/ai-notes.test.tsx,diff/process.test.tstwins.spec.ts"a web and an android shot of one name and theme are twins; an android-only one is unlinked"components/twins.test.tsx,db/twins.test.ts,api/twins.test.tsHow it was tested
From the worktree:
bun install,bun run typecheck,bun run lint(includescheck-dashes),bun run format:checkandbunx nx test web --skip-nx-cacheall pass. No browser was used;bunx playwright test --listgave the counts. The one new e2e step (orgs.spec.ts) runs in the CI web job.