From 07e7090cc744b77eff70ff3efcfdea8b4147372a Mon Sep 17 00:00:00 2001 From: Timo K Date: Tue, 12 May 2026 16:50:45 +0200 Subject: [PATCH] fix unit tests --- src/components/MediaMuteAndSwitchButton.test.tsx | 10 +++++----- .../MediaMuteAndSwitchButton.test.tsx.snap | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/components/MediaMuteAndSwitchButton.test.tsx b/src/components/MediaMuteAndSwitchButton.test.tsx index 42a8d970..d86a612d 100644 --- a/src/components/MediaMuteAndSwitchButton.test.tsx +++ b/src/components/MediaMuteAndSwitchButton.test.tsx @@ -39,16 +39,16 @@ describe("MediaMuteAndSwitchButton", () => { const renderVideoDisabled = renderLabels("video", false); expect( - renderAudioEndabled.getByRole("button", { name: "Mute microphone" }), + renderAudioEndabled.getByRole("switch", { name: "Mute microphone" }), ).toBeInTheDocument(); expect( - renderAudioDisabled.getByRole("button", { name: "Unmute microphone" }), + renderAudioDisabled.getByRole("switch", { name: "Unmute microphone" }), ).toBeInTheDocument(); expect( - renderVideoEnabled.getByRole("button", { name: "Start video" }), + renderVideoEnabled.getByRole("switch", { name: "Start video" }), ).toBeInTheDocument(); expect( - renderVideoDisabled.getByRole("button", { name: "Stop video" }), + renderVideoDisabled.getByRole("switch", { name: "Stop video" }), ).toBeInTheDocument(); }); @@ -64,7 +64,7 @@ describe("MediaMuteAndSwitchButton", () => { />, ); - await user.click(getByRole("button", { name: "Mute microphone" })); + await user.click(getByRole("switch", { name: "Mute microphone" })); expect(onMute).toHaveBeenCalled(); }); diff --git a/src/components/__snapshots__/MediaMuteAndSwitchButton.test.tsx.snap b/src/components/__snapshots__/MediaMuteAndSwitchButton.test.tsx.snap index 84ea220a..86dcd2a2 100644 --- a/src/components/__snapshots__/MediaMuteAndSwitchButton.test.tsx.snap +++ b/src/components/__snapshots__/MediaMuteAndSwitchButton.test.tsx.snap @@ -9,7 +9,7 @@ exports[`MediaMuteAndSwitchButton > renders 1`] = ` class="_button_1nw83_8 button _icon-only_1nw83_53" data-kind="primary" data-size="lg" - role="button" + role="switch" tabindex="0" />