From 37d7f90acf1eaaef0bec108a0657a85adcd6280b Mon Sep 17 00:00:00 2001 From: kolaente Date: Tue, 21 Apr 2026 11:41:08 +0200 Subject: [PATCH] test(e2e): cover monthly repeat mode UI --- frontend/tests/e2e/task/recurrence.spec.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/frontend/tests/e2e/task/recurrence.spec.ts b/frontend/tests/e2e/task/recurrence.spec.ts index 46201bba8..d341cc430 100644 --- a/frontend/tests/e2e/task/recurrence.spec.ts +++ b/frontend/tests/e2e/task/recurrence.spec.ts @@ -58,4 +58,20 @@ test.describe('Task recurrence', () => { // future, the backend advances it by exactly one interval (86400s here). expect(newDue - originalDue.getTime()).toBeCloseTo(86_400_000, -3) }) + + test('monthly repeat mode hides the amount field', async ({authenticatedPage: page}) => { + const [task] = await TaskFactory.create(1, {id: 1, project_id: 1}, false) + await page.goto(`/tasks/${task.id}`) + + // Reveal the RepeatAfter component (hidden until the user activates it) + await page.getByRole('button', {name: 'Set Repeating Interval'}).click() + + await expect(page.locator('#repeatMode')).toBeVisible() + // Amount input is visible in the default repeat mode + await expect(page.locator('input[placeholder*="amount" i]')).toHaveCount(1) + + await page.locator('#repeatMode').selectOption({label: 'Monthly'}) + + await expect(page.locator('input[placeholder*="amount" i]')).toHaveCount(0) + }) })