Merge branch 'develop' into travis/remove-skinning

This commit is contained in:
Travis Ralston
2022-04-05 10:50:37 -06:00
74 changed files with 1412 additions and 1717 deletions

View File

@@ -28,20 +28,19 @@ import {
mkEvent,
stubVoiceChannelStore,
} from "../../../test-utils";
import { stubVideoChannelStore } from "../../../test-utils/video";
import RoomTile from "../../../../src/components/views/rooms/RoomTile";
import MemberAvatar from "../../../../src/components/views/avatars/MemberAvatar";
import SettingsStore from "../../../../src/settings/SettingsStore";
import VoiceChannelStore, { VoiceChannelEvent } from "../../../../src/stores/VoiceChannelStore";
import { DefaultTagID } from "../../../../src/stores/room-list/models";
import DMRoomMap from "../../../../src/utils/DMRoomMap";
import { VOICE_CHANNEL_MEMBER } from "../../../../src/utils/VoiceChannelUtils";
import { VIDEO_CHANNEL_MEMBER } from "../../../../src/utils/VideoChannelUtils";
import { MatrixClientPeg } from "../../../../src/MatrixClientPeg";
import PlatformPeg from "../../../../src/PlatformPeg";
import BasePlatform from "../../../../src/BasePlatform";
const mkVoiceChannelMember = (userId: string, devices: string[]): MatrixEvent => mkEvent({
const mkVideoChannelMember = (userId: string, devices: string[]): MatrixEvent => mkEvent({
event: true,
type: VOICE_CHANNEL_MEMBER,
type: VIDEO_CHANNEL_MEMBER,
room: "!1:example.org",
user: userId,
skey: userId,
@@ -58,36 +57,25 @@ describe("RoomTile", () => {
beforeEach(() => {
const realGetValue = SettingsStore.getValue;
SettingsStore.getValue = <T, >(name: string, roomId?: string): T => {
if (name === "feature_voice_rooms") {
if (name === "feature_video_rooms") {
return true as unknown as T;
}
return realGetValue(name, roomId);
};
stubClient();
stubVoiceChannelStore();
DMRoomMap.makeShared();
cli = mocked(MatrixClientPeg.get());
store = VoiceChannelStore.instance;
store = stubVideoChannelStore();
DMRoomMap.makeShared();
});
afterEach(() => jest.clearAllMocks());
describe("voice rooms", () => {
describe("video rooms", () => {
const room = mkRoom(cli, "!1:example.org");
room.isCallRoom.mockReturnValue(true);
it("tracks connection state", async () => {
// Insert a breakpoint in the connect method, so we can see the intermediate connecting state
let continueJoin;
const breakpoint = new Promise(resolve => continueJoin = resolve);
const realConnect = store.connect;
store.connect = async () => {
await breakpoint;
await realConnect();
};
room.isElementVideoRoom.mockReturnValue(true);
it("tracks connection state", () => {
const tile = mount(
<RoomTile
room={room}
@@ -96,39 +84,25 @@ describe("RoomTile", () => {
tag={DefaultTagID.Untagged}
/>,
);
expect(tile.find(".mx_RoomTile_voiceIndicator").text()).toEqual("Voice room");
expect(tile.find(".mx_RoomTile_videoIndicator").text()).toEqual("Video");
act(() => { tile.simulate("click"); });
act(() => { store.connect("!1:example.org"); });
tile.update();
expect(tile.find(".mx_RoomTile_voiceIndicator").text()).toEqual("Connecting...");
// Now we confirm the join and wait for the store to update
const waitForConnect = new Promise<void>(resolve =>
store.once(VoiceChannelEvent.Connect, resolve),
);
continueJoin();
await waitForConnect;
// Wait exactly 2 ticks for the room tile to update
await Promise.resolve();
await Promise.resolve();
expect(tile.find(".mx_RoomTile_videoIndicator").text()).toEqual("Connected");
act(() => { store.disconnect(); });
tile.update();
expect(tile.find(".mx_RoomTile_voiceIndicator").text()).toEqual("Connected");
await store.disconnect();
tile.update();
expect(tile.find(".mx_RoomTile_voiceIndicator").text()).toEqual("Voice room");
expect(tile.find(".mx_RoomTile_videoIndicator").text()).toEqual("Video");
});
it("displays connected members", async () => {
it("displays connected members", () => {
mocked(room.currentState).getStateEvents.mockImplementation(mockStateEventImplementation([
// A user connected from 2 devices
mkVoiceChannelMember("@alice:example.org", ["device 1", "device 2"]),
mkVideoChannelMember("@alice:example.org", ["device 1", "device 2"]),
// A disconnected user
mkVoiceChannelMember("@bob:example.org", []),
mkVideoChannelMember("@bob:example.org", []),
// A user that claims to have a connected device, but has left the room
mkVoiceChannelMember("@chris:example.org", ["device 1"]),
mkVideoChannelMember("@chris:example.org", ["device 1"]),
]));
mocked(room.currentState).getMember.mockImplementation(userId => ({
@@ -151,9 +125,8 @@ describe("RoomTile", () => {
);
// Only Alice should display as connected
const avatar = tile.find(MemberAvatar);
expect(avatar.length).toEqual(1);
expect(avatar.props().member.userId).toEqual("@alice:example.org");
const participants = tile.find(".mx_RoomTile_videoParticipants");
expect(participants.text()).toEqual("1");
});
});
});

View File

@@ -1,110 +0,0 @@
/*
Copyright 2022 The Matrix.org Foundation C.I.C.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
import React from "react";
import { mount } from "enzyme";
import { act } from "react-dom/test-utils";
import { mocked } from "jest-mock";
import {
stubClient,
mkStubRoom,
wrapInMatrixClientContext,
stubVoiceChannelStore,
} from "../../../test-utils";
import _VoiceChannelRadio from "../../../../src/components/views/voip/VoiceChannelRadio";
import VoiceChannelStore from "../../../../src/stores/VoiceChannelStore";
import DMRoomMap from "../../../../src/utils/DMRoomMap";
import { MatrixClientPeg } from "../../../../src/MatrixClientPeg";
const VoiceChannelRadio = wrapInMatrixClientContext(_VoiceChannelRadio);
describe("VoiceChannelRadio", () => {
const cli = mocked(MatrixClientPeg.get());
const room = mkStubRoom("!1:example.org", "voice channel", cli);
room.isCallRoom = () => true;
beforeEach(() => {
stubClient();
stubVoiceChannelStore();
DMRoomMap.makeShared();
});
it("shows when connecting voice", async () => {
const radio = mount(<VoiceChannelRadio />);
expect(radio.children().children().exists()).toEqual(false);
act(() => { VoiceChannelStore.instance.connect("!1:example.org"); });
radio.update();
expect(radio.children().children().exists()).toEqual(true);
});
it("hides when disconnecting voice", () => {
VoiceChannelStore.instance.connect("!1:example.org");
const radio = mount(<VoiceChannelRadio />);
expect(radio.children().children().exists()).toEqual(true);
act(() => { VoiceChannelStore.instance.disconnect(); });
radio.update();
expect(radio.children().children().exists()).toEqual(false);
});
describe("disconnect button", () => {
it("works", () => {
VoiceChannelStore.instance.connect("!1:example.org");
const radio = mount(<VoiceChannelRadio />);
act(() => {
radio.find("AccessibleButton.mx_VoiceChannelRadio_disconnectButton").simulate("click");
});
expect(VoiceChannelStore.instance.disconnect).toHaveBeenCalled();
});
});
describe("video button", () => {
it("works", () => {
VoiceChannelStore.instance.connect("!1:example.org");
const radio = mount(<VoiceChannelRadio />);
act(() => {
radio.find("AccessibleButton.mx_VoiceChannelRadio_videoButton").simulate("click");
});
expect(VoiceChannelStore.instance.unmuteVideo).toHaveBeenCalled();
act(() => {
radio.find("AccessibleButton.mx_VoiceChannelRadio_videoButton").simulate("click");
});
expect(VoiceChannelStore.instance.muteVideo).toHaveBeenCalled();
});
});
describe("audio button", () => {
it("works", () => {
VoiceChannelStore.instance.connect("!1:example.org");
const radio = mount(<VoiceChannelRadio />);
act(() => {
radio.find("AccessibleButton.mx_VoiceChannelRadio_audioButton").simulate("click");
});
expect(VoiceChannelStore.instance.unmuteAudio).toHaveBeenCalled();
act(() => {
radio.find("AccessibleButton.mx_VoiceChannelRadio_audioButton").simulate("click");
});
expect(VoiceChannelStore.instance.muteAudio).toHaveBeenCalled();
});
});
});

View File

@@ -36,7 +36,7 @@ export async function createRoom(session: ElementSession, roomName: string, encr
const addRoomButton = await roomsSublist.$(".mx_RoomSublist_auxButton");
await addRoomButton.click();
const createRoomButton = await session.query('.mx_AccessibleButton[aria-label="Create new room"]');
const createRoomButton = await session.query('.mx_AccessibleButton[aria-label="New room"]');
await createRoomButton.click();
const roomNameInput = await session.query('.mx_CreateRoomDialog_name input');

View File

@@ -1,5 +1,6 @@
/*
Copyright 2016 OpenMarket Ltd
Copyright 2022 The Matrix.org Foundation C.I.C.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -14,16 +15,16 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
const notifications = require('../../src/notifications');
import { TweakName, PushRuleActionName, TweakHighlight, TweakSound } from "matrix-js-sdk/src/matrix";
const ContentRules = notifications.ContentRules;
const PushRuleVectorState = notifications.PushRuleVectorState;
import { ContentRules, PushRuleVectorState } from "../../src/notifications";
const NORMAL_RULE = {
actions: [
"notify",
{ set_tweak: "highlight", value: false },
PushRuleActionName.Notify,
{ set_tweak: TweakName.Highlight, value: false } as TweakHighlight,
],
default: false,
enabled: true,
pattern: "vdh2",
rule_id: "vdh2",
@@ -31,10 +32,11 @@ const NORMAL_RULE = {
const LOUD_RULE = {
actions: [
"notify",
{ set_tweak: "highlight" },
{ set_tweak: "sound", value: "default" },
PushRuleActionName.Notify,
{ set_tweak: TweakName.Highlight } as TweakHighlight,
{ set_tweak: TweakName.Sound, value: "default" } as TweakSound,
],
default: false,
enabled: true,
pattern: "vdh2",
rule_id: "vdh2",
@@ -42,9 +44,9 @@ const LOUD_RULE = {
const USERNAME_RULE = {
actions: [
"notify",
{ set_tweak: "sound", value: "default" },
{ set_tweak: "highlight" },
PushRuleActionName.Notify,
{ set_tweak: TweakName.Sound, value: "default" } as TweakSound,
{ set_tweak: TweakName.Highlight } as TweakHighlight,
],
default: true,
enabled: true,

View File

@@ -1,60 +0,0 @@
/*
Copyright 2016 OpenMarket Ltd
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
const notifications = require('../../src/notifications');
const prvs = notifications.PushRuleVectorState;
describe("PushRuleVectorState", function() {
describe("contentRuleVectorStateKind", function() {
it("should understand normal notifications", function() {
const rule = {
actions: [
"notify",
],
};
expect(prvs.contentRuleVectorStateKind(rule)).
toEqual(prvs.ON);
});
it("should handle loud notifications", function() {
const rule = {
actions: [
"notify",
{ set_tweak: "highlight", value: true },
{ set_tweak: "sound", value: "default" },
],
};
expect(prvs.contentRuleVectorStateKind(rule)).
toEqual(prvs.LOUD);
});
it("should understand missing highlight.value", function() {
const rule = {
actions: [
"notify",
{ set_tweak: "highlight" },
{ set_tweak: "sound", value: "default" },
],
};
expect(prvs.contentRuleVectorStateKind(rule)).
toEqual(prvs.LOUD);
});
});
});

View File

@@ -0,0 +1,75 @@
/*
Copyright 2016 OpenMarket Ltd
Copyright 2022 The Matrix.org Foundation C.I.C.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
import {
PushRuleActionName,
TweakHighlight,
TweakName,
TweakSound,
} from "matrix-js-sdk/src/matrix";
import { PushRuleVectorState } from "../../src/notifications";
describe("PushRuleVectorState", function() {
describe("contentRuleVectorStateKind", function() {
it("should understand normal notifications", function() {
const rule = {
actions: [
PushRuleActionName.Notify,
],
default: false,
enabled: false,
rule_id: '1',
};
expect(PushRuleVectorState.contentRuleVectorStateKind(rule)).
toEqual(PushRuleVectorState.ON);
});
it("should handle loud notifications", function() {
const rule = {
actions: [
PushRuleActionName.Notify,
{ set_tweak: TweakName.Highlight, value: true } as TweakHighlight,
{ set_tweak: TweakName.Sound, value: "default" } as TweakSound,
],
default: false,
enabled: false,
rule_id: '1',
};
expect(PushRuleVectorState.contentRuleVectorStateKind(rule)).
toEqual(PushRuleVectorState.LOUD);
});
it("should understand missing highlight.value", function() {
const rule = {
actions: [
PushRuleActionName.Notify,
{ set_tweak: TweakName.Highlight } as TweakHighlight,
{ set_tweak: TweakName.Sound, value: "default" } as TweakSound,
],
default: false,
enabled: false,
rule_id: '1',
};
expect(PushRuleVectorState.contentRuleVectorStateKind(rule)).
toEqual(PushRuleVectorState.LOUD);
});
});
});

View File

@@ -0,0 +1,83 @@
/*
Copyright 2022 The Matrix.org Foundation C.I.C.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
import { ClientWidgetApi, MatrixWidgetType } from "matrix-widget-api";
import "../skinned-sdk";
import { stubClient, mkRoom } from "../test-utils";
import { MatrixClientPeg } from "../../src/MatrixClientPeg";
import WidgetStore from "../../src/stores/WidgetStore";
import ActiveWidgetStore from "../../src/stores/ActiveWidgetStore";
import { WidgetMessagingStore } from "../../src/stores/widgets/WidgetMessagingStore";
import VideoChannelStore, { VideoChannelEvent } from "../../src/stores/VideoChannelStore";
import { VIDEO_CHANNEL } from "../../src/utils/VideoChannelUtils";
describe("VideoChannelStore", () => {
stubClient();
mkRoom(MatrixClientPeg.get(), "!1:example.org");
const videoStore = VideoChannelStore.instance;
const widgetStore = ActiveWidgetStore.instance;
jest.spyOn(WidgetStore.instance, "getApps").mockReturnValue([{
id: VIDEO_CHANNEL,
eventId: "$1:example.org",
roomId: "!1:example.org",
type: MatrixWidgetType.JitsiMeet,
url: "",
name: "Video channel",
creatorUserId: "@alice:example.org",
avatar_url: null,
}]);
jest.spyOn(WidgetMessagingStore.instance, "getMessagingForUid").mockReturnValue({
on: () => {},
off: () => {},
once: () => {},
transport: {
send: () => {},
reply: () => {},
},
} as unknown as ClientWidgetApi);
beforeEach(() => {
videoStore.start();
});
afterEach(() => {
videoStore.stop();
jest.clearAllMocks();
});
it("tracks connection state", async () => {
expect(videoStore.roomId).toBeFalsy();
const waitForConnect = new Promise<void>(resolve =>
videoStore.once(VideoChannelEvent.Connect, resolve),
);
widgetStore.setWidgetPersistence(VIDEO_CHANNEL, "!1:example.org", true);
await waitForConnect;
expect(videoStore.roomId).toEqual("!1:example.org");
const waitForDisconnect = new Promise<void>(resolve =>
videoStore.once(VideoChannelEvent.Disconnect, resolve),
);
widgetStore.setWidgetPersistence(VIDEO_CHANNEL, "!1:example.org", false);
await waitForDisconnect;
expect(videoStore.roomId).toBeFalsy();
});
});

View File

@@ -1,94 +0,0 @@
/*
Copyright 2022 The Matrix.org Foundation C.I.C.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
import { ClientWidgetApi, MatrixWidgetType } from "matrix-widget-api";
import { stubClient } from "../test-utils";
import WidgetStore from "../../src/stores/WidgetStore";
import { WidgetMessagingStore } from "../../src/stores/widgets/WidgetMessagingStore";
import { ElementWidgetActions } from "../../src/stores/widgets/ElementWidgetActions";
import VoiceChannelStore, { VoiceChannelEvent } from "../../src/stores/VoiceChannelStore";
import { VOICE_CHANNEL } from "../../src/utils/VoiceChannelUtils";
describe("VoiceChannelStore", () => {
// Set up mocks to simulate the remote end of the widget API
let messageSent;
let messageSendMock;
let onceMock;
beforeEach(() => {
stubClient();
let resolveMessageSent;
messageSent = new Promise(resolve => resolveMessageSent = resolve);
messageSendMock = jest.fn().mockImplementation(() => resolveMessageSent());
onceMock = jest.fn();
jest.spyOn(WidgetStore.instance, "getApps").mockReturnValue([{
id: VOICE_CHANNEL,
eventId: "$1:example.org",
roomId: "!1:example.org",
type: MatrixWidgetType.JitsiMeet,
url: "",
name: "Voice channel",
creatorUserId: "@alice:example.org",
avatar_url: null,
}]);
jest.spyOn(WidgetMessagingStore.instance, "getMessagingForUid").mockReturnValue({
on: () => {},
off: () => {},
once: onceMock,
transport: {
send: messageSendMock,
reply: () => {},
},
} as unknown as ClientWidgetApi);
});
it("connects and disconnects", async () => {
const store = VoiceChannelStore.instance;
expect(store.roomId).toBeFalsy();
store.connect("!1:example.org");
// Wait for the store to contact the widget API
await messageSent;
// Then, locate the callback that will confirm the join
const [, join] = onceMock.mock.calls.find(([action]) =>
action === `action:${ElementWidgetActions.JoinCall}`,
);
// Confirm the join, and wait for the store to update
const waitForConnect = new Promise<void>(resolve =>
store.once(VoiceChannelEvent.Connect, resolve),
);
join({ detail: {} });
await waitForConnect;
expect(store.roomId).toEqual("!1:example.org");
store.disconnect();
// Locate the callback that will perform the hangup
const [, hangup] = onceMock.mock.calls.find(([action]) =>
action === `action:${ElementWidgetActions.HangupCall}`,
);
// Hangup and wait for the store, once again
const waitForHangup = new Promise<void>(resolve =>
store.once(VoiceChannelEvent.Disconnect, resolve),
);
hangup({ detail: {} });
await waitForHangup;
expect(store.roomId).toBeFalsy();
});
});

View File

@@ -4,6 +4,6 @@ export * from './location';
export * from './platform';
export * from './room';
export * from './test-utils';
export * from './voice';
export * from './video';
export * from './wrappers';
export * from './utilities';

View File

@@ -367,7 +367,7 @@ export function mkStubRoom(roomId: string = null, name: string, client: MatrixCl
getAvatarUrl: () => 'mxc://avatar.url/room.png',
getMxcAvatarUrl: () => 'mxc://avatar.url/room.png',
isSpaceRoom: jest.fn().mockReturnValue(false),
isCallRoom: jest.fn().mockReturnValue(false),
isElementVideoRoom: jest.fn().mockReturnValue(false),
getUnreadNotificationCount: jest.fn(() => 0),
getEventReadUpTo: jest.fn(() => null),
getCanonicalAlias: jest.fn(),

39
test/test-utils/video.ts Normal file
View File

@@ -0,0 +1,39 @@
/*
Copyright 2022 The Matrix.org Foundation C.I.C.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
import { EventEmitter } from "events";
import VideoChannelStore, { VideoChannelEvent } from "../../src/stores/VideoChannelStore";
class StubVideoChannelStore extends EventEmitter {
private _roomId: string;
public get roomId(): string { return this._roomId; }
public connect = (roomId: string) => {
this._roomId = roomId;
this.emit(VideoChannelEvent.Connect);
};
public disconnect = () => {
this._roomId = null;
this.emit(VideoChannelEvent.Disconnect);
};
}
export const stubVideoChannelStore = (): StubVideoChannelStore => {
const store = new StubVideoChannelStore();
jest.spyOn(VideoChannelStore, "instance", "get").mockReturnValue(store as unknown as VideoChannelStore);
return store;
};

View File

@@ -1,60 +0,0 @@
/*
Copyright 2022 The Matrix.org Foundation C.I.C.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
import { EventEmitter } from "events";
import VoiceChannelStore, { VoiceChannelEvent } from "../../src/stores/VoiceChannelStore";
class StubVoiceChannelStore extends EventEmitter {
private _roomId: string;
public get roomId(): string { return this._roomId; }
private _audioMuted: boolean;
public get audioMuted(): boolean { return this._audioMuted; }
private _videoMuted: boolean;
public get videoMuted(): boolean { return this._videoMuted; }
public connect = jest.fn().mockImplementation(async (roomId: string) => {
this._roomId = roomId;
this._audioMuted = true;
this._videoMuted = true;
this.emit(VoiceChannelEvent.Connect);
});
public disconnect = jest.fn().mockImplementation(async () => {
this._roomId = null;
this.emit(VoiceChannelEvent.Disconnect);
});
public muteAudio = jest.fn().mockImplementation(async () => {
this._audioMuted = true;
this.emit(VoiceChannelEvent.MuteAudio);
});
public unmuteAudio = jest.fn().mockImplementation(async () => {
this._audioMuted = false;
this.emit(VoiceChannelEvent.UnmuteAudio);
});
public muteVideo = jest.fn().mockImplementation(async () => {
this._videoMuted = true;
this.emit(VoiceChannelEvent.MuteVideo);
});
public unmuteVideo = jest.fn().mockImplementation(async () => {
this._videoMuted = false;
this.emit(VoiceChannelEvent.UnmuteVideo);
});
}
export const stubVoiceChannelStore = () => {
jest.spyOn(VoiceChannelStore, "instance", "get")
.mockReturnValue(new StubVoiceChannelStore() as unknown as VoiceChannelStore);
};