Repository navigation
Fix revealjs speaker view Layout test on macOS - #15231
Merged
Merged
Conversation
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.
Collaborator
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The speaker view Layout test added in #15164 fails in chromium, firefox and webkit on the nightly macOS Playwright job, while the Linux job passes.
Root cause
The test pressed ArrowDown on the focused Layout
<select>and expected the value to becomewide. On macOS, the three browser engines follow the platform convention: ArrowDown or ArrowUp on a closed select opens the popup and leaves the value unchanged. Blink and WebKit do this throughPopsMenuByArrowKeysin their Mac theme, Gecko through anXP_MACOSXbranch inHTMLSelectEventListener.cpp. The speaker view behaves correctly; only the test assumed the Linux and Windows key behavior.Fix
The test now sets the value with
selectOption('wide')and checks the value, its visible label and the accessible name. It still presses ArrowDown on the select and checks that the deck does not move, without asserting the value afterwards. The keydown reaches the select on macOS too, so this still exercises the speaker view rule that keys pressed on native controls are not forwarded to the slides.With that rule removed from the rendered speaker view, the test fails on the deck position check in all three browsers, so it still catches the regression #15164 guards against.
PR CI has no macOS Playwright run, so the first nightly after merge confirms the fix on macOS.
Checklist
I have (if applicable):
AI-assisted PR
Note: autonomous AI agents submitting PRs without human oversight are not permitted — see the Code of Conduct.