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.
This commit is contained in:
kolaente
2026-03-03 15:40:49 +01:00
parent 8a4f3a916f
commit 79ac50b99b

View File

@@ -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+/)
})