diff --git a/src/components/CallFooter.mdx b/src/components/CallFooter.mdx index 9dfab6f1..b94131a0 100644 --- a/src/components/CallFooter.mdx +++ b/src/components/CallFooter.mdx @@ -2,7 +2,9 @@ Copyright 2026 Element Creations Ltd. SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial Please see LICENSE in the repository root for full details. +**/} +{/** This is a custom doc page overwriting the default autodocs tag. This can be done by using the same filename as the component With the help of Primary, Controls,Stories the overhead is minimal diff --git a/src/components/CallFooter.stories.tsx b/src/components/CallFooter.stories.tsx index 129c2b3a..28b8be9e 100644 --- a/src/components/CallFooter.stories.tsx +++ b/src/components/CallFooter.stories.tsx @@ -28,7 +28,7 @@ const reactionData = { * A wrapper component that is used for: * - exposing the snapshot via props so the storybook documents the snapshot properties (basically unpack them form the vm) * - Add additional react context - * @param chilren used for the "Back to Recents" button in the lobby stories, but can be used for anything really + * @param children used for the "Back to Recents" button in the lobby stories, but can be used for anything really * @param vmSnapshot the Snapshot of the vm, the wrapper will create a mocked vm from it and pass it to the CallFooter. * @returns */ diff --git a/src/components/CallFooterViewModel.test.ts b/src/components/CallFooterViewModel.test.ts index 94549b32..efb3d4e4 100644 --- a/src/components/CallFooterViewModel.test.ts +++ b/src/components/CallFooterViewModel.test.ts @@ -104,30 +104,30 @@ describe("createCallFooterViewModel", () => { } it("are empty when both the platform is iOS", () => { checkEmptyFor("ios", gridLayout); - it("are empty when both the layout is pip", () => { - checkEmptyFor("desktop", pipLayout); - }); + it("are empty when both the layout is pip", () => { + checkEmptyFor("desktop", pipLayout); + }); + it("are populated when the platform is desktop and the layout is not PiP", () => { + platformMock.mockReturnValue("desktop"); - it("are populated when the platform is desktop and the layout is not PiP", () => { - platformMock.mockReturnValue("desktop"); + const vm = createCallFooterViewModel( + testScope(), + buildMinimalCallViewModel(gridLayout), + mockMuteStates(), + twoMicsAndOneCamMediaDevices, + /* openSettings */ undefined, + /* reactionIdentifier */ undefined, + ); - const vm = createCallFooterViewModel( - testScope(), - buildMinimalCallViewModel(gridLayout), - mockMuteStates(), - twoMicsAndOneCamMediaDevices, - /* openSettings */ undefined, - /* reactionIdentifier */ undefined, - ); - - expect(vm.audioOptions$?.value).toEqual([ - { id: "mic1", label: "Microphone 1" }, - { id: "mic2", label: "Microphone 2" }, - ]); - expect(vm.videoOptions$?.value).toEqual([ - { id: "cam1", label: "Camera 1" }, - ]); + expect(vm.audioOptions$?.value).toEqual([ + { id: "mic1", label: "Microphone 1" }, + { id: "mic2", label: "Microphone 2" }, + ]); + expect(vm.videoOptions$?.value).toEqual([ + { id: "cam1", label: "Camera 1" }, + ]); + }); }); }); });