Disable stopping a voice broadcast recording by click on the tile (#9436)

pull/28788/head^2
Michael Weimann 2022-10-17 16:54:33 +02:00 committed by GitHub
parent 631720b21b
commit 72d7939afc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 17 deletions

View File

@ -24,14 +24,10 @@ export const VoiceBroadcastRecordingBody: React.FC<VoiceBroadcastRecordingBodyPr
live, live,
room, room,
sender, sender,
stopRecording,
} = useVoiceBroadcastRecording(recording); } = useVoiceBroadcastRecording(recording);
return ( return (
<div <div className="mx_VoiceBroadcastRecordingBody">
className="mx_VoiceBroadcastRecordingBody"
onClick={stopRecording}
>
<VoiceBroadcastHeader <VoiceBroadcastHeader
live={live} live={live}
sender={sender} sender={sender}

View File

@ -16,12 +16,10 @@ limitations under the License.
import React from "react"; import React from "react";
import { render, RenderResult } from "@testing-library/react"; import { render, RenderResult } from "@testing-library/react";
import userEvent from "@testing-library/user-event";
import { MatrixClient, MatrixEvent } from "matrix-js-sdk/src/matrix"; import { MatrixClient, MatrixEvent } from "matrix-js-sdk/src/matrix";
import { import {
VoiceBroadcastInfoEventType, VoiceBroadcastInfoEventType,
VoiceBroadcastInfoState,
VoiceBroadcastRecording, VoiceBroadcastRecording,
VoiceBroadcastRecordingBody, VoiceBroadcastRecordingBody,
} from "../../../../src/voice-broadcast"; } from "../../../../src/voice-broadcast";
@ -64,16 +62,6 @@ describe("VoiceBroadcastRecordingBody", () => {
it("should render the expected HTML", () => { it("should render the expected HTML", () => {
expect(renderResult.container).toMatchSnapshot(); expect(renderResult.container).toMatchSnapshot();
}); });
describe("and clicked", () => {
beforeEach(async () => {
await userEvent.click(renderResult.getByText("My room"));
});
it("should stop the recording", () => {
expect(recording.getState()).toBe(VoiceBroadcastInfoState.Stopped);
});
});
}); });
describe("when rendering a non-live broadcast", () => { describe("when rendering a non-live broadcast", () => {