test(a11y): add A5 GPX delete button accessible name test
This commit is contained in:
@@ -76,3 +76,22 @@ test('A4b: multi-slide photo strips have accessible prev/next controls', async (
|
||||
await expect(page.locator('.strip-prev').first()).toHaveAttribute('aria-label', 'Previous photo');
|
||||
await expect(page.locator('.strip-next').first()).toHaveAttribute('aria-label', 'Next photo');
|
||||
});
|
||||
|
||||
// ── A5: GPX delete button unique accessible names ──────────────────────────────
|
||||
test('A5: GPX delete buttons have unique aria-labels per filename', async ({ page }) => {
|
||||
await page.route('**/api/v1/pages**/media', async route => {
|
||||
await route.fulfill({
|
||||
status: 200,
|
||||
contentType: 'application/json',
|
||||
body: JSON.stringify({
|
||||
data: [
|
||||
{ filename: 'tokyo-day1.gpx', size: 102400, modified: '2026-03-25T10:00:00Z' }
|
||||
]
|
||||
})
|
||||
});
|
||||
});
|
||||
await page.goto('/gpx-manager');
|
||||
const deleteBtn = page.locator('.gpx-trip').first().locator('.gpx-delete[data-filename="tokyo-day1.gpx"]');
|
||||
await expect(deleteBtn).toBeVisible();
|
||||
await expect(deleteBtn).toHaveAttribute('aria-label', 'Delete tokyo-day1.gpx');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user