From 8c9cd30ebc218b9311fb1228fde03124334975af Mon Sep 17 00:00:00 2001 From: "cartsnitch-engineer[bot]" <269717931+cartsnitch-engineer[bot]@users.noreply.github.com> Date: Tue, 31 Mar 2026 02:26:45 +0000 Subject: [PATCH] feat(e2e): add axe-core accessibility fixture --- e2e/fixtures.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 e2e/fixtures.ts diff --git a/e2e/fixtures.ts b/e2e/fixtures.ts new file mode 100644 index 0000000..07e12e6 --- /dev/null +++ b/e2e/fixtures.ts @@ -0,0 +1,12 @@ +import { test as base, expect } from "@playwright/test"; +import AxeBuilder from "@axe-core/playwright"; + +export const test = base.extend<{ axeCheck: void }>({ + axeCheck: [async ({ page }, use) => { + await use(); + const results = await new AxeBuilder({ page }).analyze(); + expect(results.violations).toEqual([]); + }, { auto: true }], +}); + +export { expect } from "@playwright/test";