mirror of
https://github.com/go-vikunja/vikunja.git
synced 2026-04-30 16:28:23 -05:00
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:
@@ -217,7 +217,7 @@ test.describe('Task', () => {
|
|||||||
await expect(page).toHaveURL(/\/projects\/1\/\d+/)
|
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
|
await page.setViewportSize({width: 375, height: 667}) // iphone-8
|
||||||
|
|
||||||
const tasks = await TaskFactory.create(1, {
|
const tasks = await TaskFactory.create(1, {
|
||||||
@@ -237,8 +237,9 @@ test.describe('Task', () => {
|
|||||||
const taskLocator = page.locator('.kanban-view .tasks .task').first()
|
const taskLocator = page.locator('.kanban-view .tasks .task').first()
|
||||||
await expect(taskLocator).toBeVisible({timeout: 10000})
|
await expect(taskLocator).toBeVisible({timeout: 10000})
|
||||||
await taskLocator.click()
|
await taskLocator.click()
|
||||||
await expect(page.locator('.task-view .back-button')).toBeVisible()
|
// On mobile, the task opens as a modal with a close button instead of a back button
|
||||||
await page.locator('.task-view .back-button').click()
|
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+/)
|
await expect(page).toHaveURL(/\/projects\/\d+\/\d+/)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user