Add axe-core accessibility tests for the onboarding UI flow. Tests walk through the onboarding steps and scan for WCAG 2.1 AA violations at each step. - Tests cover main onboarding flow steps (connect, WiFi, placement, complete) - Tests cover re-provision mode and error states - Tests mock hardware APIs (Web Serial, WebSocket) to avoid dependencies - Each test fails if WCAG 2.1 AA violations are found - Tests can be run with: npx playwright test a11y-onboarding Co-Authored-By: Claude <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| css | ||
| js | ||
| static | ||
| test-results | ||
| tests | ||
| ambient.html | ||
| fleet.html | ||
| help_articles.json | ||
| index.html | ||
| integrations.html | ||
| jest.config.js | ||
| live.html | ||
| package-lock.json | ||
| package.json | ||
| playwright.config.js | ||
| README.md | ||
| setup.html | ||
| simple.html | ||
| simulator.html | ||
| test-transformcontrols.html | ||
Spaxel Dashboard
Running Tests
Unit Tests (Jest)
npm test
Accessibility Tests (axe-core + Playwright)
# First-time setup: install browsers
npx playwright install --with-deps chromium
# Run accessibility gate
npm run test:a11y
The accessibility test loads each dashboard page (index, live, fleet, setup, integrations) via a local static server and asserts zero WCAG 2A/2AA violations using @axe-core/playwright. CI fails the build if any violation is introduced.
CI Integration (Argo Workflows)
Add the following step to the spaxel-build WorkflowTemplate before the container build:
- name: a11y-gate
container:
image: node:20-bookworm-slim
command: [sh, -c]
args:
- |
cd dashboard
npm ci
npx playwright install --with-deps chromium
npm run test:a11y
resources:
limits:
memory: 512Mi
cpu: "1"