chore: sets longer timeout for prebuild in admin and fields

This commit is contained in:
James
2024-04-05 15:49:12 -04:00
parent 0936f77930
commit 60dd71c59e
2 changed files with 12 additions and 4 deletions

View File

@@ -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<Config>({
dirname,
prebuild: Boolean(process.env.CI),
prebuild,
}))
geoUrl = new AdminUrlUtil(serverURL, geoCollectionSlug)
postsUrl = new AdminUrlUtil(serverURL, postsCollectionSlug)

View File

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