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:
co-authored by
renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Michael Telatynski
parent
4f19356492
commit
6669cb70e4
@@ -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();
|
||||
|
||||
|
||||
@@ -71,24 +71,24 @@ exports[`<RoomSummaryCard /> renders the room summary 1`] = `
|
||||
</section>
|
||||
</header>
|
||||
<div
|
||||
class="_separator_1uqhh_17"
|
||||
class="_separator_1dey0_17"
|
||||
data-orientation="horizontal"
|
||||
role="separator"
|
||||
/>
|
||||
<label
|
||||
class="_item_zxa40_17 _interactive_zxa40_36"
|
||||
class="_item_1bcsk_17 _interactive_1bcsk_36"
|
||||
data-kind="primary"
|
||||
for=":r1:"
|
||||
role="menuitemcheckbox"
|
||||
>
|
||||
<div
|
||||
aria-hidden="true"
|
||||
class="_icon_zxa40_49"
|
||||
class="_icon_1bcsk_44"
|
||||
height="24"
|
||||
width="24"
|
||||
/>
|
||||
<span
|
||||
class="_typography_yh5dq_162 _font-body-md-medium_yh5dq_69 _label_zxa40_58"
|
||||
class="_typography_yh5dq_162 _font-body-md-medium_yh5dq_69 _label_1bcsk_53"
|
||||
>
|
||||
Favourite
|
||||
</span>
|
||||
@@ -106,25 +106,24 @@ exports[`<RoomSummaryCard /> renders the room summary 1`] = `
|
||||
</div>
|
||||
</label>
|
||||
<button
|
||||
class="_item_zxa40_17 _interactive_zxa40_36 _disabled_zxa40_125"
|
||||
class="_item_1bcsk_17 _interactive_1bcsk_36"
|
||||
data-kind="primary"
|
||||
disabled=""
|
||||
role="menuitem"
|
||||
>
|
||||
<div
|
||||
aria-hidden="true"
|
||||
class="_icon_zxa40_49"
|
||||
class="_icon_1bcsk_44"
|
||||
height="24"
|
||||
width="24"
|
||||
/>
|
||||
<span
|
||||
class="_typography_yh5dq_162 _font-body-md-medium_yh5dq_69 _label_zxa40_58"
|
||||
class="_typography_yh5dq_162 _font-body-md-medium_yh5dq_69 _label_1bcsk_53"
|
||||
>
|
||||
Invite
|
||||
</span>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
class="_nav-hint_zxa40_65"
|
||||
class="_nav-hint_1bcsk_60"
|
||||
fill="none"
|
||||
height="24"
|
||||
viewBox="0 0 24 24"
|
||||
@@ -138,24 +137,24 @@ exports[`<RoomSummaryCard /> renders the room summary 1`] = `
|
||||
</svg>
|
||||
</button>
|
||||
<button
|
||||
class="_item_zxa40_17 _interactive_zxa40_36"
|
||||
class="_item_1bcsk_17 _interactive_1bcsk_36"
|
||||
data-kind="primary"
|
||||
role="menuitem"
|
||||
>
|
||||
<div
|
||||
aria-hidden="true"
|
||||
class="_icon_zxa40_49"
|
||||
class="_icon_1bcsk_44"
|
||||
height="24"
|
||||
width="24"
|
||||
/>
|
||||
<span
|
||||
class="_typography_yh5dq_162 _font-body-md-medium_yh5dq_69 _label_zxa40_58"
|
||||
class="_typography_yh5dq_162 _font-body-md-medium_yh5dq_69 _label_1bcsk_53"
|
||||
>
|
||||
Copy link
|
||||
</span>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
class="_nav-hint_zxa40_65"
|
||||
class="_nav-hint_1bcsk_60"
|
||||
fill="none"
|
||||
height="24"
|
||||
viewBox="0 0 24 24"
|
||||
@@ -169,24 +168,24 @@ exports[`<RoomSummaryCard /> renders the room summary 1`] = `
|
||||
</svg>
|
||||
</button>
|
||||
<button
|
||||
class="_item_zxa40_17 _interactive_zxa40_36"
|
||||
class="_item_1bcsk_17 _interactive_1bcsk_36"
|
||||
data-kind="primary"
|
||||
role="menuitem"
|
||||
>
|
||||
<div
|
||||
aria-hidden="true"
|
||||
class="_icon_zxa40_49"
|
||||
class="_icon_1bcsk_44"
|
||||
height="24"
|
||||
width="24"
|
||||
/>
|
||||
<span
|
||||
class="_typography_yh5dq_162 _font-body-md-medium_yh5dq_69 _label_zxa40_58"
|
||||
class="_typography_yh5dq_162 _font-body-md-medium_yh5dq_69 _label_1bcsk_53"
|
||||
>
|
||||
Settings
|
||||
</span>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
class="_nav-hint_zxa40_65"
|
||||
class="_nav-hint_1bcsk_60"
|
||||
fill="none"
|
||||
height="24"
|
||||
viewBox="0 0 24 24"
|
||||
@@ -200,29 +199,29 @@ exports[`<RoomSummaryCard /> renders the room summary 1`] = `
|
||||
</svg>
|
||||
</button>
|
||||
<div
|
||||
class="_separator_1uqhh_17"
|
||||
class="_separator_1dey0_17"
|
||||
data-orientation="horizontal"
|
||||
role="separator"
|
||||
/>
|
||||
<button
|
||||
class="_item_zxa40_17 _interactive_zxa40_36"
|
||||
class="_item_1bcsk_17 _interactive_1bcsk_36"
|
||||
data-kind="primary"
|
||||
role="menuitem"
|
||||
>
|
||||
<div
|
||||
aria-hidden="true"
|
||||
class="_icon_zxa40_49"
|
||||
class="_icon_1bcsk_44"
|
||||
height="24"
|
||||
width="24"
|
||||
/>
|
||||
<span
|
||||
class="_typography_yh5dq_162 _font-body-md-medium_yh5dq_69 _label_zxa40_58"
|
||||
class="_typography_yh5dq_162 _font-body-md-medium_yh5dq_69 _label_1bcsk_53"
|
||||
>
|
||||
People
|
||||
</span>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
class="_nav-hint_zxa40_65"
|
||||
class="_nav-hint_1bcsk_60"
|
||||
fill="none"
|
||||
height="24"
|
||||
viewBox="0 0 24 24"
|
||||
@@ -236,24 +235,24 @@ exports[`<RoomSummaryCard /> renders the room summary 1`] = `
|
||||
</svg>
|
||||
</button>
|
||||
<button
|
||||
class="_item_zxa40_17 _interactive_zxa40_36"
|
||||
class="_item_1bcsk_17 _interactive_1bcsk_36"
|
||||
data-kind="primary"
|
||||
role="menuitem"
|
||||
>
|
||||
<div
|
||||
aria-hidden="true"
|
||||
class="_icon_zxa40_49"
|
||||
class="_icon_1bcsk_44"
|
||||
height="24"
|
||||
width="24"
|
||||
/>
|
||||
<span
|
||||
class="_typography_yh5dq_162 _font-body-md-medium_yh5dq_69 _label_zxa40_58"
|
||||
class="_typography_yh5dq_162 _font-body-md-medium_yh5dq_69 _label_1bcsk_53"
|
||||
>
|
||||
Files
|
||||
</span>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
class="_nav-hint_zxa40_65"
|
||||
class="_nav-hint_1bcsk_60"
|
||||
fill="none"
|
||||
height="24"
|
||||
viewBox="0 0 24 24"
|
||||
@@ -267,24 +266,24 @@ exports[`<RoomSummaryCard /> renders the room summary 1`] = `
|
||||
</svg>
|
||||
</button>
|
||||
<button
|
||||
class="_item_zxa40_17 _interactive_zxa40_36"
|
||||
class="_item_1bcsk_17 _interactive_1bcsk_36"
|
||||
data-kind="primary"
|
||||
role="menuitem"
|
||||
>
|
||||
<div
|
||||
aria-hidden="true"
|
||||
class="_icon_zxa40_49"
|
||||
class="_icon_1bcsk_44"
|
||||
height="24"
|
||||
width="24"
|
||||
/>
|
||||
<span
|
||||
class="_typography_yh5dq_162 _font-body-md-medium_yh5dq_69 _label_zxa40_58"
|
||||
class="_typography_yh5dq_162 _font-body-md-medium_yh5dq_69 _label_1bcsk_53"
|
||||
>
|
||||
Poll history
|
||||
</span>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
class="_nav-hint_zxa40_65"
|
||||
class="_nav-hint_1bcsk_60"
|
||||
fill="none"
|
||||
height="24"
|
||||
viewBox="0 0 24 24"
|
||||
@@ -298,24 +297,24 @@ exports[`<RoomSummaryCard /> renders the room summary 1`] = `
|
||||
</svg>
|
||||
</button>
|
||||
<button
|
||||
class="_item_zxa40_17 _interactive_zxa40_36"
|
||||
class="_item_1bcsk_17 _interactive_1bcsk_36"
|
||||
data-kind="primary"
|
||||
role="menuitem"
|
||||
>
|
||||
<div
|
||||
aria-hidden="true"
|
||||
class="_icon_zxa40_49"
|
||||
class="_icon_1bcsk_44"
|
||||
height="24"
|
||||
width="24"
|
||||
/>
|
||||
<span
|
||||
class="_typography_yh5dq_162 _font-body-md-medium_yh5dq_69 _label_zxa40_58"
|
||||
class="_typography_yh5dq_162 _font-body-md-medium_yh5dq_69 _label_1bcsk_53"
|
||||
>
|
||||
Export Chat
|
||||
</span>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
class="_nav-hint_zxa40_65"
|
||||
class="_nav-hint_1bcsk_60"
|
||||
fill="none"
|
||||
height="24"
|
||||
viewBox="0 0 24 24"
|
||||
@@ -329,29 +328,29 @@ exports[`<RoomSummaryCard /> renders the room summary 1`] = `
|
||||
</svg>
|
||||
</button>
|
||||
<div
|
||||
class="_separator_1uqhh_17"
|
||||
class="_separator_1dey0_17"
|
||||
data-orientation="horizontal"
|
||||
role="separator"
|
||||
/>
|
||||
<button
|
||||
class="_item_zxa40_17 _interactive_zxa40_36"
|
||||
class="_item_1bcsk_17 _interactive_1bcsk_36"
|
||||
data-kind="critical"
|
||||
role="menuitem"
|
||||
>
|
||||
<div
|
||||
aria-hidden="true"
|
||||
class="_icon_zxa40_49"
|
||||
class="_icon_1bcsk_44"
|
||||
height="24"
|
||||
width="24"
|
||||
/>
|
||||
<span
|
||||
class="_typography_yh5dq_162 _font-body-md-medium_yh5dq_69 _label_zxa40_58"
|
||||
class="_typography_yh5dq_162 _font-body-md-medium_yh5dq_69 _label_1bcsk_53"
|
||||
>
|
||||
Leave room
|
||||
</span>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
class="_nav-hint_zxa40_65"
|
||||
class="_nav-hint_1bcsk_60"
|
||||
fill="none"
|
||||
height="24"
|
||||
viewBox="0 0 24 24"
|
||||
|
||||
Reference in New Issue
Block a user