chore: pre-builds in CI (#5690)

This commit is contained in:
James Mikrut
2024-04-06 14:10:25 -04:00
committed by GitHub
120 changed files with 505 additions and 345 deletions

View File

@@ -72,9 +72,16 @@ describe('admin', () => {
let disableDuplicateURL: 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 }))
;({ payload, serverURL } = await initPayloadE2ENoConfig<Config>({
dirname,
prebuild,
}))
geoUrl = new AdminUrlUtil(serverURL, geoCollectionSlug)
postsUrl = new AdminUrlUtil(serverURL, postsCollectionSlug)
customViewsURL = new AdminUrlUtil(serverURL, customViews2CollectionSlug)
@@ -1271,10 +1278,14 @@ describe('admin', () => {
const downChevron = page.locator('#heading-number .sort-column__desc')
await upChevron.click()
await page.waitForURL(/sort=number/)
await expect(page.locator('.row-1 .cell-number')).toHaveText('1')
await expect(page.locator('.row-2 .cell-number')).toHaveText('2')
await downChevron.click()
await page.waitForURL(/sort=-number/)
await expect(page.locator('.row-1 .cell-number')).toHaveText('2')
await expect(page.locator('.row-2 .cell-number')).toHaveText('1')
})