From 6be06de1536c0551a066f5280b2f0ea955f545d6 Mon Sep 17 00:00:00 2001 From: Timo K Date: Thu, 9 Apr 2026 17:12:21 +0200 Subject: [PATCH] fix tests --- src/components/InCallFooter.tsx | 5 ++-- src/room/InCallView.test.tsx | 2 +- src/room/InCallView.tsx | 4 ++- .../__snapshots__/InCallView.test.tsx.snap | 27 +++++++++++++++++-- 4 files changed, 32 insertions(+), 6 deletions(-) diff --git a/src/components/InCallFooter.tsx b/src/components/InCallFooter.tsx index f5ca656c..8a25bde3 100644 --- a/src/components/InCallFooter.tsx +++ b/src/components/InCallFooter.tsx @@ -93,7 +93,7 @@ export const InCallFooter: FC = ({ key="audio" enabled={audioEnabled} onClick={toggleAudio ?? undefined} - disabled={toggleAudio === null} + disabled={toggleAudio === undefined} data-testid="incall_mute" />, = ({ key="video" enabled={videoEnabled} onClick={toggleVideo ?? undefined} - disabled={toggleVideo === null} + disabled={toggleVideo === undefined} data-testid="incall_videomute" />, ); @@ -137,6 +137,7 @@ export const InCallFooter: FC = ({ return ( audioOutputSwitcher.switch()} isEarpieceTarget={audioOutputSwitcher.targetOutput === "earpiece"} /> ); diff --git a/src/room/InCallView.test.tsx b/src/room/InCallView.test.tsx index 0c3be63b..2f797c65 100644 --- a/src/room/InCallView.test.tsx +++ b/src/room/InCallView.test.tsx @@ -197,7 +197,7 @@ describe("InCallView", () => { const { getByRole } = createInCallView({ mediaDevices }); // The button should be visible. When current output is "speaker", // the switcher targets "earpiece", so the tooltip label is "Handset". - const audioOutputBtn = getByRole("button", { name: "Handset" }); + const audioOutputBtn = getByRole("switch", { name: "Handset" }); expect(audioOutputBtn).toBeVisible(); await user.click(audioOutputBtn); diff --git a/src/room/InCallView.tsx b/src/room/InCallView.tsx index 12374d05..56cc02e1 100644 --- a/src/room/InCallView.tsx +++ b/src/room/InCallView.tsx @@ -565,12 +565,14 @@ export const InCallView: FC = ({ , ); + const footerNotNeeded = + showControls === false && headerStyle === HeaderStyle.None; const footer = ( rendering > renders 1`] = ` +