Skip to content

Commit 7dcabbf

Browse files
committed
test(notes): add Playwright accessibility tests and debug CI report listing
1 parent dd1af7e commit 7dcabbf

2 files changed

Lines changed: 24 additions & 0 deletions

File tree

.github/workflows/accessibility-diff.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,14 @@ jobs:
7777
python3 scripts/monitor_a11y_ci.py --branch "${{ github.head_ref }}" --local-report-dir playwright-report --dry-run --verbose || true
7878
echo "MONITOR: end (dry-run)"
7979
80+
- name: "Debug: Check Playwright report"
81+
if: always()
82+
run: |
83+
echo "DEBUG: listing playwright-report"
84+
ls -la playwright-report || true
85+
echo "DEBUG: searching for axe-results or base64 in report files"
86+
grep -E "axe-results-.*\.json|base64" -R playwright-report || true
87+
8088
- name: "Collect playwright report and run a11y diff (auto-comment on PRs)"
8189
if: always()
8290
env:

e2e/notes.spec.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import { test, expect } from '@playwright/test'
2+
3+
test('Note list is accessible', async ({ page }) => {
4+
await page.goto('/notes')
5+
const list = await page.locator('[role="list"]')
6+
await expect(list).toHaveCount(1)
7+
const items = await page.locator('[role="listitem"]')
8+
await expect(items).toHaveCount(2)
9+
})
10+
11+
test('Note editor is accessible', async ({ page }) => {
12+
await page.goto('/notes/1')
13+
await expect(page.locator('form[aria-label="Notizeditor"]')).toBeVisible()
14+
await expect(page.locator('label[for="title"]')).toBeVisible()
15+
await expect(page.locator('#title')).toBeVisible()
16+
})

0 commit comments

Comments
 (0)