Comprehensive frontend testing strategy encompassing component tests, visual regression, accessibility, and E2E testing for modern web applications using Vitest, React Testing Library, Playwright, and Storybook.
Anchors:
• Test-Driven Development: By Example (Kent Beck) / Apply: Red-Green-Refactor cycle / Purpose: Guide test-first development workflow
• Testing Library Guiding Principles / Apply: Query priorities and user-centric testing / Purpose: Ensure tests resemble user behavior
• WCAG 2.1 AA Standards / Apply: Automated accessibility testing / Purpose: Ensure inclusive UI components
Trigger:
Use when implementing or improving frontend tests, setting up test infrastructure, debugging failing tests, improving test coverage, or establishing testing best practices for React/Next.js applications.
vitest, react testing library, playwright, storybook, component test, e2e test, visual regression, accessibility testing, test coverage, mock service worker