Repository navigation
refactor: split screenshot test fixtures from test_utils - #1669
Open
VLukiantsev wants to merge 1 commit into
Open
VLukiantsev wants to merge 1 commit into
VLukiantsev wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Code Review
This pull request refactors the screenshot test utilities by extracting mock data into separate fixture files (mock_experiment_fixtures.ts, mock_platform_fixtures.ts, and mock_work_unit_fixtures.ts) and simplifying the route mocking logic in test_utils.ts using a centralized route map. One issue was identified in the mock platform fixtures where sessionExpiresAt is defined in seconds instead of milliseconds, which could cause mock sessions to be interpreted as expired in JavaScript/TypeScript environments.
VLukiantsev
force-pushed
the
refactor/split-screenshot-test-utils
branch
2 times, most recently
from
November 13, 2026 08:22
48f65ef to
5284998
Compare
VLukiantsev
force-pushed
the
refactor/split-screenshot-test-utils
branch
from
November 13, 2026 09:19
5284998 to
d545c5b
Compare
VLukiantsev
force-pushed
the
refactor/split-screenshot-test-utils
branch
2 times, most recently
from
November 13, 2026 10:56
e02a1fc to
e129983
Compare
VLukiantsev
force-pushed
the
refactor/split-screenshot-test-utils
branch
from
November 13, 2026 11:58
e129983 to
3239581
Compare
VLukiantsev
force-pushed
the
refactor/split-screenshot-test-utils
branch
3 times, most recently
from
November 13, 2026 14:12
43cc6d0 to
c9d4191
Compare
VLukiantsev
force-pushed
the
refactor/split-screenshot-test-utils
branch
2 times, most recently
from
November 16, 2026 08:37
135bc74 to
df5f21b
Compare
VLukiantsev
force-pushed
the
refactor/split-screenshot-test-utils
branch
from
November 16, 2026 09:17
df5f21b to
2c7b568
Compare
VLukiantsev
force-pushed
the
refactor/split-screenshot-test-utils
branch
from
November 16, 2026 11:13
2c7b568 to
b12b8c7
Compare
VLukiantsev
force-pushed
the
refactor/split-screenshot-test-utils
branch
from
November 16, 2026 11:44
b12b8c7 to
9dde612
Compare
VLukiantsev
force-pushed
the
refactor/split-screenshot-test-utils
branch
from
November 16, 2026 12:36
9dde612 to
fc5730d
Compare
VLukiantsev
marked this pull request as ready for review
November 16, 2026 19:21
VLukiantsev
force-pushed
the
refactor/split-screenshot-test-utils
branch
2 times, most recently
from
November 16, 2026 20:08
de3cc3e to
ac15b73
Compare
TAG=agy CONV=ba8411ef-c093-4f45-950a-b3bc1899268c
VLukiantsev
force-pushed
the
refactor/split-screenshot-test-utils
branch
from
November 17, 2026 11:37
ac15b73 to
8899aca
Compare
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.
Summary
Split
cmd/ui/screenshot_tests/test_utils.ts(1,064 lines) into cohesive Playwright mock fixture modules (mock_platform_fixtures.ts,mock_experiment_fixtures.ts,mock_work_unit_fixtures.ts) and a table-driven route setup helper intest_utils.ts.Motivation & Context
Removing 16 duplicate route handler wrappers and splitting fixtures below 600 lines unblocks strict
max-linesenforcement across UI test and screenshot files.Key Changes
Modified/added 4 file(s):
cmd/ui/screenshot_tests/mock_experiment_fixtures.tscmd/ui/screenshot_tests/mock_platform_fixtures.tscmd/ui/screenshot_tests/mock_work_unit_fixtures.tscmd/ui/screenshot_tests/test_utils.tsAssumptions
setupMockRoutesandsetupScreenshotEnvironmentsignatures keeps all six*.screenshot.spec.tsfiles working with zero import edits — confirmed by repo-wide grep and TypeScript compilation — fixture data remains identical.Verification & Testing
format:check,npm run lint,tsc --noEmit(tsconfig.jsonandtsconfig.spec.json),check_file_naming.py, and 315/315 Bazel tests passed via.githooks/pre-commit.Related Issues / Bugs
TAG=agy
CONV=ba8411ef-c093-4f45-950a-b3bc1899268c
Stack created with GitHub Stacks CLI • Give Feedback 💬