mirror of
https://github.com/vector-im/element-call.git
synced 2026-07-30 19:39:22 +00:00
fix lints and format
This commit is contained in:
@@ -2,7 +2,9 @@
|
|||||||
Copyright 2026 Element Creations Ltd.
|
Copyright 2026 Element Creations Ltd.
|
||||||
SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
|
SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
|
||||||
Please see LICENSE in the repository root for full details.
|
Please see LICENSE in the repository root for full details.
|
||||||
|
**/}
|
||||||
|
|
||||||
|
{/**
|
||||||
This is a custom doc page overwriting the default autodocs tag.
|
This is a custom doc page overwriting the default autodocs tag.
|
||||||
This can be done by using the same filename as the component
|
This can be done by using the same filename as the component
|
||||||
With the help of Primary, Controls,Stories the overhead is minimal
|
With the help of Primary, Controls,Stories the overhead is minimal
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ const reactionData = {
|
|||||||
* A wrapper component that is used for:
|
* 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)
|
* - exposing the snapshot via props so the storybook documents the snapshot properties (basically unpack them form the vm)
|
||||||
* - Add additional react context
|
* - 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.
|
* @param vmSnapshot the Snapshot of the vm, the wrapper will create a mocked vm from it and pass it to the CallFooter.
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -104,30 +104,30 @@ describe("createCallFooterViewModel", () => {
|
|||||||
}
|
}
|
||||||
it("are empty when both the platform is iOS", () => {
|
it("are empty when both the platform is iOS", () => {
|
||||||
checkEmptyFor("ios", gridLayout);
|
checkEmptyFor("ios", gridLayout);
|
||||||
it("are empty when both the layout is pip", () => {
|
it("are empty when both the layout is pip", () => {
|
||||||
checkEmptyFor("desktop", pipLayout);
|
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", () => {
|
const vm = createCallFooterViewModel(
|
||||||
platformMock.mockReturnValue("desktop");
|
testScope(),
|
||||||
|
buildMinimalCallViewModel(gridLayout),
|
||||||
|
mockMuteStates(),
|
||||||
|
twoMicsAndOneCamMediaDevices,
|
||||||
|
/* openSettings */ undefined,
|
||||||
|
/* reactionIdentifier */ undefined,
|
||||||
|
);
|
||||||
|
|
||||||
const vm = createCallFooterViewModel(
|
expect(vm.audioOptions$?.value).toEqual([
|
||||||
testScope(),
|
{ id: "mic1", label: "Microphone 1" },
|
||||||
buildMinimalCallViewModel(gridLayout),
|
{ id: "mic2", label: "Microphone 2" },
|
||||||
mockMuteStates(),
|
]);
|
||||||
twoMicsAndOneCamMediaDevices,
|
expect(vm.videoOptions$?.value).toEqual([
|
||||||
/* openSettings */ undefined,
|
{ id: "cam1", label: "Camera 1" },
|
||||||
/* 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" },
|
|
||||||
]);
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user