浏览代码

enhance: add basic a11y test

Konstantinos Kaloutas 3 年之前
父节点
当前提交
54e43c71dd
共有 1 个文件被更改,包括 10 次插入0 次删除
  1. 10 0
      e2e-tests/accessibility.spec.ts

+ 10 - 0
e2e-tests/accessibility.spec.ts

@@ -0,0 +1,10 @@
+import { injectAxe, checkA11y, getViolations, reportViolations } from 'axe-playwright'
+import { test } from './fixtures'
+import { createRandomPage } from './utils'
+
+
+test('check a11y for the whole page', async ({ page }) => {
+    await injectAxe(page)
+    await createRandomPage(page)
+    await checkA11y(page)
+})