Skip to content

Commit fd40c94

Browse files
authored
Fix revealjs speaker view Layout test on macOS (#15231)
The test pressed ArrowDown on the focused Layout select and expected the value to become wide. On macOS, Chromium, WebKit and Firefox all open the popup on ArrowDown or ArrowUp over a closed select instead of changing the value (Blink and WebKit through PopsMenuByArrowKeys on the Mac theme, Gecko through its XP_MACOSX branch in HTMLSelectEventListener). The value stayed default, so the nightly macOS Playwright job failed in all three browsers while Linux and Windows passed. The test checks two things that do not need the same key. The value, its visible label and the accessible name are now set and checked with selectOption. The arrow key press stays, followed by the existing check that the deck does not move, without asserting the value afterwards. The keydown still reaches the select on macOS, so the speaker view's guard against forwarding keys from native controls is still exercised there. Removing that guard from the rendered speaker view makes the test fail on the deck position check in chromium, firefox and webkit, so the remaining assertion still catches the regression it was written for. This is a characterization fix: no macOS runner was available locally, and the macOS result will come from the next nightly run.
1 parent 60efc6e commit fd40c94

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎tests/integration/playwright/tests/revealjs-speaker-view-a11y.spec.ts‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,13 @@ test.describe('revealjs speaker view accessibility (#15159, #15160)', () => {
2121
const indices = await page.evaluate(() => (window as any).Reveal.getIndices());
2222
await select.focus();
2323
await expect(speaker.locator('#speaker-layout')).toHaveCSS('outline-style', 'solid');
24-
await select.press('ArrowDown');
24+
await select.selectOption('wide');
2525
await expect(select).toHaveValue('wide');
2626
await expect(speaker.locator('.speaker-layout-value')).toHaveText(': Wide');
2727
await expect(select).toHaveAccessibleName('Layout');
28+
// Arrow keys on a closed select open the popup on macOS and change the
29+
// value elsewhere, so only the deck position is checked after the press.
30+
await select.press('ArrowDown');
2831
// Speaker-to-deck state forwarding is debounced by 500 ms. Check after
2932
// that window so a select arrow key cannot silently advance the deck. The
3033
// first slide has a fragment, so compare the fragment index too.

0 commit comments

Comments
 (0)