You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-08-07 21:23:00 +03:00
Align common_*
strings with Element X project in Localazy (#11434)
This commit is contained in:
committed by
GitHub
parent
1a49a38f04
commit
c40141cc4f
@@ -28,6 +28,8 @@ import { stubClient } from "../../../test-utils";
|
||||
import { MatrixClientPeg } from "../../../../src/MatrixClientPeg";
|
||||
import DMRoomMap from "../../../../src/utils/DMRoomMap";
|
||||
import SettingsStore from "../../../../src/settings/SettingsStore";
|
||||
import { EchoChamber } from "../../../../src/stores/local-echo/EchoChamber";
|
||||
import { RoomNotifState } from "../../../../src/RoomNotifs";
|
||||
|
||||
jest.mock("../../../../src/customisations/helpers/UIComponents", () => ({
|
||||
shouldShowComponent: jest.fn(),
|
||||
@@ -100,4 +102,15 @@ describe("RoomContextMenu", () => {
|
||||
expect(screen.getByText("Developer tools")).toBeInTheDocument();
|
||||
});
|
||||
});
|
||||
|
||||
it("should render notification option for joined rooms", () => {
|
||||
const chamber = EchoChamber.forRoom(room);
|
||||
chamber.notificationVolume = RoomNotifState.Mute;
|
||||
jest.spyOn(room, "getMyMembership").mockReturnValue("join");
|
||||
renderComponent();
|
||||
|
||||
expect(
|
||||
screen.getByRole("menuitem", { name: "Notifications" }).querySelector(".mx_IconizedContextMenu_sublabel"),
|
||||
).toHaveTextContent("Mute");
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user