You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-07-28 15:22:05 +03:00
Hide screenshare button in video rooms on Desktop (#9045)
* Hide screenshare button in video rooms on Desktop * Fix tests
This commit is contained in:
@ -19,7 +19,7 @@ import { MatrixClient } from "matrix-js-sdk/src/matrix";
|
||||
import { IDevice } from "matrix-js-sdk/src/crypto/deviceinfo";
|
||||
import { RoomType } from "matrix-js-sdk/src/@types/event";
|
||||
|
||||
import { stubClient, setupAsyncStoreWithClient } from "./test-utils";
|
||||
import { stubClient, setupAsyncStoreWithClient, mockPlatformPeg } from "./test-utils";
|
||||
import { MatrixClientPeg } from "../src/MatrixClientPeg";
|
||||
import WidgetStore from "../src/stores/WidgetStore";
|
||||
import WidgetUtils from "../src/utils/WidgetUtils";
|
||||
@ -27,12 +27,16 @@ import { VIDEO_CHANNEL_MEMBER } from "../src/utils/VideoChannelUtils";
|
||||
import createRoom, { canEncryptToAllUsers } from '../src/createRoom';
|
||||
|
||||
describe("createRoom", () => {
|
||||
mockPlatformPeg();
|
||||
|
||||
let client: MatrixClient;
|
||||
beforeEach(() => {
|
||||
stubClient();
|
||||
client = MatrixClientPeg.get();
|
||||
});
|
||||
|
||||
afterEach(() => jest.clearAllMocks());
|
||||
|
||||
it("sets up video rooms correctly", async () => {
|
||||
setupAsyncStoreWithClient(WidgetStore.instance, client);
|
||||
jest.spyOn(WidgetUtils, "waitForRoomWidget").mockResolvedValue();
|
||||
|
Reference in New Issue
Block a user