This commit is contained in:
Andras Schmelczer 2026-05-31 13:06:47 +01:00
parent 35a962935c
commit 1914991250
19 changed files with 991 additions and 487 deletions

21
e2e/gallery.spec.ts Normal file
View file

@ -0,0 +1,21 @@
import { expect, test } from '@playwright/test';
test('renders the gallery and supports keyboard navigation', async ({
page,
}) => {
await page.goto('/');
await expect(page.locator('.thumbnail')).toHaveCount(39);
await expect(page.locator('#frame-image')).toBeVisible();
const firstAlt = await page.locator('#frame-image').getAttribute('alt');
await page.locator('.thumbnail').first().focus();
await page.keyboard.press('ArrowRight');
await expect(page.locator('.thumbnail[aria-current="true"]')).toHaveCount(1);
await expect(page.locator('#frame-image')).not.toHaveAttribute(
'alt',
firstAlt ?? ''
);
});