TIdy up
This commit is contained in:
parent
35a962935c
commit
1914991250
19 changed files with 991 additions and 487 deletions
21
e2e/gallery.spec.ts
Normal file
21
e2e/gallery.spec.ts
Normal 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 ?? ''
|
||||
);
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue