From 297c0c1d8bcdff13645f2add6194ac7ea1f1c532 Mon Sep 17 00:00:00 2001 From: kolaente Date: Sun, 5 Apr 2026 11:35:11 +0200 Subject: [PATCH] fix(e2e): seed project in empty-tasks overview test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- frontend/tests/e2e/task/overview.spec.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/frontend/tests/e2e/task/overview.spec.ts b/frontend/tests/e2e/task/overview.spec.ts index a27177f43..47bcc1295 100644 --- a/frontend/tests/e2e/task/overview.spec.ts +++ b/frontend/tests/e2e/task/overview.spec.ts @@ -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:')