Repository navigation
feat(tests): number screenshots by test declaration order - #628
Merged
Merged
Conversation
Screenshots are prefixed with the declaration index of their test (001-<name>.png) so a folder sorts like its test file or suite. The Vitest shim counts its tests; the Playwright app test is wrapped to count declarations (per test file and per describe) into an annotation, keeping the test locations of the declaring files. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
JulienChampagnol
marked this pull request as ready for review
December 3, 2026 11:15
This was referenced Dec 3, 2026
MaxNumerique
approved these changes
Dec 3, 2026
SpliiT
approved these changes
Dec 3, 2026
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.
Summary
Screenshots are prefixed with the declaration index of their test (
001-<name>.png), so a screenshot folder sorts like its test file or suite.tests/browser/shim/fixtures.ts): counts the tests declared in each file.tests/browser/helpers/app_test.ts): wrapped byorderedTest(screenshot_order.ts). Each declaration gets ascreenshotIndexannotation, whichscreenshotPathreads. The wrapper also wraps the result of.extend(), so the apps' tests (Vease, PEGGHy) are numbered too. Numbering restarts at each test file (test.use({ suiteId })) and at eachdescribe(one folder per shared suite).test.skip/fixme/fail/onlydeclarations count too, so the numbers stay the same with--grep, retries and skipped tests.caller_location.ts): Playwright takes the location of a test, describe orusefrom the frame calling it, so a plain wrapper would locate every test in the wrapper. That breakstestInfo.file, report links and VS Code navigation. While the wrapper calls Playwright, the stack traces Playwright captures get extra frames and lose the wrapper's, so the declaring file is kept.tests/browser/tests/screenshotsare renamed only (402git mv, images unchanged).Testing
grid_scalebrowser suite passes against the renamed baselines.controller+ thegrid_scaleshared suite (Playwright, linked to this branch) pass against renamed baselines, with correct test locations.Follow-ups
The Vease and PEGGHy baseline renames are on
feat/ordered_screenshotsin each repo, to push once this is released.🤖 Generated with Claude Code