From adcc74b056823f691039dafcfa2fdf995ec516e9 Mon Sep 17 00:00:00 2001 From: kolaente Date: Fri, 3 Apr 2026 21:31:18 +0200 Subject: [PATCH] fix: make apiContext auto-fixture and fix remaining view ID conflicts --- frontend/tests/e2e/task/task.spec.ts | 4 ++-- frontend/tests/support/fixtures.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/frontend/tests/e2e/task/task.spec.ts b/frontend/tests/e2e/task/task.spec.ts index ea1fef745..c8b55e81e 100644 --- a/frontend/tests/e2e/task/task.spec.ts +++ b/frontend/tests/e2e/task/task.spec.ts @@ -421,9 +421,9 @@ test.describe('Task', () => { test('Can move a task to another project', async ({authenticatedPage: page}) => { const projects = await ProjectFactory.create(2) - const views = await createDefaultViews(projects[0].id) + const views = await createDefaultViews(projects[0].id, 10) // Also create views for the target project - await createDefaultViews(projects[1].id, 5) + await createDefaultViews(projects[1].id, 14) await BucketFactory.create(2, { project_view_id: views[3].id, }) diff --git a/frontend/tests/support/fixtures.ts b/frontend/tests/support/fixtures.ts index 26ecf8b34..9b2af1c8c 100644 --- a/frontend/tests/support/fixtures.ts +++ b/frontend/tests/support/fixtures.ts @@ -8,7 +8,7 @@ export const test = base.extend<{ currentUser: any; userToken: string; }>({ - apiContext: async ({playwright}, use) => { + apiContext: [async ({playwright}, use) => { const baseURL = process.env.API_URL || 'http://localhost:3456/api/v1/' const apiContext = await playwright.request.newContext({ baseURL, @@ -18,7 +18,7 @@ export const test = base.extend<{ await Factory.truncateAll() await use(apiContext) await apiContext.dispose() - }, + }, {auto: true}], currentUser: async ({apiContext}, use) => { const user = await createFakeUser()