Skip to content

e2e: Playwright + axe browser regressions in CI; a11y contrast fix (#14)#15

Merged
code-with-rashid merged 2 commits into
mainfrom
qa/issue-14-e2e
Jun 23, 2026
Merged

e2e: Playwright + axe browser regressions in CI; a11y contrast fix (#14)#15
code-with-rashid merged 2 commits into
mainfrom
qa/issue-14-e2e

Conversation

@code-with-rashid

Copy link
Copy Markdown
Owner

Addresses #14 items 4 (browser e2e in CI) and 5 (color contrast). Items 1–3 (expand mutation, continuous 1M-exec fuzz, throughput-SLO load) remain open in #14.

Playwright + axe e2e (item 4)

A real-browser regression suite (e2e/, 13 tests) wired into CI via playwright install --with-deps chromium (.github/workflows/e2e.yml). This permanently guards the bugs that only a real browser exposed — previously verified only manually:

  • Security: XSS escaped/not-executed; CSRF rejected cross-origin AND cross-port-loopback (BUG-N — the exact vector that needed a real browser to find); X-Frame-Options: DENY + CSP on every response (BUG-M).
  • Editor: save writes + sidebar updates; Esc from the path input and Ctrl+Enter (BUG-O); traversal refused with nothing written outside; double-click → one uncorrupted file.
  • a11y: axe-core = 0 WCAG 2 A/AA violations on the main view, editor, and light theme (BUG-P), plus checks that the spec dropdown is labeled and an <h1> exists.

Color contrast (item 5)

Fixed the axe serious contrast finding at root: raised --dim/--dimmer in both themes (dark --dimmer was ~2.6:1) and gave the light-theme run button white text (dark text on the dark-green lime was 4:1). axe now reports 0 contrast violations in both themes.

Drive-by: fix a flaky test

fuzz.test.ts INV-4 asserted a wall-clock slowest < 100ms, which spikes under parallel-suite load (it failed intermittently). Replaced with a deterministic structural ReDoS check (the regex must never contain adjacent [^/]+[^/]+); the loop still .test()s a 5000-char hostile path, so a real ReDoS trips the vitest timeout.

Verification

312 vitest tests green (twice, no flake), typecheck 7/7, e2e 13/13 locally.

…ast & a flaky fuzz

Addresses Issue #14 items 4 (browser e2e in CI) and 5 (color contrast).

- e2e/ Playwright suite (13 tests) + .github/workflows/e2e.yml (playwright
  install --with-deps chromium). Permanently guards the browser-only bugs that
  node coverage can't reach:
  - CSRF rejected cross-origin AND cross-port-loopback (BUG-N), X-Frame-Options
    + CSP (BUG-M), XSS escaped/not-executed
  - editor save + keyboard (Esc from path input, Ctrl+Enter — BUG-O), traversal
    refused, double-click re-entrancy
  - axe-core = 0 WCAG 2 A/AA violations on main/editor/light-theme (BUG-P)
- Color contrast fixed at root (styles.css): raised --dim/--dimmer in both themes
  (dark --dimmer was ~2.6:1) and gave the light-theme run button white text
  (dark-on-dark-lime was 4:1). axe reports 0 contrast violations.
- Fix flaky fuzz.test.ts INV-4: replace the load-sensitive wall-clock assertion
  with a deterministic structural ReDoS check (no adjacent [^/]+[^/]+); the loop
  still tests a 5000-char hostile path so a real ReDoS trips the test timeout.

Full suite green twice (no flake), typecheck 7/7, e2e 13/13.
…r the web server

The e2e job built only @truspec/web, but its server imports the built
@truspec/core; on a clean CI checkout core/dist did not exist. Verified by
wiping all dist/ locally, running pnpm build, and passing 13/13 e2e.
@code-with-rashid code-with-rashid merged commit 9958c76 into main Jun 23, 2026
3 checks passed
@code-with-rashid code-with-rashid deleted the qa/issue-14-e2e branch June 23, 2026 13:31
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