diff --git a/test/admin/e2e.spec.ts b/test/admin/e2e.spec.ts index 3f8d8e6217..f278bf8e08 100644 --- a/test/admin/e2e.spec.ts +++ b/test/admin/e2e.spec.ts @@ -70,11 +70,15 @@ describe('admin', () => { let customViewsURL: AdminUrlUtil let serverURL: string - beforeAll(async ({ browser }) => { + beforeAll(async ({ browser }, testInfo) => { + const prebuild = Boolean(process.env.CI) + + if (prebuild) testInfo.setTimeout(testInfo.timeout * 2) + process.env.SEED_IN_CONFIG_ONINIT = 'false' // Makes it so the payload config onInit seed is not run. Otherwise, the seed would be run unnecessarily twice for the initial test run - once for beforeEach and once for onInit ;({ payload, serverURL } = await initPayloadE2ENoConfig({ dirname, - prebuild: Boolean(process.env.CI), + prebuild, })) geoUrl = new AdminUrlUtil(serverURL, geoCollectionSlug) postsUrl = new AdminUrlUtil(serverURL, postsCollectionSlug) diff --git a/test/fields/e2e.spec.ts b/test/fields/e2e.spec.ts index 3be0734e35..147487d2f7 100644 --- a/test/fields/e2e.spec.ts +++ b/test/fields/e2e.spec.ts @@ -42,11 +42,15 @@ let serverURL: string // If we want to make this run in parallel: test.describe.configure({ mode: 'parallel' }) describe('fields', () => { - beforeAll(async ({ browser }) => { + beforeAll(async ({ browser }, testInfo) => { + const prebuild = Boolean(process.env.CI) + + if (prebuild) testInfo.setTimeout(testInfo.timeout * 2) + process.env.SEED_IN_CONFIG_ONINIT = 'false' // Makes it so the payload config onInit seed is not run. Otherwise, the seed would be run unnecessarily twice for the initial test run - once for beforeEach and once for onInit ;({ payload, serverURL } = await initPayloadE2ENoConfig({ dirname, - prebuild: Boolean(process.env.CI), + prebuild, })) const context = await browser.newContext()