Skip to content

Update settings toggles to use consistent design across app. #30169

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 57 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
8a9eb35
Use EditInPlace for identity server picker.
Half-Shot Feb 17, 2025
5aca14d
Update test
Half-Shot Feb 17, 2025
ef4d9ea
Add a test for setting an ID server.
Half-Shot Feb 17, 2025
956d936
fix tests
Half-Shot Feb 17, 2025
206304b
Reformat other :not sections
Half-Shot Feb 18, 2025
03da3b5
forgot a comma
Half-Shot Feb 18, 2025
ffedde2
Update Apperance settings to use toggle switches.
Half-Shot Feb 17, 2025
51cb4a5
Remove unused checkbox setting.
Half-Shot Feb 17, 2025
88e5260
Remove unused import.
Half-Shot Feb 17, 2025
a413ae3
Update tests
Half-Shot Feb 17, 2025
b4c926f
lint
Half-Shot Feb 17, 2025
57e8e51
update apperance screenshot
Half-Shot Feb 25, 2025
a3f1a8c
Merge branch 'develop' into hs/remove-legacy-setting-toggle
Half-Shot Feb 25, 2025
7723c0f
Merge remote-tracking branch 'origin/develop' into hs/remove-legacy-s…
Half-Shot Jun 17, 2025
e06e421
Begin replacing settings
Half-Shot Jun 17, 2025
b4e0979
Refactor RoomPublishSetting
Half-Shot Jun 19, 2025
0c40f53
Remove LabelledToggleSwitch
Half-Shot Jun 19, 2025
052cc07
Refactor SettingsFlag to use SettingsToggleInput
Half-Shot Jun 19, 2025
c59c724
Refactor CreateRoomDialog to use SettingsToggleInput
Half-Shot Jun 19, 2025
1ef5ba0
Refactor DeclineAndBlockInviteDialog to use SettingsToggleInput
Half-Shot Jun 19, 2025
c72ebed
Update DevtoolsDialog
Half-Shot Jun 19, 2025
6ff4ac8
Refactor ReportRoomDialog to use SettingsToggle
Half-Shot Jun 19, 2025
4a85b7c
Update RoomUpgradeWarningDialog to use SettingsToggleInput
Half-Shot Jun 19, 2025
58f59b2
Update WidgetCapabilitiesPromptDialog to use SettingsToggleInput
Half-Shot Jun 19, 2025
1a2aeb1
Update trivial switchovers
Half-Shot Jun 19, 2025
b58492f
Update Notifications settings to use SettingsFlag where possible
Half-Shot Jun 19, 2025
5454c2b
Update RoomPublishSetting and SpaceSettingVisibilityTab to use Settin…
Half-Shot Jun 19, 2025
cfb2f71
revert changes to field
Half-Shot Jun 19, 2025
5982a4c
Updated screenshots
Half-Shot Jun 19, 2025
452ff3b
Prevent accidental submits
Half-Shot Jun 23, 2025
782921f
Replace test ID tests
Half-Shot Jun 23, 2025
2c416f7
Create new snapshot tests
Half-Shot Jun 23, 2025
ff8e322
Merge remote-tracking branch 'origin/develop' into hs/update-toggles-…
Half-Shot Jul 7, 2025
d0daf2c
Add screenshot test for DeclineAndBlockDialog
Half-Shot Jul 7, 2025
47a640d
Add screenshot for create room dialog.
Half-Shot Jul 7, 2025
42e022e
Add devtools test
Half-Shot Jul 7, 2025
7e100f7
Add upgrade rooms test
Half-Shot Jul 7, 2025
a4e5e77
Add widget capabilites prompt test
Half-Shot Jul 7, 2025
01aaddf
Fix spec
Half-Shot Jul 7, 2025
d47dd66
Add a test for the live location sharing prompt.
Half-Shot Jul 8, 2025
b9020d7
fix copyright
Half-Shot Jul 8, 2025
2c857f8
Add tests for notification settings
Half-Shot Jul 8, 2025
ddb2136
Add tests for user security tab.
Half-Shot Jul 8, 2025
31e48c4
Add test for room security tab.
Half-Shot Jul 8, 2025
9d04af1
Add test for video settings tab.
Half-Shot Jul 8, 2025
fc49e0f
remove .only
Half-Shot Jul 8, 2025
cdd41d8
Test creating a video room
Half-Shot Jul 8, 2025
2da1cd2
Mask the IM name in the header.
Half-Shot Jul 8, 2025
f83bf60
Add spaces vis tab test.
Half-Shot Jul 8, 2025
7df3b45
Fixup unit tests to check correct attributes.
Half-Shot Jul 8, 2025
c81d600
Various fixes to components for tests.
Half-Shot Jul 9, 2025
8a1eb8b
lint
Half-Shot Jul 9, 2025
529e6be
Merge remote-tracking branch 'origin/develop' into hs/update-toggles-…
Half-Shot Jul 9, 2025
ba6fcbc
Update compound
Half-Shot Jul 14, 2025
79ab399
update setting names
Half-Shot Jul 14, 2025
59df028
Cleanup tests
Half-Shot Jul 14, 2025
7fe9d61
Merge branch 'develop' into hs/update-toggles-to-use-consistent-style
Half-Shot Jul 14, 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
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
"@types/png-chunks-extract": "^1.0.2",
"@types/react-virtualized": "^9.21.30",
"@vector-im/compound-design-tokens": "^5.0.0",
"@vector-im/compound-web": "^8.1.2",
"@vector-im/compound-web": "^8.2.0",
"@vector-im/matrix-wysiwyg": "2.38.4",
"@zxcvbn-ts/core": "^3.0.4",
"@zxcvbn-ts/language-common": "^3.0.4",
Expand Down
34 changes: 0 additions & 34 deletions playwright/e2e/create-room/create-room.spec.ts

This file was deleted.

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 @@ -300,9 +300,9 @@ export async function doTwoWaySasVerification(page: Page, verifier: JSHandle<Ver
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 enableKeyBackup(app: ElementAppPage): Promise<string> {
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
31 changes: 31 additions & 0 deletions playwright/e2e/devtools/devtools.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/*
Copyright 2025 New Vector Ltd.

SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
Please see LICENSE files in the repository root for full details.
*/

import { test, expect } from "../../element-web-test";

test.describe("Devtools", () => {
test.use({
displayName: "Alice",
});

test("should render the devtools", { tag: "@screenshot" }, async ({ page, homeserver, user, app }) => {
await app.client.createRoom({ name: "Test Room" });
await app.viewRoomByName("Test Room");

const composer = app.getComposer().locator("[contenteditable]");
await composer.fill("/devtools");
await composer.press("Enter");
const dialog = page.locator(".mx_Dialog");
await dialog.getByLabel("Developer mode").check();

await expect(dialog).toMatchScreenshot("devtools-dialog.png", {
css: `.mx_CopyableText {
display: none;
}`,
});
});
});
31 changes: 31 additions & 0 deletions playwright/e2e/devtools/upgraderoom.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/*
Copyright 2025 New Vector Ltd.

SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
Please see LICENSE files in the repository root for full details.
*/

import { SettingLevel } from "../../../src/settings/SettingLevel";
import { test, expect } from "../../element-web-test";

test.describe("Room upgrade dialog", () => {
test.use({
displayName: "Alice",
});

test("should render the room upgrade dialog", { tag: "@screenshot" }, async ({ page, homeserver, user, app }) => {
// Enable developer mode
await app.settings.setValue("developerMode", null, SettingLevel.ACCOUNT, true);

await app.client.createRoom({ name: "Test Room" });
await app.viewRoomByName("Test Room");

const composer = app.getComposer().locator("[contenteditable]");
// Pick a room version that is likely to be supported by all our target homeservers.
await composer.fill("/upgraderoom 5");
await composer.press("Enter");
const dialog = page.locator(".mx_Dialog");
await dialog.getByLabel("Automatically invite members from this room to the new one").check();
await expect(dialog).toMatchScreenshot("upgrade-room.png");
});
});
25 changes: 25 additions & 0 deletions playwright/e2e/invite/decline-and-block-invite-dialog.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/*
Copyright 2025 New Vector Ltd.

SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
Please see LICENSE files in the repository root for full details.
*/

import { test, expect } from "../../element-web-test";

test.describe("Decline and block invite dialog", function () {
test.use({
displayName: "Hanako",
});

test(
"should show decline and block dialog for a room",
{ tag: "@screenshot" },
async ({ page, app, user, bot }) => {
await bot.createRoom({ name: "Test Room", invite: [user.userId] });
await app.viewRoomByName("Test Room");
await page.getByRole("button", { name: "Decline and block" }).click();
await expect(page.locator(".mx_Dialog")).toMatchScreenshot("decline-and-block-invite-empty.png");
},
);
});
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
/*
* Copyright 2025 New Vector Ltd.
*
Expand Down Expand Up @@ -51,7 +51,7 @@
// Scroll to the end of the room list
await page.mouse.wheel(0, 1000);
await expect(roomListView.getByRole("gridcell", { name: "Open room room0" })).toBeVisible();
await expect(roomListView).toMatchScreenshot("room-list-scrolled.png");

Check failure on line 54 in playwright/e2e/left-panel/room-list-panel/room-list.spec.ts

View workflow job for this annotation

GitHub Actions / Run Tests [Chrome] 2/6

[Chrome] › playwright/e2e/left-panel/room-list-panel/room-list.spec.ts:44:13 › Room list › Room list › should render the room list @screenshot

1) [Chrome] › playwright/e2e/left-panel/room-list-panel/room-list.spec.ts:44:13 › Room list › Room list › should render the room list @screenshot Error: expect(locator).toHaveScreenshot(expected) 9210 pixels (ratio 0.05 of all image pixels) are different. Expected: /home/runner/work/element-web/element-web/playwright/snapshots/left-panel/room-list-panel/room-list.spec.ts/room-list-scrolled-linux.png Received: /home/runner/work/element-web/element-web/playwright/test-results/left-panel-room-list-panel-b32ce-should-render-the-room-list-Chrome/room-list-scrolled-actual.png Diff: /home/runner/work/element-web/element-web/playwright/test-results/left-panel-room-list-panel-b32ce-should-render-the-room-list-Chrome/room-list-scrolled-diff.png Call log: - Expect "toHaveScreenshot(room-list-scrolled.png)" with timeout 5000ms - verifying given screenshot expectation - waiting for getByTestId('room-list') - locator resolved to <div class="mx_RoomList" data-testid="room-list">…</div> - taking element screenshot - disabled all CSS animations - waiting for fonts to load... - fonts loaded - attempting scroll into view action - waiting for element to be stable - 9210 pixels (ratio 0.05 of all image pixels) are different. - waiting 100ms before taking screenshot - waiting for getByTestId('room-list') - locator resolved to <div class="mx_RoomList" data-testid="room-list">…</div> - taking element screenshot - disabled all CSS animations - waiting for fonts to load... - fonts loaded - attempting scroll into view action - waiting for element to be stable - captured a stable screenshot - 9210 pixels (ratio 0.05 of all image pixels) are different. 52 | await page.mouse.wheel(0, 1000); 53 | await expect(roomListView.getByRole("gridcell", { name: "Open room room0" })).toBeVisible(); > 54 | await expect(roomListView).toMatchScreenshot("room-list-scrolled.png"); | ^ 55 | }); 56 | 57 | test("should open the room when it is clicked", async ({ page, app, user }) => { at /home/runner/work/element-web/element-web/playwright/e2e/left-panel/room-list-panel/room-list.spec.ts:54:40
});

test("should open the room when it is clicked", async ({ page, app, user }) => {
Expand Down Expand Up @@ -147,7 +147,7 @@
await page.mouse.wheel(0, 1000);

await expect(roomListView.getByRole("gridcell", { name: "Open room room0" })).toBeVisible();
await roomListView.getByRole("gridcell", { name: "Open room room0" }).click();

Check failure on line 150 in playwright/e2e/left-panel/room-list-panel/room-list.spec.ts

View workflow job for this annotation

GitHub Actions / Run Tests [Chrome] 2/6

[Chrome] › playwright/e2e/left-panel/room-list-panel/room-list.spec.ts:142:13 › Room list › Room list › should scroll to the current room

2) [Chrome] › playwright/e2e/left-panel/room-list-panel/room-list.spec.ts:142:13 › Room list › Room list › should scroll to the current room Error: locator.click: Test timeout of 30000ms exceeded. Call log: - waiting for getByTestId('room-list').getByRole('gridcell', { name: 'Open room room0' }) 148 | 149 | await expect(roomListView.getByRole("gridcell", { name: "Open room room0" })).toBeVisible(); > 150 | await roomListView.getByRole("gridcell", { name: "Open room room0" }).click(); | ^ 151 | 152 | const filters = page.getByRole("listbox", { name: "Room list filters" }); 153 | await filters.getByRole("option", { name: "People" }).click(); at /home/runner/work/element-web/element-web/playwright/e2e/left-panel/room-list-panel/room-list.spec.ts:150:83

const filters = page.getByRole("listbox", { name: "Room list filters" });
await filters.getByRole("option", { name: "People" }).click();
Expand Down Expand Up @@ -402,7 +402,9 @@
await app.settings.closeDialog();

await app.settings.openUserSettings("Notifications");
await page.getByText("Show all activity in the room list (dots or number of unread messages)").click();
await page
.getByRole("switch", { name: "Show all activity in the room list (dots or number of unread messages)" })
.check();
await app.settings.closeDialog();

// Switch to the other room to avoid the notification to be cleared
Expand Down
18 changes: 17 additions & 1 deletion playwright/e2e/location/location.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright 2024 New Vector Ltd.
Copyright 2024, 2025 New Vector Ltd.
Copyright 2022 The Matrix.org Foundation C.I.C.

SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
Expand Down Expand Up @@ -57,4 +57,20 @@ test.describe("Location sharing", { tag: "@no-firefox" }, () => {

await expect(page.locator(".mx_Marker")).toBeVisible();
});

test(
"is prompted for and can consent to live location sharing",
{ tag: "@screenshot" },
async ({ page, user, app }) => {
await app.viewRoomById(await app.client.createRoom({}));

const composerOptions = await app.openMessageComposerOptions();
await composerOptions.getByRole("menuitem", { name: "Location", exact: true }).click();
const menu = page.locator(".mx_LocationShareMenu");

await menu.getByRole("button", { name: "My live location" }).click();
await menu.getByLabel("Enable live location sharing").check();
await expect(menu).toMatchScreenshot("location-live-share-dialog.png");
},
);
});
11 changes: 5 additions & 6 deletions playwright/e2e/room-directory/room-directory.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,11 @@ test.describe("Room Directory", () => {
// Publish into the public rooms directory
const publishedAddresses = page.locator(".mx_SettingsFieldset", { hasText: "Published Addresses" });
await expect(publishedAddresses.locator("#canonicalAlias")).toHaveValue(`#gaming:${user.homeServer}`);
const checkbox = publishedAddresses
.locator(".mx_SettingsFlag", {
hasText: `Publish this room to the public in ${user.homeServer}'s room directory?`,
})
.getByRole("switch");
await checkbox.check();
const checkbox = publishedAddresses.getByRole("switch", {
name: `Publish this room to the public in ${user.homeServer}'s room directory?`,
});
// .click() rather than .check() as checking happens after publish
await checkbox.click();
await expect(checkbox).toBeChecked();

await app.closeDialog();
Expand Down
64 changes: 64 additions & 0 deletions playwright/e2e/room/create-room.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
/*
Copyright 2025 New Vector Ltd.

SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
Please see LICENSE files in the repository root for full details.
*/

import { SettingLevel } from "../../../src/settings/SettingLevel";
import { test, expect } from "../../element-web-test";

const name = "Test room";
const topic = "A decently explanatory topic for a test room.";

test.describe("Create Room", () => {
test.use({ displayName: "Jim" });

test(
"should create a public room with name, topic & address set",
{ tag: "@screenshot" },
async ({ page, user, app }) => {
const dialog = await app.openCreateRoomDialog();
// Fill name & topic
await dialog.getByRole("textbox", { name: "Name" }).fill(name);
await dialog.getByRole("textbox", { name: "Topic" }).fill(topic);
// Change room to public
await dialog.getByRole("button", { name: "Room visibility" }).click();
await dialog.getByRole("option", { name: "Public room" }).click();
// Fill room address
await dialog.getByRole("textbox", { name: "Room address" }).fill("test-create-room-standard");
// Snapshot it
await expect(dialog).toMatchScreenshot("create-room.png");

// Submit
await dialog.getByRole("button", { name: "Create room" }).click();

await expect(page).toHaveURL(new RegExp(`/#/room/#test-create-room-standard:${user.homeServer}`));
const header = page.locator(".mx_RoomHeader");
await expect(header).toContainText(name);
},
);

test("should create a video room", { tag: "@screenshot" }, async ({ page, user, app }) => {
await app.settings.setValue("feature_video_rooms", null, SettingLevel.DEVICE, true);

const dialog = await app.openCreateRoomDialog("New video room");
// Fill name & topic
await dialog.getByRole("textbox", { name: "Name" }).fill(name);
await dialog.getByRole("textbox", { name: "Topic" }).fill(topic);
// Change room to public
await dialog.getByRole("button", { name: "Room visibility" }).click();
await dialog.getByRole("option", { name: "Public room" }).click();
// Fill room address
await dialog.getByRole("textbox", { name: "Room address" }).fill("test-create-room-video");
// Snapshot it
await expect(dialog).toMatchScreenshot("create-video-room.png");

// Submit
await dialog.getByRole("button", { name: "Create video room" }).click();

await expect(page).toHaveURL(new RegExp(`/#/room/#test-create-room-video:${user.homeServer}`));
const header = page.locator(".mx_RoomHeader");
await expect(header).toContainText(name);
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ test.describe("Appearance user settings tab", () => {
// Click "Show advanced" link button
await tab.getByRole("button", { name: "Show advanced" }).click();

await tab.getByLabel("Use bundled emoji font").click();
await tab.getByLabel("Use a system font").click();
await tab.getByRole("switch", { name: "Use bundled emoji font" }).click();
await tab.getByRole("switch", { name: "Use a system font" }).click();

// Assert that the font-family value was removed
await expect(page.locator("body")).toHaveCSS("font-family", '""');
Expand Down
10 changes: 5 additions & 5 deletions playwright/e2e/settings/appearance-user-settings-tab/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ class Helpers {
/**
* Return the system theme toggle
*/
getMatchSystemThemeCheckbox() {
return this.getThemePanel().getByRole("checkbox", { name: "Match system theme" });
getMatchSystemThemeSwitch() {
return this.getThemePanel().getByRole("switch", { name: "Match system theme" });
}

/**
Expand Down Expand Up @@ -216,10 +216,10 @@ class Helpers {
}

/**
* Return the compact layout checkbox
* Return the compact layout switch
*/
getCompactLayoutCheckbox() {
return this.getMessageLayoutPanel().getByRole("checkbox", { name: "Show compact text and messages" });
getCompactLayoutSwitch() {
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 @@ -40,9 +40,9 @@ test.describe("Appearance user settings tab", () => {
);

test("should enable compact layout when the modern layout is selected", async ({ page, app, user, util }) => {
await expect(util.getCompactLayoutCheckbox()).not.toBeChecked();
await expect(util.getCompactLayoutSwitch()).not.toBeChecked();

await util.getCompactLayoutCheckbox().click();
await util.getCompactLayoutSwitch().click();
await util.assertCompactLayout();
});

Expand All @@ -52,11 +52,11 @@ test.describe("Appearance user settings tab", () => {
user,
util,
}) => {
await expect(util.getCompactLayoutCheckbox()).not.toBeDisabled();
await expect(util.getCompactLayoutSwitch()).not.toBeDisabled();

// Select the bubble layout, which should disable the compact layout checkbox
await util.getBubbleLayout().click();
await expect(util.getCompactLayoutCheckbox()).toBeDisabled();
await expect(util.getCompactLayoutSwitch()).toBeDisabled();
});
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ test.describe("Appearance user settings tab", () => {
{ tag: "@screenshot" },
async ({ page, app, util }) => {
// Assert that 'Match system theme' is not checked
await expect(util.getMatchSystemThemeCheckbox()).not.toBeChecked();
await expect(util.getMatchSystemThemeSwitch()).not.toBeChecked();

// Assert that the light theme is selected
await expect(util.getLightTheme()).toBeChecked();
Expand All @@ -41,7 +41,7 @@ test.describe("Appearance user settings tab", () => {
"should disable the themes when the system theme is clicked",
{ tag: "@screenshot" },
async ({ page, app, util }) => {
await util.getMatchSystemThemeCheckbox().click();
await util.getMatchSystemThemeSwitch().click();

// Assert that the themes are disabled
await expect(util.getLightTheme()).toBeDisabled();
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
Loading
Loading