Align common_* strings with Element X project in Localazy (#11434)

This commit is contained in:
Michael Telatynski 2023-08-22 18:47:33 +01:00 committed by GitHub
parent 1a49a38f04
commit c40141cc4f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
132 changed files with 1491 additions and 1247 deletions

View file

@ -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");
});
});