mirror of
https://github.com/go-vikunja/vikunja.git
synced 2026-05-10 15:15:41 -05:00
fix(e2e): seed project in empty-tasks overview test
With truncateAll wiping all tables, the test user has no projects, so ShowTasks never renders and tasksLoaded stays false — meaning ImportHint (which is gated on tasksLoaded) never appears. Seed a project with default views so the empty-state hint is visible.
This commit is contained in:
@@ -157,6 +157,11 @@ test.describe('Home Page Task Overview', () => {
|
||||
})
|
||||
|
||||
test('Should show the cta buttons for new project when there are no tasks', async ({authenticatedPage: page}) => {
|
||||
// Need a project so that ShowTasks renders (which sets tasksLoaded=true),
|
||||
// but no tasks so the ImportHint becomes visible.
|
||||
const project = (await ProjectFactory.create())[0]
|
||||
await createDefaultViews(project.id)
|
||||
|
||||
await page.goto('/')
|
||||
|
||||
await expect(page.locator('.home.app-content .content')).toContainText('Import your projects and tasks from other services into Vikunja:')
|
||||
|
||||
Reference in New Issue
Block a user