Update dependency @vector-im/compound-web to v0.9.4 (#11891)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
renovate[bot] 2023-12-14 11:10:01 +00:00 committed by GitHub
parent 4f19356492
commit 6669cb70e4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 288 additions and 86 deletions

View file

@ -34,6 +34,10 @@ import { PollHistoryDialog } from "../../../../src/components/views/dialogs/Poll
import { RoomPermalinkCreator } from "../../../../src/utils/permalinks/Permalinks";
import { _t } from "../../../../src/languageHandler";
import SettingsStore from "../../../../src/settings/SettingsStore";
import { tagRoom } from "../../../../src/utils/room/tagRoom";
import { DefaultTagID } from "../../../../src/stores/room-list/models";
jest.mock("../../../../src/utils/room/tagRoom");
describe("<RoomSummaryCard />", () => {
const userId = "@alice:domain.org";
@ -63,6 +67,9 @@ describe("<RoomSummaryCard />", () => {
isRoomEncrypted: jest.fn(),
getOrCreateFilter: jest.fn().mockResolvedValue({ filterId: 1 }),
getRoom: jest.fn(),
isGuest: jest.fn().mockReturnValue(false),
deleteRoomTag: jest.fn().mockResolvedValue({}),
setRoomTag: jest.fn().mockResolvedValue({}),
});
room = new Room(roomId, mockClient, userId);
const roomCreateEvent = new MatrixEvent({
@ -76,6 +83,7 @@ describe("<RoomSummaryCard />", () => {
state_key: "",
});
room.currentState.setStateEvents([roomCreateEvent]);
room.updateMyMembership("join");
jest.spyOn(Modal, "createDialog");
jest.spyOn(RightPanelStore.instance, "pushCard");
@ -133,6 +141,22 @@ describe("<RoomSummaryCard />", () => {
expect(Modal.createDialog).toHaveBeenCalledWith(ShareDialog, { target: room });
});
it("opens invite dialog on button click", () => {
const { getByText } = getComponent();
fireEvent.click(getByText(_t("action|invite")));
expect(defaultDispatcher.dispatch).toHaveBeenCalledWith({ action: "view_invite", roomId: room.roomId });
});
it("fires favourite dispatch on button click", () => {
const { getByText } = getComponent();
fireEvent.click(getByText(_t("room|context_menu|favourite")));
expect(tagRoom).toHaveBeenCalledWith(room, DefaultTagID.Favourite);
});
it("opens room settings on button click", () => {
const { getByText } = getComponent();