From 79ac50b99b5a0eeb0861d8872c91b9a76b0b02a2 Mon Sep 17 00:00:00 2001 From: kolaente Date: Tue, 3 Mar 2026 15:40:49 +0100 Subject: [PATCH] fix(test): update mobile kanban test to use close button instead of back button The back button was removed from modal mode in the previous commit. On mobile kanban, tasks open as modals, so the test now uses the close button from the Heading component instead. --- frontend/tests/e2e/task/task.spec.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/frontend/tests/e2e/task/task.spec.ts b/frontend/tests/e2e/task/task.spec.ts index c3e9ec70e..c367047af 100644 --- a/frontend/tests/e2e/task/task.spec.ts +++ b/frontend/tests/e2e/task/task.spec.ts @@ -217,7 +217,7 @@ test.describe('Task', () => { await expect(page).toHaveURL(/\/projects\/1\/\d+/) }) - test('provides back navigation to the project in the kanban view on mobile', async ({authenticatedPage: page}) => { + test('provides close navigation to the project in the kanban view on mobile', async ({authenticatedPage: page}) => { await page.setViewportSize({width: 375, height: 667}) // iphone-8 const tasks = await TaskFactory.create(1, { @@ -237,8 +237,9 @@ test.describe('Task', () => { const taskLocator = page.locator('.kanban-view .tasks .task').first() await expect(taskLocator).toBeVisible({timeout: 10000}) await taskLocator.click() - await expect(page.locator('.task-view .back-button')).toBeVisible() - await page.locator('.task-view .back-button').click() + // On mobile, the task opens as a modal with a close button instead of a back button + await expect(page.locator('.task-view .task-properties .close')).toBeVisible() + await page.locator('.task-view .task-properties .close').click() await expect(page).toHaveURL(/\/projects\/\d+\/\d+/) })