fix(test): replace project creation in history test with for loop

This fixes a race condition when the project_views table was locked.

For example https://github.com/go-vikunja/vikunja/actions/runs/19826720209/job/56802103014
This commit is contained in:
kolaente
2025-12-01 16:01:22 +01:00
parent dbb4046d51
commit e48a8d1717

View File

@@ -7,10 +7,12 @@ test.describe('Project History', () => {
test.setTimeout(60000)
const projects = await ProjectFactory.create(7)
await ProjectViewFactory.truncate()
await Promise.all(projects.map(p => ProjectViewFactory.create(1, {
id: p.id,
project_id: p.id,
}, false)))
for (const p of projects) {
await ProjectViewFactory.create(1, {
id: p.id,
project_id: p.id,
}, false)
}
const loadProjectArrayPromise = page.waitForResponse('**/api/v1/projects*')
await page.goto('/')