From 194bfea287816c620b6776a329019f867e24c60b Mon Sep 17 00:00:00 2001 From: fkwp Date: Thu, 17 Sep 2026 11:52:58 +0200 Subject: [PATCH] Cover the speaker section sitting above the microphone section - Covers AC28, which `ux_design_shevron.png` settles. - Not written in this session: it was uncommitted in the tree beforehand, and is committed here so it is not lost. --- .../MediaMuteAndSwitchButton.test.tsx | 34 +++++++++++++++++++ src/components/MediaMuteAndSwitchButton.tsx | 2 +- 2 files changed, 35 insertions(+), 1 deletion(-) diff --git a/src/components/MediaMuteAndSwitchButton.test.tsx b/src/components/MediaMuteAndSwitchButton.test.tsx index b466a0496..fc02a0f87 100644 --- a/src/components/MediaMuteAndSwitchButton.test.tsx +++ b/src/components/MediaMuteAndSwitchButton.test.tsx @@ -532,6 +532,40 @@ describe("MediaMuteAndSwitchButton", () => { expect(await axe(menu as HTMLElement)).toHaveNoViolations(); }); + test("puts the speaker section above the microphone section", async () => { + const user = userEvent.setup(); + const { getByRole } = renderComponent( + , + ); + + await user.click(getByRole("button", { name: "Microphone" })); + + const speakers = screen.getByRole("menuitemradio", { name: "Speakers" }); + const microphone = screen.getByRole("menuitemradio", { + name: "Microphone 1", + }); + expect( + speakers.compareDocumentPosition(microphone) & + Node.DOCUMENT_POSITION_FOLLOWING, + ).toBeTruthy(); + }); + test("lists speaker and microphone sections", async () => { const user = userEvent.setup(); const { getByRole } = renderComponent( diff --git a/src/components/MediaMuteAndSwitchButton.tsx b/src/components/MediaMuteAndSwitchButton.tsx index 46b338fc7..69ab69a55 100644 --- a/src/components/MediaMuteAndSwitchButton.tsx +++ b/src/components/MediaMuteAndSwitchButton.tsx @@ -443,9 +443,9 @@ export const MediaMuteAndSwitchButton: FC = ({ } >