diff --git a/e2e/USER_STORIES.md b/e2e/USER_STORIES.md index e2af3738..1075ec44 100644 --- a/e2e/USER_STORIES.md +++ b/e2e/USER_STORIES.md @@ -1410,8 +1410,8 @@ Acceptance: - Selecting "Dark" applies the dark theme to the document immediately, and "System" follows the OS color-scheme preference. - Choosing a different app theme applies it and persists after a reload. -- Dragging the font-size slider updates the displayed percentage and saves - without a separate save button. +- Dragging the font-size slider updates the displayed percentage, and saving the + page applies it and persists it across a reload. ### US-091 — Set up how people zap you diff --git a/e2e/specs/settings.spec.ts b/e2e/specs/settings.spec.ts index fe5f06db..c80a2418 100644 --- a/e2e/specs/settings.spec.ts +++ b/e2e/specs/settings.spec.ts @@ -155,8 +155,7 @@ test("US-088 adjust send delay and media servers", async ({seed, as}) => { const page = await as(users.alice, "/settings/content") - // The send delay is the only slider on this page. - await page.locator('input[type="range"]').fill("3000") + await page.getByLabel("Send delay").fill("3000") await page.getByRole("button", {name: "Add Server"}).click() await page.getByRole("listitem").first().locator("input").fill("https://media.test/") @@ -168,7 +167,7 @@ test("US-088 adjust send delay and media servers", async ({seed, as}) => { await waitForToastToClear(page) await page.reload() - await expect(page.locator('input[type="range"]')).toHaveValue("3000") + await expect(page.getByLabel("Send delay")).toHaveValue("3000") }) test("US-089 configure privacy preferences", async ({seed, as}) => { @@ -235,7 +234,7 @@ test("US-090 change the app's appearance", async ({seed, as}) => { space.relayList(user.alice) }) - const page = await as(users.alice, "/settings/theme", {context: {colorScheme: "light"}}) + const page = await as(users.alice, "/settings/content", {context: {colorScheme: "light"}}) const body = page.locator("body") await page.getByRole("button", {name: "Dark", exact: true}).click() @@ -259,11 +258,14 @@ test("US-090 change the app's appearance", async ({seed, as}) => { await expect(body).toHaveAttribute("data-fl-theme", "navy") - // Font size is the only slider on this page, and moving it is the save. - await page.locator('input[type="range"]').fill("1.25") + // Font size is a setting, so it goes out with the rest of the page. + await page.getByLabel("Font size").fill("1.25") + await page.getByRole("button", {name: "Save Changes"}).click() + await expect(page.getByRole("alert")).toContainText("Your settings have been saved!") await expect(page.locator("html")).toHaveAttribute("style", /font-size:\s*1\.25rem/) + await waitForToastToClear(page) await page.reload() await expect(page.locator("html")).toHaveAttribute("style", /font-size:\s*1\.25rem/) diff --git a/src/app/components/MenuSettings.svelte b/src/app/components/MenuSettings.svelte index 36e75e35..bc8a60ba 100644 --- a/src/app/components/MenuSettings.svelte +++ b/src/app/components/MenuSettings.svelte @@ -67,8 +67,6 @@