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:
parent
adcc74b056
commit
297c0c1d8b
|
|
@ -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:')
|
||||
|
|
|
|||
Loading…
Reference in New Issue