Files
rf4-spotter/apps/web/tests/domain-accessibility.spec.ts
T
ik 72ae157ec3
CI / backend-and-migrations (push) Waiting to run
CI / astro-build (push) Waiting to run
CI / dependency-audit (push) Waiting to run
CI / compose-e2e (push) Waiting to run
fix: improve domain accessibility contrast
2026-09-20 19:25:18 +07:00

16 lines
547 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import AxeBuilder from "@axe-core/playwright";
import { expect, test } from "@playwright/test";
for (const path of [
"/waterbodies",
"/waterbodies/р-вьюнок",
"/spots/vyunok-321x654",
"/media",
]) {
test(`${path} has no serious accessibility violations`, async ({ page }) => {
await page.goto(path);
const results = await new AxeBuilder({ page }).withTags(["wcag2a", "wcag2aa", "wcag21aa"]).analyze();
expect(results.violations.filter(item => ["critical", "serious"].includes(item.impact ?? ""))).toEqual([]);
});
}