From 693a1fa7e0c7661e9c911d54ae3a2d33c0a2a010 Mon Sep 17 00:00:00 2001 From: Constantin Graf Date: Mon, 31 Aug 2026 11:52:55 +0200 Subject: [PATCH] Test still-running email preference --- e2e/profile.spec.ts | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/e2e/profile.spec.ts b/e2e/profile.spec.ts index 8f1b7d2d..b7815bb0 100644 --- a/e2e/profile.spec.ts +++ b/e2e/profile.spec.ts @@ -20,6 +20,12 @@ function profileInformationForm(page: Page) { .locator('xpath=ancestor::*[descendant::form][1]'); } +function notificationSettingsForm(page: Page) { + return page + .getByRole('heading', { name: 'Notifications', exact: true }) + .locator('xpath=ancestor::*[descendant::form][1]'); +} + async function saveProfileForm(page: Page): Promise { const form = profileInformationForm(page); await form.getByRole('button', { name: 'Save' }).click(); @@ -50,6 +56,22 @@ test('week-start change persists across reload', async ({ page }) => { await expect(page.getByLabel('Start of the week')).toHaveValue('sunday'); }); +test('still-running email notification setting persists across reload', async ({ page }) => { + await goToProfilePage(page); + const form = notificationSettingsForm(page); + const checkbox = form.getByLabel('Still-running time entry reminders'); + + await expect(checkbox).toBeChecked(); + await checkbox.uncheck(); + await form.getByRole('button', { name: 'Save' }).click(); + await expect(form.getByText('Saved.', { exact: true })).toBeVisible(); + + await page.reload(); + await expect( + notificationSettingsForm(page).getByLabel('Still-running time entry reminders') + ).not.toBeChecked(); +}); + test('profile photo can be uploaded, persists across reload, and can be removed', async ({ page, }) => {