feat(e2e): add axe-core accessibility fixture

This commit is contained in:
cartsnitch-engineer[bot]
2026-03-31 02:26:45 +00:00
committed by GitHub
parent f0c60778cc
commit c2b5ccb830
+12
View File
@@ -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";