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

@ -406,7 +406,7 @@ describe("MemberList", () => {
await flushPromises();
// button rendered but disabled
expect(screen.getByText("Invite to this room")).toBeDisabled();
expect(screen.getByText("Invite to this room")).toHaveAttribute("aria-disabled", "true");
});
it("renders enabled invite button when current user is a member and has rights to invite", async () => {

View file

@ -238,7 +238,7 @@ describe("RoomHeader", () => {
withClientContextRenderOptions(MatrixClientPeg.get()!),
);
for (const button of getAllByLabelText(container, "There's no one here to call")) {
expect(button).toBeDisabled();
expect(button).toHaveAttribute("aria-disabled", "true");
}
});
@ -250,8 +250,8 @@ describe("RoomHeader", () => {
);
const voiceButton = getByLabelText(container, "Voice call");
const videoButton = getByLabelText(container, "Video call");
expect(voiceButton).not.toBeDisabled();
expect(videoButton).not.toBeDisabled();
expect(voiceButton).not.toHaveAttribute("aria-disabled", "true");
expect(videoButton).not.toHaveAttribute("aria-disabled", "true");
const placeCallSpy = jest.spyOn(LegacyCallHandler.instance, "placeCall");
@ -273,7 +273,7 @@ describe("RoomHeader", () => {
withClientContextRenderOptions(MatrixClientPeg.get()!),
);
for (const button of getAllByLabelText(container, "Ongoing call")) {
expect(button).toBeDisabled();
expect(button).toHaveAttribute("aria-disabled", "true");
}
});
@ -285,8 +285,8 @@ describe("RoomHeader", () => {
withClientContextRenderOptions(MatrixClientPeg.get()!),
);
expect(getByLabelText(container, "Voice call")).not.toBeDisabled();
expect(getByLabelText(container, "Video call")).not.toBeDisabled();
expect(getByLabelText(container, "Voice call")).not.toHaveAttribute("aria-disabled", "true");
expect(getByLabelText(container, "Video call")).not.toHaveAttribute("aria-disabled", "true");
});
it("disable calls in large rooms by default", () => {
@ -298,10 +298,10 @@ describe("RoomHeader", () => {
);
expect(
getByLabelText(container, "You do not have permission to start voice calls", { selector: "button" }),
).toBeDisabled();
).toHaveAttribute("aria-disabled", "true");
expect(
getByLabelText(container, "You do not have permission to start video calls", { selector: "button" }),
).toBeDisabled();
).toHaveAttribute("aria-disabled", "true");
});
});
@ -324,7 +324,7 @@ describe("RoomHeader", () => {
expect(screen.queryByTitle("Voice call")).toBeNull();
const videoCallButton = getByLabelText(container, "Video call");
expect(videoCallButton).not.toBeDisabled();
expect(videoCallButton).not.toHaveAttribute("aria-disabled", "true");
const dispatcherSpy = jest.spyOn(dispatcher, "dispatch");
@ -345,7 +345,7 @@ describe("RoomHeader", () => {
<RoomHeader room={room} />,
withClientContextRenderOptions(MatrixClientPeg.get()!),
);
expect(getByLabelText(container, "Ongoing call")).toBeDisabled();
expect(getByLabelText(container, "Ongoing call")).toHaveAttribute("aria-disabled", "true");
});
it("clicking on ongoing (unpinned) call re-pins it", () => {
@ -362,7 +362,7 @@ describe("RoomHeader", () => {
<RoomHeader room={room} />,
withClientContextRenderOptions(MatrixClientPeg.get()!),
);
expect(getByLabelText(container, "Video call")).not.toBeDisabled();
expect(getByLabelText(container, "Video call")).not.toHaveAttribute("aria-disabled", "true");
fireEvent.click(getByLabelText(container, "Video call"));
expect(spy).toHaveBeenCalledWith(room, widget, Container.Top);
});
@ -378,7 +378,7 @@ describe("RoomHeader", () => {
withClientContextRenderOptions(MatrixClientPeg.get()!),
);
for (const button of getAllByLabelText(container, "Ongoing call")) {
expect(button).toBeDisabled();
expect(button).toHaveAttribute("aria-disabled", "true");
}
});
@ -389,7 +389,7 @@ describe("RoomHeader", () => {
withClientContextRenderOptions(MatrixClientPeg.get()!),
);
for (const button of getAllByLabelText(container, "There's no one here to call")) {
expect(button).toBeDisabled();
expect(button).toHaveAttribute("aria-disabled", "true");
}
});
@ -402,8 +402,8 @@ describe("RoomHeader", () => {
const voiceButton = getByLabelText(container, "Voice call");
const videoButton = getByLabelText(container, "Video call");
expect(voiceButton).not.toBeDisabled();
expect(videoButton).not.toBeDisabled();
expect(voiceButton).not.toHaveAttribute("aria-disabled", "true");
expect(videoButton).not.toHaveAttribute("aria-disabled", "true");
const placeCallSpy = jest.spyOn(LegacyCallHandler.instance, "placeCall");
fireEvent.click(voiceButton);
@ -428,8 +428,8 @@ describe("RoomHeader", () => {
const voiceButton = getByLabelText(container, "Voice call");
const videoButton = getByLabelText(container, "Video call");
expect(voiceButton).not.toBeDisabled();
expect(videoButton).not.toBeDisabled();
expect(voiceButton).not.toHaveAttribute("aria-disabled", "true");
expect(videoButton).not.toHaveAttribute("aria-disabled", "true");
const placeCallSpy = jest.spyOn(LegacyCallHandler.instance, "placeCall");
fireEvent.click(voiceButton);
@ -455,8 +455,8 @@ describe("RoomHeader", () => {
const voiceButton = getByLabelText(container, "Voice call");
const videoButton = getByLabelText(container, "Video call");
expect(voiceButton).not.toBeDisabled();
expect(videoButton).not.toBeDisabled();
expect(voiceButton).not.toHaveAttribute("aria-disabled", "true");
expect(videoButton).not.toHaveAttribute("aria-disabled", "true");
const dispatcherSpy = jest.spyOn(dispatcher, "dispatch");
fireEvent.click(videoButton);

View file

@ -3,9 +3,11 @@
exports[`<VideoRoomChatButton /> renders button when room is a video room 1`] = `
<button
aria-label="Chat"
class="_icon-button_1qjaf_17"
class="_icon-button_ur2sw_17"
data-state="closed"
role="button"
style="--cpd-icon-button-size: 32px;"
tabindex="0"
>
<div />
</button>
@ -14,10 +16,12 @@ exports[`<VideoRoomChatButton /> renders button when room is a video room 1`] =
exports[`<VideoRoomChatButton /> renders button with an unread marker when room is unread 1`] = `
<button
aria-label="Chat"
class="_icon-button_1qjaf_17"
class="_icon-button_ur2sw_17"
data-indicator="default"
data-state="closed"
role="button"
style="--cpd-icon-button-size: 32px;"
tabindex="0"
>
<div />
</button>

View file

@ -44,28 +44,34 @@ exports[`RoomHeader does not show the face pile for DMs 1`] = `
style="--mx-flex-display: flex; --mx-flex-direction: row; --mx-flex-align: center; --mx-flex-justify: start; --mx-flex-gap: var(--cpd-space-2x);"
>
<button
aria-disabled="true"
aria-label="There's no one here to call"
class="_icon-button_1qjaf_17"
class="_icon-button_ur2sw_17"
data-state="closed"
disabled=""
role="button"
style="--cpd-icon-button-size: 32px;"
tabindex="0"
>
<div />
</button>
<button
aria-disabled="true"
aria-label="There's no one here to call"
class="_icon-button_1qjaf_17"
class="_icon-button_ur2sw_17"
data-state="closed"
disabled=""
role="button"
style="--cpd-icon-button-size: 32px;"
tabindex="0"
>
<div />
</button>
<button
aria-label="Threads"
class="_icon-button_1qjaf_17"
class="_icon-button_ur2sw_17"
data-state="closed"
role="button"
style="--cpd-icon-button-size: 32px;"
tabindex="0"
>
<div />
</button>