test: authenticated admin E2E suite + accessibility + visual regression baselines

- Global setup: authenticates as admin, saves storageState for reuse
- playwright.config.ts: 3 projects (setup, authenticated, unauthenticated)
- authenticated-admin.spec.ts: 16 admin pages tested with real auth session
- accessibility.spec.ts: axe-core scans on all admin, public, and portal pages
- visual-regression.spec.ts: dark mode baselines for key pages (toHaveScreenshot)
- @axe-core/playwright added as devDependency
- .gitignore updated: excludes .auth/ and test-results/

Full suite: 262 tests passing (setup:1, authenticated:52, unauthenticated:209)
This commit is contained in:
Patrick Plate
2026-06-13 22:30:29 +02:00
parent aabde17532
commit cfb38e8fc6
8 changed files with 774 additions and 1 deletions
+19
View File
@@ -135,6 +135,9 @@ importers:
specifier: 3.23.8
version: 3.23.8
devDependencies:
'@axe-core/playwright':
specifier: ^4.11.3
version: 4.11.3(playwright-core@1.60.0)
'@eslint/compat':
specifier: 1.2.7
version: 1.2.7(eslint@9.18.0(jiti@2.6.1))
@@ -261,6 +264,11 @@ packages:
nodemailer:
optional: true
'@axe-core/playwright@4.11.3':
resolution: {integrity: sha512-h/kfksv4F0cVIDlKpT4700OehdRgpvuVskuQ2nb7/JmtWUXpe9ftHAPtwyXGvVSsa6SJ64A9ER7Zrzc/sIvC4w==}
peerDependencies:
playwright-core: '>= 1.0.0'
'@babel/code-frame@7.27.1':
resolution: {integrity: sha512-cjQ7ZlQ0Mv3b47hABuTevyTuYN4i+loJKGeV9flcCgIK37cCXRh+L1bd3iBHlynerhQ7BhCkn2BPbQUL+rGqFg==}
engines: {node: '>=6.9.0'}
@@ -2443,6 +2451,10 @@ packages:
resolution: {integrity: sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==}
engines: {node: '>= 0.4'}
axe-core@4.11.4:
resolution: {integrity: sha512-KunSNx+TVpkAw/6ULfhnx+HWRecjqZGTOyquAoWHYLRSdK1tB5Ihce1ZW+UY3fj33bYAFWPu7W/GRSmmrCGuxA==}
engines: {node: '>=4'}
axe-core@4.12.1:
resolution: {integrity: sha512-s7iGf5GaVMxEG0ENN9x+xTr7GFZCb1ZP/1uATUpCEK2X78nDB3RwbtFCo9pGAf9ru+VwoQ464DkaLEeRM08wJA==}
engines: {node: '>=4'}
@@ -4668,6 +4680,11 @@ snapshots:
preact: 10.24.3
preact-render-to-string: 6.5.11(preact@10.24.3)
'@axe-core/playwright@4.11.3(playwright-core@1.60.0)':
dependencies:
axe-core: 4.11.4
playwright-core: 1.60.0
'@babel/code-frame@7.27.1':
dependencies:
'@babel/helper-validator-identifier': 7.28.5
@@ -6611,6 +6628,8 @@ snapshots:
dependencies:
possible-typed-array-names: 1.1.0
axe-core@4.11.4: {}
axe-core@4.12.1: {}
axobject-query@4.1.0: {}