opencode-config/.opencode/templates/fullstack/{{cookiecutter.project_name}}/frontend/tests/e2e/accessibility.spec.ts

10 lines
No EOL
332 B
TypeScript

import { expect, test } from '@playwright/test';
import AxeBuilder from '@axe-core/playwright';
test('dashboard has no a11y violations', async ({ page }) => {
await page.goto('/');
const results = await new AxeBuilder({ page })
.disableRules(['color-contrast'])
.analyze();
expect(results.violations).toEqual([]);
});