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:
kolaente
2026-04-05 11:35:11 +02:00
committed by kolaente
parent adcc74b056
commit 297c0c1d8b

View File

@@ -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:')