Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
54f325e
Update vector-im
renovate[bot] Jul 31, 2025
a8856ca
Update snapshots
t3chguy Aug 5, 2025
19e6aaf
Update tests
t3chguy Aug 5, 2025
b578393
Make BaseDialog's div keyboard focusable and fix test.
langleyd Aug 27, 2025
97653c1
Merge branch 'develop' of github.com:vector-im/element-web into renov…
langleyd Aug 27, 2025
f76a535
Update more e2e tests to use switch instead of checkbox
langleyd Aug 27, 2025
9dddaf7
Merge branch 'develop' of github.com:vector-im/element-web into renov…
langleyd Aug 27, 2025
e06d76e
fix useParticipants incorrectly returning an array when a map is expe…
langleyd Aug 27, 2025
c45ad30
Try again to fix calParticipants
langleyd Aug 27, 2025
f83093c
try fix RoomHeader tests again by also mocking useParticipants
langleyd Aug 27, 2025
e456782
Revert "try fix RoomHeader tests again by also mocking useParticipants"
langleyd Aug 27, 2025
fb502a6
Try with no dependencies
langleyd Aug 27, 2025
92034aa
try mocking useCall rather than just useParticipantCount
langleyd Aug 27, 2025
644be31
Mock the call store rather than the hook
langleyd Aug 27, 2025
043d812
Only mock the call object for tests that expect it.
langleyd Aug 27, 2025
8e67cfe
Revert "Only mock the call object for tests that expect it."
langleyd Aug 27, 2025
667827e
Revert "Mock the call store rather than the hook"
langleyd Aug 27, 2025
3900a1e
Revert "try mocking useCall rather than just useParticipantCount"
langleyd Aug 27, 2025
f396b28
Revert "Try with no dependencies"
langleyd Aug 27, 2025
6cf8dc5
Reapply "try fix RoomHeader tests again by also mocking useParticipants"
langleyd Aug 27, 2025
db50519
Revert "try fix RoomHeader tests again by also mocking useParticipants"
langleyd Aug 27, 2025
f67825c
Revert "Try again to fix calParticipants"
langleyd Aug 27, 2025
fecb387
Revert "fix useParticipants incorrectly returning an array when a map…
langleyd Aug 27, 2025
934c2dc
Merge branch 'develop' of github.com:vector-im/element-web into renov…
langleyd Aug 28, 2025
1164141
bump compound-web
langleyd Aug 28, 2025
35019df
Update snapshots
langleyd Aug 28, 2025
0c907c5
Fix bad merge, we don't need the second call to escape. The comment a…
langleyd Aug 28, 2025
e2c1be4
Trigger build to fix licence/cla check
langleyd Aug 28, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions playwright/e2e/crypto/toasts.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ test.describe("'Turn on key storage' toast", () => {
await toast.getByRole("button", { name: "Continue" }).click();

// Then we see the Encryption settings dialog with an option to turn on key storage
await expect(page.getByRole("checkbox", { name: "Allow key storage" })).toBeVisible();
await expect(page.getByRole("switch", { name: "Allow key storage" })).toBeVisible();

// And when we close that
await page.getByRole("button", { name: "Close dialog" }).click();
Expand All @@ -153,7 +153,7 @@ test.describe("'Turn on key storage' toast", () => {
await page.getByRole("button", { name: "Go to Settings" }).click();

// Then we see Encryption settings again
await expect(page.getByRole("checkbox", { name: "Allow key storage" })).toBeVisible();
await expect(page.getByRole("switch", { name: "Allow key storage" })).toBeVisible();

// And when we close that, see the toast, click Dismiss, and Yes, Dismiss
await page.getByRole("button", { name: "Close dialog" }).click();
Expand Down
10 changes: 5 additions & 5 deletions playwright/e2e/crypto/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@
// The key backup version is as expected
expect(backupInfo.version).toBe(expectedBackupVersion);
// The active backup version is as expected
expect(activeBackupVersion).toBe(expectedBackupVersion);

Check failure on line 195 in playwright/e2e/crypto/utils.ts

View workflow job for this annotation

GitHub Actions / Run Tests [Chrome] 6/6

[Chrome] › playwright/e2e/crypto/backups-mas.spec.ts:23:9 › Encryption state after registration › Key backup is enabled by default

1) [Chrome] › playwright/e2e/crypto/backups-mas.spec.ts:23:9 › Encryption state after registration › Key backup is enabled by default Error: expect(received).toBe(expected) // Object.is equality Expected: "1" Received: null at crypto/utils.ts:195 193 | expect(backupInfo.version).toBe(expectedBackupVersion); 194 | // The active backup version is as expected > 195 | expect(activeBackupVersion).toBe(expectedBackupVersion); | ^ 196 | // The backup key is stored in 4S 197 | if (checkBackupKeyIn4S) expect(backupKeyIn4S).toBe(true); 198 | at checkDeviceIsConnectedKeyBackup (/home/runner/work/element-web/element-web/playwright/e2e/crypto/utils.ts:195:33) at /home/runner/work/element-web/element-web/playwright/e2e/crypto/backups-mas.spec.ts:38:9
// The backup key is stored in 4S
if (checkBackupKeyIn4S) expect(backupKeyIn4S).toBe(true);

Expand Down Expand Up @@ -300,9 +300,9 @@
export async function enableKeyBackup(app: ElementAppPage): Promise<string> {
const encryptionTab = await app.settings.openUserSettings("Encryption");

const keyStorageToggle = encryptionTab.getByRole("checkbox", { name: "Allow key storage" });
const keyStorageToggle = encryptionTab.getByRole("switch", { name: "Allow key storage" });
if (!(await keyStorageToggle.isChecked())) {
await encryptionTab.getByRole("checkbox", { name: "Allow key storage" }).click();
await encryptionTab.getByRole("switch", { name: "Allow key storage" }).click();
}

await encryptionTab.getByRole("button", { name: "Set up recovery" }).click();
Expand All @@ -323,11 +323,11 @@
export async function disableKeyBackup(app: ElementAppPage): Promise<void> {
const encryptionTab = await app.settings.openUserSettings("Encryption");

const keyStorageToggle = encryptionTab.getByRole("checkbox", { name: "Allow key storage" });
const keyStorageToggle = encryptionTab.getByRole("switch", { name: "Allow key storage" });
if (await keyStorageToggle.isChecked()) {
await encryptionTab.getByRole("checkbox", { name: "Allow key storage" }).click();
await encryptionTab.getByRole("switch", { name: "Allow key storage" }).click();
await encryptionTab.getByRole("button", { name: "Delete key storage" }).click();
await encryptionTab.getByRole("checkbox", { name: "Allow key storage" }).isVisible();
await encryptionTab.getByRole("switch", { name: "Allow key storage" }).isVisible();

// Wait for the update to account data to stick
await new Promise((resolve) => setTimeout(resolve, 2000));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ class Helpers {
* Return the system theme toggle
*/
getMatchSystemThemeCheckbox() {
return this.getThemePanel().getByRole("checkbox", { name: "Match system theme" });
return this.getThemePanel().getByRole("switch", { name: "Match system theme" });
}

/**
Expand Down Expand Up @@ -219,7 +219,7 @@ class Helpers {
* Return the compact layout checkbox
*/
getCompactLayoutCheckbox() {
return this.getMessageLayoutPanel().getByRole("checkbox", { name: "Show compact text and messages" });
return this.getMessageLayoutPanel().getByRole("switch", { name: "Show compact text and messages" });
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ test.describe("Encryption tab", () => {
await verifySession(app, recoveryKey.encodedPrivateKey);
await util.openEncryptionTab();

await page.getByRole("checkbox", { name: "Allow key storage" }).click();
await page.getByRole("switch", { name: "Allow key storage" }).click();

await expect(
page.getByRole("heading", { name: "Are you sure you want to turn off key storage and delete it?" }),
Expand All @@ -136,7 +136,7 @@ test.describe("Encryption tab", () => {

await page.getByRole("button", { name: "Delete key storage" }).click();

await expect(page.getByRole("checkbox", { name: "Allow key storage" })).not.toBeChecked();
await expect(page.getByRole("switch", { name: "Allow key storage" })).not.toBeChecked();

for (const prom of deleteRequestPromises) {
const request = await prom;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ exports[`DevtoolsDialog renders the devtools dialog 1`] = `
>
Room ID: !id
<div
aria-describedby="«r2»"
aria-label="Copy"
class="mx_AccessibleButton mx_CopyableText_copyButton"
role="button"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ exports[`LogoutDialog Prompts user to go to settings if there is a backup on the
</details>
</div>
<div
aria-describedby="«rq»"
aria-label="Close dialog"
class="mx_AccessibleButton mx_Dialog_cancelButton"
role="button"
Expand Down Expand Up @@ -162,6 +163,7 @@ exports[`LogoutDialog Prompts user to go to settings if there is no backup on th
</details>
</div>
<div
aria-describedby="«r10»"
aria-label="Close dialog"
class="mx_AccessibleButton mx_Dialog_cancelButton"
role="button"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ exports[`<MessageEditHistory /> should match the snapshot 1`] = `
</div>
</div>
<div
aria-describedby="«r2»"
aria-label="Close dialog"
class="mx_AccessibleButton mx_Dialog_cancelButton"
role="button"
Expand Down Expand Up @@ -317,6 +318,7 @@ exports[`<MessageEditHistory /> should support events with 1`] = `
</div>
</div>
<div
aria-describedby="«r8»"
aria-label="Close dialog"
class="mx_AccessibleButton mx_Dialog_cancelButton"
role="button"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,7 @@ exports[`<RestoreKeyBackupDialog /> should render 1`] = `
</div>
</div>
<div
aria-describedby="«r2»"
aria-label="Close dialog"
class="mx_AccessibleButton mx_Dialog_cancelButton"
role="button"
Expand Down Expand Up @@ -484,6 +485,7 @@ exports[`<RestoreKeyBackupDialog /> should restore key backup when the key is ca
</div>
</div>
<div
aria-describedby="«rk»"
aria-label="Close dialog"
class="mx_AccessibleButton mx_Dialog_cancelButton"
role="button"
Expand Down Expand Up @@ -550,6 +552,7 @@ exports[`<RestoreKeyBackupDialog /> should restore key backup when the key is in
</div>
</div>
<div
aria-describedby="«rq»"
aria-label="Close dialog"
class="mx_AccessibleButton mx_Dialog_cancelButton"
role="button"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -340,8 +340,8 @@ exports[`AppTile for a pinned widget should render permission request 1`] = `
<span>
Using this widget may share data
<div
aria-describedby="«r2j»"
aria-labelledby="«r2i»"
aria-describedby="«r2n»"
aria-labelledby="«r2m»"
class="mx_TextWithTooltip_target mx_TextWithTooltip_target--helpIcon"
>
<svg
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ exports[`<ImageView /> renders correctly 1`] = `
class="mx_ImageView_toolbar"
>
<div
aria-describedby="«r2»"
aria-label="Zoom out"
class="mx_AccessibleButton mx_ImageView_button mx_ImageView_button_zoomOut"
role="button"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ exports[`<LocationViewDialog /> renders map correctly 1`] = `
class="mx_ZoomButtons"
>
<div
aria-describedby="«r6»"
aria-label="Zoom in"
class="mx_AccessibleButton mx_ZoomButtons_button"
data-testid="map-zoom-in-button"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ exports[`<RoomSummaryCard /> has button to edit topic 1`] = `
aria-hidden="true"
class="_input_19o42_24"
id="«rv»"
role="switch"
type="checkbox"
/>
<div
Expand Down Expand Up @@ -939,6 +940,7 @@ exports[`<RoomSummaryCard /> renders the room summary 1`] = `
aria-hidden="true"
class="_input_19o42_24"
id="«r5»"
role="switch"
type="checkbox"
/>
<div
Expand Down Expand Up @@ -1701,6 +1703,7 @@ exports[`<RoomSummaryCard /> renders the room topic in the summary 1`] = `
aria-hidden="true"
class="_input_19o42_24"
id="«ri»"
role="switch"
type="checkbox"
/>
<div
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ exports[`<PinnedEventTile /> should render the menu with all the options 1`] = `
aria-label="Open menu"
aria-labelledby="radix-«r10»"
aria-orientation="vertical"
class="_menu_19sse_8"
class="_menu_1glhz_8"
data-align="start"
data-orientation="vertical"
data-radix-menu-content=""
Expand Down Expand Up @@ -376,7 +376,7 @@ exports[`<PinnedEventTile /> should render the menu without unpin and delete 1`]
aria-label="Open menu"
aria-labelledby="radix-«rl»"
aria-orientation="vertical"
class="_menu_19sse_8"
class="_menu_1glhz_8"
data-align="start"
data-orientation="vertical"
data-radix-menu-content=""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,20 +70,20 @@ describe("<LayoutSwitcher />", () => {
await SettingsStore.setValue("useCompactLayout", null, SettingLevel.DEVICE, true);
await renderLayoutSwitcher();

expect(screen.getByRole("checkbox", { name: "Show compact text and messages" })).toBeChecked();
expect(screen.getByRole("switch", { name: "Show compact text and messages" })).toBeChecked();
});

it("should change the setting when toggled", async () => {
await renderLayoutSwitcher();
act(() => screen.getByRole("checkbox", { name: "Show compact text and messages" }).click());
act(() => screen.getByRole("switch", { name: "Show compact text and messages" }).click());

await waitFor(() => expect(SettingsStore.getValue("useCompactLayout")).toBe(true));
});

it("should be disabled when the modern layout is not enabled", async () => {
await SettingsStore.setValue("layout", null, SettingLevel.DEVICE, Layout.Bubble);
await renderLayoutSwitcher();
expect(screen.getByRole("checkbox", { name: "Show compact text and messages" })).toBeDisabled();
expect(screen.getByRole("switch", { name: "Show compact text and messages" })).toBeDisabled();
});
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -56,24 +56,24 @@ describe("<ThemeChoicePanel />", () => {
describe("system theme", () => {
it("should disable Match system theme", async () => {
render(<ThemeChoicePanel />);
expect(screen.getByRole("checkbox", { name: "Match system theme" })).not.toBeChecked();
expect(screen.getByRole("switch", { name: "Match system theme" })).not.toBeChecked();
});

it("should enable Match system theme", async () => {
await enableSystemTheme(true);

render(<ThemeChoicePanel />);
expect(screen.getByRole("checkbox", { name: "Match system theme" })).toBeChecked();
expect(screen.getByRole("switch", { name: "Match system theme" })).toBeChecked();
});

it("should change the system theme when clicked", async () => {
jest.spyOn(SettingsStore, "setValue");

render(<ThemeChoicePanel />);
act(() => screen.getByRole("checkbox", { name: "Match system theme" }).click());
act(() => screen.getByRole("switch", { name: "Match system theme" }).click());

// The system theme should be enabled
expect(screen.getByRole("checkbox", { name: "Match system theme" })).toBeChecked();
expect(screen.getByRole("switch", { name: "Match system theme" })).toBeChecked();
expect(SettingsStore.setValue).toHaveBeenCalledWith("use_system_theme", null, "device", true);
});
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,7 @@ exports[`<LayoutSwitcher /> should render 1`] = `
class="_input_19o42_24"
id="radix-«rr»"
name="compactLayout"
role="switch"
title=""
type="checkbox"
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ exports[`<ThemeChoicePanel /> custom theme should display custom theme 1`] = `
class="_input_19o42_24"
id="radix-«r28»"
name="systemTheme"
role="switch"
title=""
type="checkbox"
/>
Expand Down Expand Up @@ -312,6 +313,7 @@ exports[`<ThemeChoicePanel /> custom theme should render the custom theme sectio
class="_input_19o42_24"
id="radix-«r10»"
name="systemTheme"
role="switch"
title=""
type="checkbox"
/>
Expand Down Expand Up @@ -590,6 +592,7 @@ exports[`<ThemeChoicePanel /> renders the theme choice UI 1`] = `
class="_input_19o42_24"
id="radix-«r0»"
name="systemTheme"
role="switch"
title=""
type="checkbox"
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ describe("<AdvancedPanel />", () => {
await renderAdvancedPanel();

expect(screen.getByTestId("otherSettings")).toMatchSnapshot();
const checkbox = screen.getByRole("checkbox", {
const checkbox = screen.getByRole("switch", {
name: "In encrypted rooms, only send messages to verified users",
});
expect(checkbox).toBeChecked();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@ exports[`<AdvancedPanel /> <OtherSettings /> should display the blacklist of unv
class="_input_19o42_24"
id="radix-«r6»"
name="neverSendEncrypted"
role="switch"
title=""
type="checkbox"
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -561,6 +561,7 @@ exports[`AppearanceUserSettingsTab should render 1`] = `
class="_input_19o42_24"
id="radix-«ru»"
name="compactLayout"
role="switch"
title=""
type="checkbox"
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ exports[`ThreadsActivityCentre renders notifications matching the snapshot 1`] =
<div
aria-labelledby="radix-«r2f»"
aria-orientation="vertical"
class="_menu_19sse_8"
class="_menu_1glhz_8"
data-align="start"
data-orientation="vertical"
data-radix-menu-content=""
Expand All @@ -17,7 +17,7 @@ exports[`ThreadsActivityCentre renders notifications matching the snapshot 1`] =
tabindex="-1"
>
<h3
class="_typography_6v6n8_153 _font-body-sm-semibold_6v6n8_36 _menu-title_1sgvx_8 _title_19sse_74"
class="_typography_6v6n8_153 _font-body-sm-semibold_6v6n8_36 _menu-title_1sgvx_8 _title_1glhz_74"
id="«r2n»"
>
Threads activity
Expand Down Expand Up @@ -230,7 +230,7 @@ exports[`ThreadsActivityCentre should close the release announcement when the TA
<div
aria-labelledby="radix-«ro»"
aria-orientation="vertical"
class="_menu_19sse_8"
class="_menu_1glhz_8"
data-align="start"
data-orientation="vertical"
data-radix-menu-content=""
Expand All @@ -243,7 +243,7 @@ exports[`ThreadsActivityCentre should close the release announcement when the TA
tabindex="-1"
>
<h3
class="_typography_6v6n8_153 _font-body-sm-semibold_6v6n8_36 _menu-title_1sgvx_8 _title_19sse_74"
class="_typography_6v6n8_153 _font-body-sm-semibold_6v6n8_36 _menu-title_1sgvx_8 _title_1glhz_74"
id="«r10»"
>
Threads activity
Expand Down Expand Up @@ -273,7 +273,7 @@ exports[`ThreadsActivityCentre should match snapshot when empty 1`] = `
<div
aria-labelledby="radix-«r33»"
aria-orientation="vertical"
class="_menu_19sse_8"
class="_menu_1glhz_8"
data-align="start"
data-orientation="vertical"
data-radix-menu-content=""
Expand All @@ -286,7 +286,7 @@ exports[`ThreadsActivityCentre should match snapshot when empty 1`] = `
tabindex="-1"
>
<h3
class="_typography_6v6n8_153 _font-body-sm-semibold_6v6n8_36 _menu-title_1sgvx_8 _title_19sse_74"
class="_typography_6v6n8_153 _font-body-sm-semibold_6v6n8_36 _menu-title_1sgvx_8 _title_1glhz_74"
id="«r3b»"
>
Threads activity
Expand All @@ -307,7 +307,7 @@ exports[`ThreadsActivityCentre should order the room with the same notification
<div
aria-labelledby="radix-«r3c»"
aria-orientation="vertical"
class="_menu_19sse_8"
class="_menu_1glhz_8"
data-align="start"
data-orientation="vertical"
data-radix-menu-content=""
Expand All @@ -320,7 +320,7 @@ exports[`ThreadsActivityCentre should order the room with the same notification
tabindex="-1"
>
<h3
class="_typography_6v6n8_153 _font-body-sm-semibold_6v6n8_36 _menu-title_1sgvx_8 _title_19sse_74"
class="_typography_6v6n8_153 _font-body-sm-semibold_6v6n8_36 _menu-title_1sgvx_8 _title_1glhz_74"
id="«r3k»"
>
Threads activity
Expand Down
Loading
Loading