Skip to content

test(atomic-a11y): add E2E smoke test for report generation pipeline#7141

Draft
y-lakhdar wants to merge 1 commit intofeat/a11y-reporterfrom
feat/a11y-reporter-e2e-smoke-test
Draft

test(atomic-a11y): add E2E smoke test for report generation pipeline#7141
y-lakhdar wants to merge 1 commit intofeat/a11y-reporterfrom
feat/a11y-reporter-e2e-smoke-test

Conversation

@y-lakhdar
Copy link
Contributor

Summary

Adds a standalone E2E smoke test script that validates the full report generation pipeline end-to-end. Split out from #7123 to keep the reporter source PR reviewable.

What's Included

  • scripts/e2e-report-smoke.ts — Standalone E2E script (not a vitest test)
  • package.json — Added test:e2e-smoke script entry
  • 157 lines total (additions only)

What It Tests

The script exercises the complete pipeline:

  1. Spawns a real vitest child process with the a11y reporter configured
  2. Runs against a minimal test fixture
  3. Validates the generated JSON report structure
  4. Checks shard metadata, component results, and WCAG criteria mappings
  5. Cleans up generated artifacts

Design Decisions

  • Uses child_process.execSync — tests the reporter as a black box
  • Not a vitest test itself (avoids circular dependency of testing a vitest reporter with vitest)
  • Validates report schema, not pixel-perfect content

How to Run

cd packages/atomic-a11y && pnpm test:e2e-smoke

Related

Standalone script that verifies the full pipeline:
  test:storybook -> VitestA11yReporter -> a11y-report.json

Validates report structure, content, and isA11yReport() guard.
Runs only atomic-search-box stories for speed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant