Skip to content

test(web): M8 Playwright E2E harness, journeys, and a11y gates (T-117, T-118, T-114) - #330

Merged
CodewithJha merged 13 commits into
mainfrom
test/m8-e2e-t117-t118-t114
Nov 22, 2026
Merged

CodewithJha merged 13 commits into
mainfrom
test/m8-e2e-t117-t118-t114

Conversation

@CodewithJha

Copy link
Copy Markdown
Owner

Summary

  • Adds compose-backed Playwright harness (web/e2e/, playwright.config.ts, scripts/e2e_stack.sh) with seeded warehouse fixture, axe helper, and failure artefacts.
  • Journey specs: create campaign, investigate casebook/replay/report, atlas probe-here, trials comparison, campaign controls, plus route axe/keyboard sweep.
  • CI: new e2e.yml, size-limit on build-web, nightly Lighthouse on live stack; documents evidence in docs/evidence/T-114-a11y.md.
  • Appends api service to compose (required by nginx → api:8000 proxy).

Test plan

  • pnpm typecheck / ESLint on e2e/
  • pnpm build + pnpm size-limit (148 KB gzip initial JS)
  • e2e.yml Playwright job on GitHub (Docker + seed)
  • Nightly Lighthouse job

Closes #186
Closes #187
Closes #188

Assumptions

  • E2E stack resets compose volumes on each e2e_stack.sh up for deterministic seed load.
  • Colour-contrast axe rule stays disabled (matches existing Vitest component tests).

CodewithJha and others added 6 commits November 22, 2026 23:59
…, T-114)

Compose-backed global setup with seeded warehouse fixture, journey specs, axe
sweep, e2e.yml, Lighthouse nightly, and size-limit bundle gate on build-web.
Compose --wait marks the one-shot migrate container healthy immediately; use compose wait migrate like make up.
…(T-117)

Migrate and readiness checks need alembic/ on /app when roboprobe is installed from the wheel.
@CodewithJha
CodewithJha enabled auto-merge (squash) November 22, 2026 19:07
@CodewithJha
CodewithJha merged commit 9669e5f into main Nov 22, 2026
21 of 22 checks passed
@CodewithJha
CodewithJha deleted the test/m8-e2e-t117-t118-t114 branch November 22, 2026 19:20
CodewithJha pushed a commit that referenced this pull request Nov 22, 2026
Keep the Playwright stack shipped on main (#330) and drop the duplicate
web-e2e overlay files from this branch.
cursor Bot pushed a commit that referenced this pull request Nov 22, 2026
Refresh testing, CI, config, and traceability docs for the T-117 browser
harness landed in #330. Ignore Playwright artefacts in Docker builds and
Prettier. Keep T-091 on the PR-02 traceability row after #335.

Co-authored-by: Priyanshu Jha <CodewithJha@users.noreply.github.com>
cursor Bot pushed a commit that referenced this pull request Nov 22, 2026
Refresh testing, CI, config, and traceability docs for the T-117 browser
harness landed in #330. Ignore Playwright artefacts in Docker builds and
Prettier. Keep T-091 on the PR-02 traceability row after #335.

Extend the API Compose healthcheck window for cold E2E stack starts.
cursor Bot pushed a commit that referenced this pull request Nov 22, 2026
#347)

## Summary

Give seeded Playwright and Lighthouse runs dedicated Compose projects,
temporary credentials, and scratch storage. Preserve the full Chromium
suite and run the seeded Bench smoke in Chromium and Firefox.

The casebook journey also exercises report generation. Legacy JSON atlas
artifacts are loaded with the same typed chart data as current NPZ
artifacts, and the app fetches report preview and download bytes with
its bearer session.

## Changes

- Run migrations, load the shared seed, and verify readiness through the
authenticated production stack. Remove only containers and volumes
belonging to the test project.
- Keep the historical seeded campaign readable. Register the shipped
warehouse definition through the API and use the returned version for
new Wizard campaigns. Return a field-level validation error if an older
registered version no longer matches its task files.
- Exercise the Casebook medoid, every strategy in Trials, and the full
export journey. Verify the sandboxed frame contains the generated
campaign report and check the report HTML, the Run parameter graphic,
and keyboard navigation.

References #186, #187, #188, #330, #332, and #334. GitHub recorded #186
closed before this patch.

## Verification

- All 36 Chromium tests passed against the isolated production stack,
including the complete report export journey and 30 accessibility checks
across light and dark themes.
- Firefox seeded Bench smoke passed against the same production setup.
- All 290 web unit tests passed with 83.6% line coverage. All 77 focused
backend tests passed, including legacy report data and stale scenario
versions. Strict Python and TypeScript checks passed.
- The stack wrapper propagated a deliberate child failure and then left
no containers or volumes in its test project. It rejected the default
Compose project name before calling Docker.

---------

Co-authored-by: CodewithJha <155089480+CodewithJha@users.noreply.github.com>
cursor Bot pushed a commit that referenced this pull request Nov 22, 2026
…334)

## Summary

Recover the verified isolated browser stack after #330 landed its
parallel E2E suite. The new setup uses a dedicated Compose project,
temporary credentials and scratch volumes. It rejects shared project
names before starting or removing anything.

## Changes

- Preserve the existing Chromium journey and accessibility specs, and
run the seeded Bench smoke in both Chromium and Firefox.
- Inject the disposable API session into browser fixtures and run
Lighthouse through the same safe stack lifecycle.
- Keep CI failure artifacts and include setup output when Compose fails.
Fix Node 24 JSON imports so the existing specs can load.

This follows up on #186 and the browser test code in #330 and #332.
GitHub records #186 as manually closed before these fixes reached main.

## Test evidence

- Real seeded Chromium and Firefox smoke tests passed on the reconciled
stack in 2m28s, including axe, CSP and keyboard Console navigation.
- Strict TypeScript and web lint passed. The isolated wrapper rejects
the default Compose project before executing Docker.
- The preserved Chromium sweep passed eight routes, then exposed an ARIA
violation on the Run page and a focus assertion failure on Trials. These
gates remain enabled while the failures are addressed.

## Rollback

The production stack and its runtime files are outside this change. The
browser test runner owns its Compose resources and removes them after
the run.

Co-authored-by: CodewithJha <155089480+CodewithJha@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant