test: add unit/component tests, E2E, and a11y + Lighthouse CI - #157
Draft
majicmaj wants to merge 1 commit into
Draft
test: add unit/component tests, E2E, and a11y + Lighthouse CI#157majicmaj wants to merge 1 commit into
majicmaj wants to merge 1 commit into
Conversation
Establishes frontend testing from zero: - Vitest + React Testing Library + MSW setup (src/test/), plus: - DurationUtils / FilterEngine pure-logic unit tests - DurationInput component test (RTL + user-event + axe) - Playwright E2E for the critical flows (signup, create -> complete) on desktop + mobile, auto-starting both servers (playwright.config.js) - axe-core a11y scans of the critical pages with a known-issue baseline that catches NEW regressions (e2e/a11y.spec.js) - Lighthouse CI (advisory, never blocks) for PWA/a11y/perf - CI: run unit tests on every push; E2E + Lighthouse on PRs to develop; re-enabled lint as advisory Also adds accessible labels to DurationInput (caught by the axe test). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
KhyFee
reviewed
Aug 3, 2026
KhyFee
left a comment
There was a problem hiding this comment.
Strong testing bootstrap — Vitest/RTL/MSW + Playwright E2E + axe + advisory Lighthouse is a solid FE quality stack.
What’s working well
- Blocking unit tests in
build.ymlwhile keeping lint/Lighthouse advisory (continue-on-error) is a pragmatic ratchet. - E2E limited to PRs targeting
develop, backend pin, Playwright report upload, and chromium-only a11y scans (with an allowlist that you plan to shrink) are all good calls. - Component-level
vitest-axeonDurationInputcatches issues earlier than full-page scans.
Review notes
- Artifacts on failure: upload
test-results/(traces/screenshots) ine2e.ymlwithif: failure()in addition to the HTML report — much faster flake triage. npm ivsnpm ci: build/test jobs usenpm iwhile e2e usesnpm ci. Prefernpm cieverywhere in CI for lockfile-faithful installs.- Axe allowlist: keep the excluded rule IDs listed in
TESTING.mdwith owners/tickets so the list doesn’t become permanent debt. - Backend pin:
ref: developondonetick/donetickcan break FE PRs when backend moves. Consider pinning a SHA (or documenting that e2e failures may be cross-repo).
None of these are merge blockers — happy to see this land and ratchet lint to blocking once clean.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Frontend testing from zero — the FE half of a testing initiative (Phases 1–3).
Unit / component (Vitest + RTL + MSW)
src/test/— Vitest setup, MSW server,renderWithProvidershelper.DurationUtils/FilterEnginepure-logic tests (the filtering that decides which tasks a user sees).DurationInputcomponent test — RTL + user-event + axe (a11y).E2E (Playwright)
playwright.config.js).Accessibility (axe-core)
e2e/a11y.spec.jsscans the critical pages, gating on critical/serious with a known-issue baseline so it catches NEW regressions today and tightens as the shadcn migration lands.DurationInput(a real gap the axe test caught).Lighthouse (advisory)
lighthouserc.json+ workflow — PWA/a11y/perf signal, allwarn, never blocks.CI
develop; re-enabled lint as advisory.Selectors survive the shadcn migration
Everything queries by accessible role/label/text, not MUI Joy DOM.
🤖 Generated with Claude Code