Vv/test automation - #264
Conversation
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | ||
| - name: Use Node.js | ||
| uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0 | ||
| with: | ||
| node-version-file: .nvmrc | ||
| - name: Cache pnpm modules | ||
| uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4 | ||
| env: | ||
| cache-name: cache-pnpm-modules | ||
| with: | ||
| path: ~/.pnpm-store | ||
| key: ${{ runner.os }}-verify-${{ env.cache-name }}-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-verify-${{ env.cache-name }}- | ||
| - uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0 | ||
| with: | ||
| version: 10.26.1 | ||
| run_install: false | ||
| - name: Install dependencies | ||
| run: pnpm install --frozen-lockfile | ||
| - name: 🔍 Lint harness | ||
| run: pnpm exec eslint test | ||
| - name: 🧪 Cross-adapter capture parity | ||
| run: pnpm verify |
Greptile SummaryThis PR adds a cross-adapter trace verification and visual-regression harness.
Confidence Score: 4/5The PR appears safe to merge, with a non-blocking gap where missing fixtures for ready matrix entries can silently remove adapter coverage. The committed ready fixtures are present and the new harness exercises them, but fixture presence is not enforced, so future matrix changes can pass CI without running the intended parity assertion. Files Needing Attention: test/capture/capture-parity.test.ts
|
| Filename | Overview |
|---|---|
| .github/workflows/verify.yml | Adds a pull-request gate that installs dependencies, lints the harness, and runs capture-parity verification. |
| test/capture/capture-parity.test.ts | Validates committed traces through the production reader, but silently skips ready entries when their fixture is missing. |
| test/capture/matrix.ts | Centralizes regeneration commands and output paths for five ready combinations and one planned Nightwatch Cucumber combination. |
| test/regen.ts | Cleans adapter outputs, runs examples in trace mode, and refreshes committed golden fixtures with explicit failure reporting. |
| test/capture/summarize.ts | Produces deterministic structural summaries of reconstructed traces for snapshot comparison. |
| test/visual/player.e2e.ts | Serves each fixture and captures full-player and per-panel visual snapshots. |
| test/visual/wdio.conf.ts | Configures single-instance headless Chrome visual testing and committed baseline lookup. |
| examples/nightwatch/cucumber/nightwatch.cucumber.conf.cjs | Adds a Nightwatch Cucumber example while explicitly retaining the known trace-export limitation. |
| package.json | Exposes verification, regeneration, and visual-test commands and adds the visual-service tooling dependency. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart LR
E[Adapter examples] -->|fixtures:regen| Z[Committed trace.zip fixtures]
Z --> R[Backend trace reader]
R --> S[Capture summaries]
S --> V[Vitest snapshots]
R --> B[Fixture-backed server]
B --> P[Trace player]
P --> I[Visual baselines]
V --> C[CI verify gate]
Reviews (1): Last reviewed commit: "test(visual): enforce WebDriver Classic ..." | Re-trigger Greptile
| const fixture = fixtureTrace(entry.id) | ||
| const present = existsSync(fixture) | ||
|
|
||
| describe.skipIf(!present)(`${entry.label} [${entry.id}]`, () => { |
There was a problem hiding this comment.
A ready matrix entry without its committed test/fixtures/<id>/trace.zip causes this entire suite to be skipped while pnpm verify still succeeds, removing capture-parity coverage for that adapter without failing CI. Require fixtures for ready entries, reserving skip behavior for entries explicitly marked as planned.
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
What & why
Type of change
Packages touched
shared(types and contracts)core(framework-agnostic capture/reporting)service(WebdriverIO adapter)nightwatch-devtools(Nightwatch adapter)selenium-devtools(Selenium adapter)backend(server)app(UI)script(page-injected runtime)Notes for reviewers
Screenshots / recordings