Repository navigation
Harness: one diff-mode test per scenario - #413
Open
agorischek wants to merge 3 commits into
Open
agorischek wants to merge 3 commits into
agorischek wants to merge 3 commits into
Conversation
A test per renderer walked all 34 graph scenarios in both color modes and outgrew test.slow()'s 360 s on CI's Linux WebKit. One test per scenario gets a scenario's budget, and the shards split the walk. Refs #363 Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟢 Approval recommended
There are no active review issues blocking the per-scenario diff-mode test refactor.
No open issues 🎉
What changed in this PR
Splits the renderer harness’s diff-mode checks into per-scenario tests to address Linux WebKit timeouts as scenario coverage grows.
Changes:
- Gives each scenario its own default test budget, removing
test.slow(). - Enables scenarios to be distributed across parallel shards.
- Preserves light/dark checks, assertions, and optional screenshots.
| File | Description |
|---|---|
packages/renderers/harness/browser/diff.spec.ts |
Registers one diff-mode test per scenario instead of per renderer. |
Review effort: Balanced
This branch has not been deployed
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.
What changed
packages/renderers/harness/browser/diff.spec.tsnow runs one diff-mode test per scenario (graph/<id>: diff mode marks every change in its own form, likewise for the other six renderers) instead of one test per renderer. Each test checks the light and dark color modes and gets the default per-test budget (120 s in CI), withouttest.slow().The graph test walked all 34 graph scenarios in both color modes in a single test, and timed out at its 360 s budget on CI's Linux WebKit on #363 (webkit-desktop) and on #394 (webkit-mobile), which touches no rendering. Recent merges added heavy scenarios such as
terraform-modules-nat-per-az(#377), and the walk now sits at the edge of its budget. One test per scenario gets one scenario's budget, andfullyParallelsharding spreads the walk across shards.The bundled fonts aren't the cause. WebKit loads both faces without hitting the 3 s fallback in
connectRenderer. Before #363 (56f1a06), opening all 34 graph scenarios once took 45.9 s; with it, 47.4 s (+3%, within run-to-run noise). The whole old test took 1.8 min locally either way.Refs #363
Evidence
Measured on a 2-core Linux machine with
CI=1:npx playwright test browser/diff.spec.ts -g "graph/.*diff mode" --project=webkit-desktop: 34 passed (2.3 min with 2 workers). Per scenario: median ~6 s; slowestterraform-modules-nat-per-az21.4 s,module-graph-hub-heavy-now17.2 s,npm-express-516.4 s.npx playwright test browser/diff.spec.ts --project=chromium-desktop: 98 passed (4.6 min with 2 workers). Graph per scenario: 3.2–11.6 s (slowestterraform-modules-nat-per-az).tools check --fast: pass.Not run here: webkit-mobile, chromium-mobile, and the macOS jobs.
pages are regenerated (
npm run docs:generate). (None affected.)changelog.d/<this PR's number>.mddescribes whatusers will notice, or the PR has the
no changeloglabel (seechangelog.d/README.md).