Testing Strategy
apps/docs/src/content/docs/architecture/testing Click to copy Copied!
apps/docs/src/content/docs/architecture/testing WC-2026 follows a comprehensive testing strategy designed for enterprise healthcare compliance.
Testing Pyramid
Section titled “Testing Pyramid” ╱╲ ╱ ╲ E2E Tests (Playwright) ╱────╲ Visual Regression (Chromatic) ╱ ╲ ╱────────╲ Integration Tests ╱ ╲ Accessibility Audits (axe-core) ╱────────────╲ ╱ ╲ Unit Tests (Vitest 4.x Browser Mode) ╱────────────────╲Test Types
Section titled “Test Types”Unit Tests - Vitest 4.x Browser Mode
Section titled “Unit Tests - Vitest 4.x Browser Mode”- Real DOM testing (not jsdom)
- Component lifecycle testing
- Reactive property testing
- Event handling verification
Visual Regression - Chromatic
Section titled “Visual Regression - Chromatic”- Automated screenshot comparison
- Cross-browser consistency
- Theme variation testing (light/dark/high-contrast)
- Responsive breakpoint verification
Accessibility - axe-core
Section titled “Accessibility - axe-core”- Automated WCAG 2.1 AA compliance checks
- Color contrast verification
- ARIA attribute validation
- Keyboard navigation testing
Integration Tests
Section titled “Integration Tests”- Component composition testing
- Slot content rendering
- Form participation (ElementInternals)
- Drupal Behaviors integration
Coverage Targets
Section titled “Coverage Targets”| Category | Target |
|---|---|
| Unit tests | >90% line coverage |
| Accessibility | 100% axe-core pass |
| Visual regression | All component variants |
| Integration | Critical user flows |
See the Pre-Planning Component Architecture for detailed testing patterns.