Allow reactions for broadcasts (#9856)
This commit is contained in:
parent
720bf0573a
commit
488a08a25e
7 changed files with 57 additions and 7 deletions
|
@ -42,14 +42,15 @@ import dispatcher from "../../../../src/dispatcher/dispatcher";
|
|||
import SettingsStore from "../../../../src/settings/SettingsStore";
|
||||
import { ReadPinsEventId } from "../../../../src/components/views/right_panel/types";
|
||||
import { Action } from "../../../../src/dispatcher/actions";
|
||||
import { mkVoiceBroadcastInfoStateEvent } from "../../../voice-broadcast/utils/test-utils";
|
||||
import { VoiceBroadcastInfoState } from "../../../../src/voice-broadcast";
|
||||
|
||||
jest.mock("../../../../src/utils/strings", () => ({
|
||||
copyPlaintext: jest.fn(),
|
||||
getSelectedText: jest.fn(),
|
||||
}));
|
||||
jest.mock("../../../../src/utils/EventUtils", () => ({
|
||||
// @ts-ignore don't mock everything
|
||||
...jest.requireActual("../../../../src/utils/EventUtils"),
|
||||
...(jest.requireActual("../../../../src/utils/EventUtils") as object),
|
||||
canEditContent: jest.fn(),
|
||||
}));
|
||||
jest.mock("../../../../src/dispatcher/dispatcher");
|
||||
|
@ -241,6 +242,17 @@ describe("MessageContextMenu", () => {
|
|||
expect(menu.find('div[aria-label="Forward"]')).toHaveLength(0);
|
||||
});
|
||||
|
||||
it("should not allow forwarding a voice broadcast", () => {
|
||||
const broadcastStartEvent = mkVoiceBroadcastInfoStateEvent(
|
||||
roomId,
|
||||
VoiceBroadcastInfoState.Started,
|
||||
"@user:example.com",
|
||||
"ABC123",
|
||||
);
|
||||
const menu = createMenu(broadcastStartEvent);
|
||||
expect(menu.find('div[aria-label="Forward"]')).toHaveLength(0);
|
||||
});
|
||||
|
||||
describe("forwarding beacons", () => {
|
||||
const aliceId = "@alice:server.org";
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue