fix: make apiContext auto-fixture and fix remaining view ID conflicts

This commit is contained in:
kolaente 2026-04-03 21:31:18 +02:00 committed by kolaente
parent 4888b1d8ca
commit adcc74b056
2 changed files with 4 additions and 4 deletions

View File

@ -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,
})

View File

@ -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()