* Use EditInPlace for identity server picker. * Update test * Add a test for setting an ID server. * fix tests * Reformat other :not sections * forgot a comma * Update Apperance settings to use toggle switches. * Remove unused checkbox setting. * Remove unused import. * Update tests * lint * update apperance screenshot * Begin replacing settings * Refactor RoomPublishSetting * Remove LabelledToggleSwitch * Refactor SettingsFlag to use SettingsToggleInput * Refactor CreateRoomDialog to use SettingsToggleInput * Refactor DeclineAndBlockInviteDialog to use SettingsToggleInput * Update DevtoolsDialog * Refactor ReportRoomDialog to use SettingsToggle * Update RoomUpgradeWarningDialog to use SettingsToggleInput * Update WidgetCapabilitiesPromptDialog to use SettingsToggleInput * Update trivial switchovers * Update Notifications settings to use SettingsFlag where possible * Update RoomPublishSetting and SpaceSettingVisibilityTab to use SettingsToggleInput with a warning * revert changes to field * Updated screenshots * Prevent accidental submits * Replace test ID tests * Create new snapshot tests * Add screenshot test for DeclineAndBlockDialog * Add screenshot for create room dialog. * Add devtools test * Add upgrade rooms test * Add widget capabilites prompt test * Fix spec * Add a test for the live location sharing prompt. * fix copyright * Add tests for notification settings * Add tests for user security tab. * Add test for room security tab. * Add test for video settings tab. * remove .only * Test creating a video room * Mask the IM name in the header. * Add spaces vis tab test. * Fixup unit tests to check correct attributes. * Various fixes to components for tests. * lint * Update compound * update setting names * Cleanup tests prettier Updates some more playwright tests Update more snapshots Update switch more fixes drop .only last screenshot round fix video room flake Remove console.logs Remove roomId from devtools view. lint final screenshot * Add playwright tests * import pages/ remove duplicate create-room * Update screenshots * Fix accessibility for devtools * Disable region test * Fixup headers * remove extra test * Fix permissions dialog * fixup tests * update snapshot * Update jest tests * Clear up playwright tests * update widget screenshot * Fix wrong snaps from using wrong compound version * Revert mistaken s/checkbox/switch/ * lint lint * Update headings * fix snap * remove unused * update snapshot * update tab screenshot * Update snapshots * Fix margins * Iterate Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Iterate Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Iterate Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Delint Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Iterate Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Iterate Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Iterate Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Iterate Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Update snapshot Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Update snapshot Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --------- Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
60 lines
2.2 KiB
TypeScript
60 lines
2.2 KiB
TypeScript
/*
|
|
Copyright 2024,2025 New Vector Ltd.
|
|
Copyright 2023 Suguru Hirahara
|
|
|
|
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 { expect, test } from ".";
|
|
|
|
test.describe("Appearance user settings tab", () => {
|
|
test.use({
|
|
displayName: "Hanako",
|
|
});
|
|
|
|
test("should be rendered properly", { tag: "@screenshot" }, async ({ page, user, app }) => {
|
|
const tab = await app.settings.openUserSettings("Appearance");
|
|
|
|
// Click "Show advanced" link button
|
|
await tab.getByRole("button", { name: "Show advanced" }).click();
|
|
|
|
// Assert that "Hide advanced" link button is rendered
|
|
await expect(tab.getByRole("button", { name: "Hide advanced" })).toBeVisible();
|
|
|
|
await expect(tab).toMatchScreenshot("appearance-tab.png");
|
|
});
|
|
|
|
test(
|
|
"should support changing font size by using the font size dropdown",
|
|
{ tag: "@screenshot" },
|
|
async ({ page, app, user }) => {
|
|
await app.settings.openUserSettings("Appearance");
|
|
|
|
const tab = page.getByTestId("mx_AppearanceUserSettingsTab");
|
|
const fontDropdown = tab.locator(".mx_FontScalingPanel_Dropdown");
|
|
await expect(fontDropdown.getByLabel("Font size")).toBeVisible();
|
|
|
|
// Default browser font size is 16px and the select value is 0
|
|
// -4 value is 12px
|
|
await fontDropdown.getByLabel("Font size").selectOption({ value: "-4" });
|
|
|
|
await expect(page).toMatchScreenshot("window-12px.png", { includeDialogBackground: true });
|
|
},
|
|
);
|
|
|
|
test("should support enabling system font", async ({ page, app, user }) => {
|
|
await app.settings.openUserSettings("Appearance");
|
|
const tab = page.getByTestId("mx_AppearanceUserSettingsTab");
|
|
|
|
// Click "Show advanced" link button
|
|
await tab.getByRole("button", { name: "Show advanced" }).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", '""');
|
|
});
|
|
});
|