mirror of
https://github.com/vector-im/element-call.git
synced 2026-05-19 10:54:36 +00:00
simplifications docs and tests
This commit is contained in:
@@ -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" },
|
||||
]);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user