feat: consolidate Playwright visual test suite#140
Merged
nvandessel merged 1 commit intomainfrom Feb 20, 2026
Merged
Conversation
Migrate scattered test scripts into an organized test suite with shared helpers, a suite runner, and a Makefile target. All 56 assertions pass across 3 test files (focus, drag, electric). - Create scripts/tests/helpers.js with shared utilities (makeCounter, launchBrowser, waitForGraph with physics settle, startServer, etc.) - Migrate test-focus.js and test-drag.js from scripts/ to scripts/tests/, refactored to use shared helpers - Recreate electric mode test from deleted test_electric.mjs + test_sparks.mjs, converted to CJS with no hardcoded paths - Add run-all.sh suite runner (builds, generates HTML, runs all tests) - Add `make graph-test` Makefile target - Screenshots output to build/playwright/ (gitignored) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Greptile SummaryConsolidates scattered Playwright test scripts into a unified test suite under Key changes:
Migration details:
Confidence Score: 5/5
|
| Filename | Overview |
|---|---|
| scripts/tests/helpers.js | New shared helper module for Playwright tests with browser launch, graph waiting, server management, and assertion utilities |
| scripts/tests/test-focus.js | Migrated from scripts/, refactored to use shared helpers, removed inline utilities |
| scripts/tests/test-drag.js | Migrated from scripts/, refactored to use shared helpers for browser and assertions |
| scripts/tests/test-electric.js | New test recreated from deleted test files, validates electric mode activation, animation, and spark rendering |
| scripts/tests/run-all.sh | New suite runner that builds binary, generates HTML, and runs all 3 test files with summary reporting |
| Makefile | Added graph-test target that invokes the new test suite runner script |
| .beads/issues.jsonl | Updated issue tracking metadata (timestamps, priorities, status changes) |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[make graph-test] --> B[run-all.sh]
B --> C[Install Playwright]
B --> D[Build floop binary]
B --> E[Generate graph.html]
C --> F[Run test suite]
D --> F
E --> F
F --> G[test-focus.js]
F --> H[test-drag.js]
F --> I[test-electric.js]
G --> J[helpers.js]
H --> J
I --> J
J --> K[makeCounter]
J --> L[launchBrowser]
J --> M[waitForGraph]
J --> N[waitForElectric]
J --> O[startServer]
G -->|36 assertions| P[Screenshots]
H -->|2 assertions| P
I -->|18 assertions| P
P --> Q[build/playwright/*.png]
Last reviewed commit: 5f0c499
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
scripts/tests/with shared helpers, a suite runner, andmake graph-testtargettest-focus.jsandtest-drag.jsfromscripts/, recreate electric mode test from deletedtest_electric.mjs+test_sparks.mjs(CJS, no hardcoded paths)Test plan
make graph-testruns full suite — 3/3 passNODE_PATH=build/node_modulesbuild/playwright/(gitignored)startServer()helper🤖 Generated with Claude Code