Skip to content

test(e2e): per-test capture + custom HTML result index#5

Merged
samutpra merged 7 commits into
mainfrom
feat/e2e-result-capture-index
Jun 11, 2026
Merged

test(e2e): per-test capture + custom HTML result index#5
samutpra merged 7 commits into
mainfrom
feat/e2e-result-capture-index

Conversation

@samutpra

Copy link
Copy Markdown
Contributor

Summary

  • Capture screenshot + video + trace on every Playwright test (was failure-only) and emit a JSON reporter to e2e-results/results.json.
  • New dependency-free Node ESM generator (scripts/generate-e2e-index.mjs + pure logic in scripts/lib/e2e-index-format.mjs) reads that JSON, copies each test's artifacts into a self-contained e2e-results/assets/<spec-id>/ folder, and writes e2e-results/index.html — a per-test table grouped by spec file with status badge, thumbnail, inline video, and trace access (show-trace command + deep-link into the Playwright HTML report's trace viewer).
  • Wiring: test:e2e:index (regenerate from last run) and test:e2e:full (run suite then generate, ;-separated so it builds even on failures); e2e-results/ gitignored.
  • Unit-tested pure logic via node:test (5 tests). Local-only tooling — no app/runtime, CI, or new dependencies.

Spec & plan: docs/superpowers/specs/2026-06-11-e2e-result-capture-index-design.md, docs/superpowers/plans/2026-06-11-e2e-result-capture-index.md.

A final code review caught and fixed a critical bug: the test id is read from the spec object (JSONReportSpec.id), not the test object — otherwise all artifacts collapsed into one assets/unknown/ folder.

Test Plan

  • node --test scripts/lib/e2e-index-format.test.mjs — 5/5 pass
  • Generator verified against a synthetic results.json (unique per-test asset folders, correct links)
  • Missing-results guard exits 1 with a clear message
  • Live run (needs DEV backend on :4000): bun run test:e2e:full -- e2e/tests/clusters/cluster-list.spec.ts then open e2e-results/index.html — confirm thumbnail, inline video, and trace link per row

🤖 Generated with Claude Code

samutpra and others added 7 commits June 11, 2026 10:30
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…dex)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@vercel

vercel Bot commented Jun 11, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
carmen-platform-uat Building Building Preview, Comment Jun 11, 2026 4:00am

@samutpra samutpra merged commit 66fbbc8 into main Jun 11, 2026
6 of 7 checks passed
@samutpra samutpra deleted the feat/e2e-result-capture-index branch June 11, 2026 04:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant