Commit f4b2bec
Add comprehensive sitemap-based QA testing
This commit adds a comprehensive test suite that automatically discovers
and tests ALL pages in the site from the sitemap. This addresses the need
for deeper validation during site restructuring.
**New Features:**
1. **Comprehensive Test Suite** (tests/comprehensive.spec.ts):
- Automatically discovers all pages from sitemap
- Tests every page for:
* Successful page load
* Valid title and content
* Exactly one H1
* Proper heading hierarchy
* Alt text on all images
* No duplicate IDs
* Accessible link labels
- Two modes:
* Full mode (CI): Tests ALL pages
* Sample mode (local): Tests ~5 representative pages
2. **New Commands:**
- `just qa-quick` / `npm run qa:quick` - Sample mode for quick feedback
- `just qa-full` / `npm run qa:full` - Full comprehensive + core tests
- `just qa-comprehensive` - Only comprehensive sitemap tests
- `just qa-core` - Only core tests (navigation, accessibility, etc.)
3. **Dependencies:**
- Added xml2js for sitemap parsing
- Added @types/xml2js for TypeScript support
4. **Documentation:**
- Updated tests/README.md with comprehensive suite info
- Added summary of test coverage and link validation
- Added recommended workflows for different scenarios
- Documented maintenance implications
**Benefits:**
- Automatically adapts as content is added (no maintenance needed)
- Catches structural issues across entire site
- Perfect for validating site reorganization
- Can run in sample mode for quick local feedback
- Complements existing link validation (validate-links.js)
**Current Site Coverage:**
- 23 total pages in sitemap
- Sample mode: tests 5 pages (~22%)
- Full mode: tests all 23 pages (100%)
- 5 tests per page × 5 browsers = 25 test executions per page
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent 31fffcf commit f4b2bec
5 files changed
Lines changed: 426 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
111 | | - | |
| 111 | + | |
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
115 | 131 | | |
116 | 132 | | |
117 | 133 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
22 | | - | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
23 | 27 | | |
24 | 28 | | |
25 | 29 | | |
| |||
61 | 65 | | |
62 | 66 | | |
63 | 67 | | |
| 68 | + | |
64 | 69 | | |
65 | 70 | | |
66 | | - | |
| 71 | + | |
| 72 | + | |
67 | 73 | | |
68 | 74 | | |
0 commit comments