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([]); }); }