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>
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