Prevent to start two broadcasts at the same time (#9744)
This commit is contained in:
parent
16e92a4d8c
commit
ce554276db
2 changed files with 41 additions and 6 deletions
|
@ -87,6 +87,7 @@ describe("VoiceBroadcastPreRecordingPip", () => {
|
|||
});
|
||||
jest.spyOn(MediaDeviceHandler.instance, "setDevice").mockImplementation();
|
||||
preRecording = new VoiceBroadcastPreRecording(room, sender, client, playbacksStore, recordingsStore);
|
||||
jest.spyOn(preRecording, "start").mockResolvedValue();
|
||||
});
|
||||
|
||||
afterAll(() => {
|
||||
|
@ -106,6 +107,19 @@ describe("VoiceBroadcastPreRecordingPip", () => {
|
|||
expect(renderResult.container).toMatchSnapshot();
|
||||
});
|
||||
|
||||
describe("and double clicking »Go live«", () => {
|
||||
beforeEach(async () => {
|
||||
await act(async () => {
|
||||
await userEvent.click(screen.getByText("Go live"));
|
||||
await userEvent.click(screen.getByText("Go live"));
|
||||
});
|
||||
});
|
||||
|
||||
it("should call start once", () => {
|
||||
expect(preRecording.start).toHaveBeenCalledTimes(1);
|
||||
});
|
||||
});
|
||||
|
||||
describe("and clicking the room name", () => {
|
||||
beforeEach(async () => {
|
||||
await userEvent.click(screen.getByText(room.name));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue