clean up
This commit is contained in:
parent
d6a8f898d1
commit
15e99380b5
84 changed files with 1659 additions and 4726 deletions
|
|
@ -133,3 +133,37 @@ test('shows a clear fallback when WebGPU is unavailable', async ({ page }) => {
|
|||
await expect(fallback).toContainText('webgpu-unsupported');
|
||||
expect(browserFailures).toEqual([]);
|
||||
});
|
||||
|
||||
test('keeps audio focus outlines scoped to the active control', async ({ page }) => {
|
||||
await disableWebGpu(page);
|
||||
await page.goto('/');
|
||||
await expect(page.locator('body')).not.toHaveClass(/is-loading/);
|
||||
|
||||
const audioControl = page.locator('.audio-control');
|
||||
const soundButton = page.locator('button.sound');
|
||||
const volumeSlider = page.locator('.volume-slider');
|
||||
|
||||
await soundButton.click();
|
||||
await expect(audioControl).toHaveCSS('outline-style', 'none');
|
||||
await expect(soundButton).toHaveCSS('outline-style', 'none');
|
||||
|
||||
await page.mouse.click(10, 10);
|
||||
for (let tabIndex = 0; tabIndex < 12; tabIndex += 1) {
|
||||
await page.keyboard.press('Tab');
|
||||
const activeClass = await page.evaluate(() =>
|
||||
String(document.activeElement?.className ?? '')
|
||||
);
|
||||
if (activeClass.includes('sound')) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
await expect(soundButton).toBeFocused();
|
||||
await expect(soundButton).toHaveCSS('outline-style', 'solid');
|
||||
await expect(soundButton).toHaveCSS('outline-offset', '-4px');
|
||||
|
||||
await page.keyboard.press('Tab');
|
||||
await expect(volumeSlider).toBeFocused();
|
||||
await expect(volumeSlider).toHaveCSS('outline-style', 'solid');
|
||||
await expect(volumeSlider).toHaveCSS('outline-offset', '-4px');
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue