update tests
This commit is contained in:
@@ -87,12 +87,12 @@ const twoMicsAndOneCamMediaDevices = mockMediaDevices({
|
|||||||
|
|
||||||
describe("createCallFooterViewModel", () => {
|
describe("createCallFooterViewModel", () => {
|
||||||
describe("audioOptions and videoOptions", () => {
|
describe("audioOptions and videoOptions", () => {
|
||||||
it("are empty when the layout is PiP on desktop", () => {
|
function checkEmptyFor(platform: string, layout: Layout): void {
|
||||||
platformMock.mockReturnValue("desktop");
|
platformMock.mockReturnValue(platform);
|
||||||
|
|
||||||
const vm = createCallFooterViewModel(
|
const vm = createCallFooterViewModel(
|
||||||
testScope(),
|
testScope(),
|
||||||
buildMinimalCallViewModel(pipLayout),
|
buildMinimalCallViewModel(layout),
|
||||||
mockMuteStates(),
|
mockMuteStates(),
|
||||||
twoMicsAndOneCamMediaDevices,
|
twoMicsAndOneCamMediaDevices,
|
||||||
/* openSettings */ undefined,
|
/* openSettings */ undefined,
|
||||||
@@ -101,23 +101,13 @@ describe("createCallFooterViewModel", () => {
|
|||||||
|
|
||||||
expect(vm.audioOptions$?.value).toEqual([]);
|
expect(vm.audioOptions$?.value).toEqual([]);
|
||||||
expect(vm.videoOptions$?.value).toEqual([]);
|
expect(vm.videoOptions$?.value).toEqual([]);
|
||||||
|
}
|
||||||
|
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 the platform is iOS regardless of layout", () => {
|
|
||||||
platformMock.mockReturnValue("ios");
|
|
||||||
|
|
||||||
const vm = createCallFooterViewModel(
|
|
||||||
testScope(),
|
|
||||||
buildMinimalCallViewModel(gridLayout),
|
|
||||||
mockMuteStates(),
|
|
||||||
twoMicsAndOneCamMediaDevices,
|
|
||||||
/* openSettings */ undefined,
|
|
||||||
/* reactionIdentifier */ undefined,
|
|
||||||
);
|
|
||||||
|
|
||||||
expect(vm.audioOptions$?.value).toEqual([]);
|
|
||||||
expect(vm.videoOptions$?.value).toEqual([]);
|
|
||||||
});
|
|
||||||
|
|
||||||
it("are populated when the platform is desktop and the layout is not PiP", () => {
|
it("are populated when the platform is desktop and the layout is not PiP", () => {
|
||||||
platformMock.mockReturnValue("desktop");
|
platformMock.mockReturnValue("desktop");
|
||||||
|
|||||||
+1
-1
@@ -61,7 +61,7 @@ export interface WidgetHelpers {
|
|||||||
* is initialized with `initializeWidget`. This should happen at the top level because the widget messaging
|
* is initialized with `initializeWidget`. This should happen at the top level because the widget messaging
|
||||||
* needs to be set up ASAP on load to ensure it doesn't miss any requests.
|
* needs to be set up ASAP on load to ensure it doesn't miss any requests.
|
||||||
*/
|
*/
|
||||||
export let widget: WidgetHelpers | null;
|
export let widget: WidgetHelpers | null = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Should be called as soon as possible on app start. (In the initilizer before react)
|
* Should be called as soon as possible on app start. (In the initilizer before react)
|
||||||
|
|||||||
Reference in New Issue
Block a user