chore: deflake joins e2e tests (#11034)
Previously, data created by other tests was also leaking into unrelated tests, causing them to fail. The new reset-db-between-tests logic added by this PR fixes this. Additionally, this increases playwright timeouts for CI, and adds a specific timeout override for opening a drawer, as it was incredibly slow in CI
This commit is contained in:
@@ -56,7 +56,7 @@ describe('Array', () => {
|
|||||||
if (client) {
|
if (client) {
|
||||||
await client.logout()
|
await client.logout()
|
||||||
}
|
}
|
||||||
client = new RESTClient(null, { defaultSlug: 'users', serverURL })
|
client = new RESTClient({ defaultSlug: 'users', serverURL })
|
||||||
await client.login()
|
await client.login()
|
||||||
|
|
||||||
await ensureCompilationIsDone({ page, serverURL })
|
await ensureCompilationIsDone({ page, serverURL })
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ describe('Block fields', () => {
|
|||||||
if (client) {
|
if (client) {
|
||||||
await client.logout()
|
await client.logout()
|
||||||
}
|
}
|
||||||
client = new RESTClient(null, { defaultSlug: 'users', serverURL })
|
client = new RESTClient({ defaultSlug: 'users', serverURL })
|
||||||
await client.login()
|
await client.login()
|
||||||
|
|
||||||
await ensureCompilationIsDone({ page, serverURL })
|
await ensureCompilationIsDone({ page, serverURL })
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ describe('Checkboxes', () => {
|
|||||||
if (client) {
|
if (client) {
|
||||||
await client.logout()
|
await client.logout()
|
||||||
}
|
}
|
||||||
client = new RESTClient(null, { defaultSlug: 'users', serverURL })
|
client = new RESTClient({ defaultSlug: 'users', serverURL })
|
||||||
await client.login()
|
await client.login()
|
||||||
await ensureCompilationIsDone({ page, serverURL })
|
await ensureCompilationIsDone({ page, serverURL })
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ describe('Collapsibles', () => {
|
|||||||
if (client) {
|
if (client) {
|
||||||
await client.logout()
|
await client.logout()
|
||||||
}
|
}
|
||||||
client = new RESTClient(null, { defaultSlug: 'users', serverURL })
|
client = new RESTClient({ defaultSlug: 'users', serverURL })
|
||||||
await client.login()
|
await client.login()
|
||||||
await ensureCompilationIsDone({ page, serverURL })
|
await ensureCompilationIsDone({ page, serverURL })
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ describe('Conditional Logic', () => {
|
|||||||
if (client) {
|
if (client) {
|
||||||
await client.logout()
|
await client.logout()
|
||||||
}
|
}
|
||||||
client = new RESTClient(null, { defaultSlug: 'users', serverURL })
|
client = new RESTClient({ defaultSlug: 'users', serverURL })
|
||||||
await client.login()
|
await client.login()
|
||||||
await ensureCompilationIsDone({ page, serverURL })
|
await ensureCompilationIsDone({ page, serverURL })
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ describe('Custom IDs', () => {
|
|||||||
if (client) {
|
if (client) {
|
||||||
await client.logout()
|
await client.logout()
|
||||||
}
|
}
|
||||||
client = new RESTClient(null, { defaultSlug: 'users', serverURL })
|
client = new RESTClient({ defaultSlug: 'users', serverURL })
|
||||||
await client.login()
|
await client.login()
|
||||||
await ensureCompilationIsDone({ page, serverURL })
|
await ensureCompilationIsDone({ page, serverURL })
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ describe('Date', () => {
|
|||||||
if (client) {
|
if (client) {
|
||||||
await client.logout()
|
await client.logout()
|
||||||
}
|
}
|
||||||
client = new RESTClient(null, { defaultSlug: 'users', serverURL })
|
client = new RESTClient({ defaultSlug: 'users', serverURL })
|
||||||
await client.login()
|
await client.login()
|
||||||
|
|
||||||
await ensureCompilationIsDone({ page, serverURL })
|
await ensureCompilationIsDone({ page, serverURL })
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ describe('Email', () => {
|
|||||||
if (client) {
|
if (client) {
|
||||||
await client.logout()
|
await client.logout()
|
||||||
}
|
}
|
||||||
client = new RESTClient(null, { defaultSlug: 'users', serverURL })
|
client = new RESTClient({ defaultSlug: 'users', serverURL })
|
||||||
await client.login()
|
await client.login()
|
||||||
|
|
||||||
await ensureCompilationIsDone({ page, serverURL })
|
await ensureCompilationIsDone({ page, serverURL })
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ describe('Radio', () => {
|
|||||||
if (client) {
|
if (client) {
|
||||||
await client.logout()
|
await client.logout()
|
||||||
}
|
}
|
||||||
client = new RESTClient(null, { defaultSlug: 'users', serverURL })
|
client = new RESTClient({ defaultSlug: 'users', serverURL })
|
||||||
await client.login()
|
await client.login()
|
||||||
await ensureCompilationIsDone({ page, serverURL })
|
await ensureCompilationIsDone({ page, serverURL })
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ describe('JSON', () => {
|
|||||||
if (client) {
|
if (client) {
|
||||||
await client.logout()
|
await client.logout()
|
||||||
}
|
}
|
||||||
client = new RESTClient(null, { defaultSlug: 'users', serverURL })
|
client = new RESTClient({ defaultSlug: 'users', serverURL })
|
||||||
await client.login()
|
await client.login()
|
||||||
await ensureCompilationIsDone({ page, serverURL })
|
await ensureCompilationIsDone({ page, serverURL })
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -223,7 +223,7 @@ describe('lexicalBlocks', () => {
|
|||||||
if (client) {
|
if (client) {
|
||||||
await client.logout()
|
await client.logout()
|
||||||
}
|
}
|
||||||
client = new RESTClient(null, { defaultSlug: 'rich-text-fields', serverURL })
|
client = new RESTClient({ defaultSlug: 'rich-text-fields', serverURL })
|
||||||
await client.login()
|
await client.login()
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -94,7 +94,7 @@ describe('lexicalMain', () => {
|
|||||||
if (client) {
|
if (client) {
|
||||||
await client.logout()
|
await client.logout()
|
||||||
}
|
}
|
||||||
client = new RESTClient(null, { defaultSlug: 'rich-text-fields', serverURL })
|
client = new RESTClient({ defaultSlug: 'rich-text-fields', serverURL })
|
||||||
await client.login()
|
await client.login()
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ describe('Number', () => {
|
|||||||
if (client) {
|
if (client) {
|
||||||
await client.logout()
|
await client.logout()
|
||||||
}
|
}
|
||||||
client = new RESTClient(null, { defaultSlug: 'users', serverURL })
|
client = new RESTClient({ defaultSlug: 'users', serverURL })
|
||||||
await client.login()
|
await client.login()
|
||||||
await ensureCompilationIsDone({ page, serverURL })
|
await ensureCompilationIsDone({ page, serverURL })
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ describe('Point', () => {
|
|||||||
if (client) {
|
if (client) {
|
||||||
await client.logout()
|
await client.logout()
|
||||||
}
|
}
|
||||||
client = new RESTClient(null, { defaultSlug: 'users', serverURL })
|
client = new RESTClient({ defaultSlug: 'users', serverURL })
|
||||||
await client.login()
|
await client.login()
|
||||||
|
|
||||||
await ensureCompilationIsDone({ page, serverURL })
|
await ensureCompilationIsDone({ page, serverURL })
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ describe('Radio', () => {
|
|||||||
if (client) {
|
if (client) {
|
||||||
await client.logout()
|
await client.logout()
|
||||||
}
|
}
|
||||||
client = new RESTClient(null, { defaultSlug: 'users', serverURL })
|
client = new RESTClient({ defaultSlug: 'users', serverURL })
|
||||||
await client.login()
|
await client.login()
|
||||||
await ensureCompilationIsDone({ page, serverURL })
|
await ensureCompilationIsDone({ page, serverURL })
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ describe('relationship', () => {
|
|||||||
if (client) {
|
if (client) {
|
||||||
await client.logout()
|
await client.logout()
|
||||||
}
|
}
|
||||||
client = new RESTClient(null, { defaultSlug: 'users', serverURL })
|
client = new RESTClient({ defaultSlug: 'users', serverURL })
|
||||||
await client.login()
|
await client.login()
|
||||||
|
|
||||||
await ensureCompilationIsDone({ page, serverURL })
|
await ensureCompilationIsDone({ page, serverURL })
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ describe('Rich Text', () => {
|
|||||||
if (client) {
|
if (client) {
|
||||||
await client.logout()
|
await client.logout()
|
||||||
}
|
}
|
||||||
client = new RESTClient(null, { defaultSlug: 'users', serverURL })
|
client = new RESTClient({ defaultSlug: 'users', serverURL })
|
||||||
await client.login()
|
await client.login()
|
||||||
|
|
||||||
await ensureCompilationIsDone({ page, serverURL })
|
await ensureCompilationIsDone({ page, serverURL })
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ describe('Row', () => {
|
|||||||
if (client) {
|
if (client) {
|
||||||
await client.logout()
|
await client.logout()
|
||||||
}
|
}
|
||||||
client = new RESTClient(null, { defaultSlug: 'users', serverURL })
|
client = new RESTClient({ defaultSlug: 'users', serverURL })
|
||||||
await client.login()
|
await client.login()
|
||||||
await ensureCompilationIsDone({ page, serverURL })
|
await ensureCompilationIsDone({ page, serverURL })
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ describe('Radio', () => {
|
|||||||
if (client) {
|
if (client) {
|
||||||
await client.logout()
|
await client.logout()
|
||||||
}
|
}
|
||||||
client = new RESTClient(null, { defaultSlug: 'users', serverURL })
|
client = new RESTClient({ defaultSlug: 'users', serverURL })
|
||||||
await client.login()
|
await client.login()
|
||||||
await ensureCompilationIsDone({ page, serverURL })
|
await ensureCompilationIsDone({ page, serverURL })
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ describe('Tabs', () => {
|
|||||||
if (client) {
|
if (client) {
|
||||||
await client.logout()
|
await client.logout()
|
||||||
}
|
}
|
||||||
client = new RESTClient(null, { defaultSlug: 'users', serverURL })
|
client = new RESTClient({ defaultSlug: 'users', serverURL })
|
||||||
await client.login()
|
await client.login()
|
||||||
|
|
||||||
await ensureCompilationIsDone({ page, serverURL })
|
await ensureCompilationIsDone({ page, serverURL })
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ describe('Tabs', () => {
|
|||||||
if (client) {
|
if (client) {
|
||||||
await client.logout()
|
await client.logout()
|
||||||
}
|
}
|
||||||
client = new RESTClient(null, { defaultSlug: 'users', serverURL })
|
client = new RESTClient({ defaultSlug: 'users', serverURL })
|
||||||
await client.login()
|
await client.login()
|
||||||
|
|
||||||
await ensureCompilationIsDone({ page, serverURL })
|
await ensureCompilationIsDone({ page, serverURL })
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ describe('Text', () => {
|
|||||||
if (client) {
|
if (client) {
|
||||||
await client.logout()
|
await client.logout()
|
||||||
}
|
}
|
||||||
client = new RESTClient(null, { defaultSlug: 'users', serverURL })
|
client = new RESTClient({ defaultSlug: 'users', serverURL })
|
||||||
await client.login()
|
await client.login()
|
||||||
|
|
||||||
await ensureCompilationIsDone({ page, serverURL })
|
await ensureCompilationIsDone({ page, serverURL })
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ describe('Radio', () => {
|
|||||||
if (client) {
|
if (client) {
|
||||||
await client.logout()
|
await client.logout()
|
||||||
}
|
}
|
||||||
client = new RESTClient(null, { defaultSlug: 'users', serverURL })
|
client = new RESTClient({ defaultSlug: 'users', serverURL })
|
||||||
await client.login()
|
await client.login()
|
||||||
await ensureCompilationIsDone({ page, serverURL })
|
await ensureCompilationIsDone({ page, serverURL })
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ describe('Upload', () => {
|
|||||||
if (client) {
|
if (client) {
|
||||||
await client.logout()
|
await client.logout()
|
||||||
}
|
}
|
||||||
client = new RESTClient(null, { defaultSlug: 'users', serverURL })
|
client = new RESTClient({ defaultSlug: 'users', serverURL })
|
||||||
await client.login()
|
await client.login()
|
||||||
|
|
||||||
await ensureCompilationIsDone({ page, serverURL })
|
await ensureCompilationIsDone({ page, serverURL })
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ describe('Upload with restrictions', () => {
|
|||||||
if (client) {
|
if (client) {
|
||||||
await client.logout()
|
await client.logout()
|
||||||
}
|
}
|
||||||
client = new RESTClient(null, { defaultSlug: 'users', serverURL })
|
client = new RESTClient({ defaultSlug: 'users', serverURL })
|
||||||
await client.login()
|
await client.login()
|
||||||
|
|
||||||
await ensureCompilationIsDone({ page, serverURL })
|
await ensureCompilationIsDone({ page, serverURL })
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||||
import type { Config, PaginatedDocs, TypedUser, Where } from 'payload'
|
import type { PaginatedDocs, TypedUser, Where } from 'payload'
|
||||||
|
|
||||||
import * as qs from 'qs-esm'
|
import * as qs from 'qs-esm'
|
||||||
|
|
||||||
@@ -110,8 +110,6 @@ type QueryResponse<T> = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export class RESTClient {
|
export class RESTClient {
|
||||||
private readonly config: Config
|
|
||||||
|
|
||||||
private defaultSlug: string
|
private defaultSlug: string
|
||||||
|
|
||||||
private token: string
|
private token: string
|
||||||
@@ -120,8 +118,7 @@ export class RESTClient {
|
|||||||
|
|
||||||
public user: TypedUser
|
public user: TypedUser
|
||||||
|
|
||||||
constructor(config: Config, args: Args) {
|
constructor(args: Args) {
|
||||||
this.config = config
|
|
||||||
this.serverURL = args.serverURL
|
this.serverURL = args.serverURL
|
||||||
this.defaultSlug = args.defaultSlug
|
this.defaultSlug = args.defaultSlug
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,34 +13,64 @@ import {
|
|||||||
exactText,
|
exactText,
|
||||||
initPageConsoleErrorCatch,
|
initPageConsoleErrorCatch,
|
||||||
saveDocAndAssert,
|
saveDocAndAssert,
|
||||||
|
throttleTest,
|
||||||
} from '../helpers.js'
|
} from '../helpers.js'
|
||||||
import { AdminUrlUtil } from '../helpers/adminUrlUtil.js'
|
import { AdminUrlUtil } from '../helpers/adminUrlUtil.js'
|
||||||
import { navigateToDoc } from '../helpers/e2e/navigateToDoc.js'
|
import { navigateToDoc } from '../helpers/e2e/navigateToDoc.js'
|
||||||
import { initPayloadE2ENoConfig } from '../helpers/initPayloadE2ENoConfig.js'
|
import { initPayloadE2ENoConfig } from '../helpers/initPayloadE2ENoConfig.js'
|
||||||
import { TEST_TIMEOUT_LONG } from '../playwright.config.js'
|
import { EXPECT_TIMEOUT, TEST_TIMEOUT_LONG } from '../playwright.config.js'
|
||||||
import { categoriesJoinRestrictedSlug, categoriesSlug, postsSlug, uploadsSlug } from './shared.js'
|
import { categoriesJoinRestrictedSlug, categoriesSlug, postsSlug, uploadsSlug } from './shared.js'
|
||||||
|
import { reInitializeDB } from '../helpers/reInitializeDB.js'
|
||||||
|
import { RESTClient } from '../helpers/rest.js'
|
||||||
|
|
||||||
const filename = fileURLToPath(import.meta.url)
|
const filename = fileURLToPath(import.meta.url)
|
||||||
const dirname = path.dirname(filename)
|
const dirname = path.dirname(filename)
|
||||||
|
|
||||||
let payload: PayloadTestSDK<Config>
|
let payload: PayloadTestSDK<Config>
|
||||||
let serverURL: string
|
let serverURL: string
|
||||||
|
let client: RESTClient
|
||||||
|
|
||||||
test.describe('Join Field', () => {
|
const { beforeAll, beforeEach, describe } = test
|
||||||
|
|
||||||
|
describe('Join Field', () => {
|
||||||
let page: Page
|
let page: Page
|
||||||
let categoriesURL: AdminUrlUtil
|
let categoriesURL: AdminUrlUtil
|
||||||
let uploadsURL: AdminUrlUtil
|
let uploadsURL: AdminUrlUtil
|
||||||
let categoriesJoinRestrictedURL: AdminUrlUtil
|
let categoriesJoinRestrictedURL: AdminUrlUtil
|
||||||
let categoryID: string | number
|
let categoryID: string | number
|
||||||
|
|
||||||
test.beforeAll(async ({ browser }, testInfo) => {
|
beforeAll(async ({ browser }, testInfo) => {
|
||||||
testInfo.setTimeout(TEST_TIMEOUT_LONG)
|
testInfo.setTimeout(TEST_TIMEOUT_LONG)
|
||||||
|
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>({
|
;({ payload, serverURL } = await initPayloadE2ENoConfig<Config>({
|
||||||
dirname,
|
dirname,
|
||||||
}))
|
}))
|
||||||
|
|
||||||
categoriesURL = new AdminUrlUtil(serverURL, categoriesSlug)
|
categoriesURL = new AdminUrlUtil(serverURL, categoriesSlug)
|
||||||
uploadsURL = new AdminUrlUtil(serverURL, uploadsSlug)
|
uploadsURL = new AdminUrlUtil(serverURL, uploadsSlug)
|
||||||
categoriesJoinRestrictedURL = new AdminUrlUtil(serverURL, categoriesJoinRestrictedSlug)
|
categoriesJoinRestrictedURL = new AdminUrlUtil(serverURL, categoriesJoinRestrictedSlug)
|
||||||
|
|
||||||
|
const context = await browser.newContext()
|
||||||
|
page = await context.newPage()
|
||||||
|
initPageConsoleErrorCatch(page)
|
||||||
|
await ensureCompilationIsDone({ page, serverURL })
|
||||||
|
|
||||||
|
//await throttleTest({ context, delay: 'Slow 4G', page })
|
||||||
|
})
|
||||||
|
|
||||||
|
beforeEach(async () => {
|
||||||
|
await reInitializeDB({
|
||||||
|
serverURL,
|
||||||
|
snapshotKey: 'joinsTest',
|
||||||
|
uploadsDir: [],
|
||||||
|
})
|
||||||
|
|
||||||
|
if (client) {
|
||||||
|
await client.logout()
|
||||||
|
}
|
||||||
|
client = new RESTClient({ defaultSlug: postsSlug, serverURL })
|
||||||
|
await client.login()
|
||||||
|
|
||||||
const { docs } = await payload.find({
|
const { docs } = await payload.find({
|
||||||
collection: categoriesSlug,
|
collection: categoriesSlug,
|
||||||
where: {
|
where: {
|
||||||
@@ -55,11 +85,6 @@ test.describe('Join Field', () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
;({ id: categoryID } = docs[0])
|
;({ id: categoryID } = docs[0])
|
||||||
|
|
||||||
const context = await browser.newContext()
|
|
||||||
page = await context.newPage()
|
|
||||||
initPageConsoleErrorCatch(page)
|
|
||||||
await ensureCompilationIsDone({ page, serverURL })
|
|
||||||
})
|
})
|
||||||
|
|
||||||
test('should populate joined relationships in table cells of list view', async () => {
|
test('should populate joined relationships in table cells of list view', async () => {
|
||||||
@@ -254,6 +279,8 @@ test.describe('Join Field', () => {
|
|||||||
const joinField = page.locator('#field-relatedPosts.field-type.join')
|
const joinField = page.locator('#field-relatedPosts.field-type.join')
|
||||||
await expect(joinField).toBeVisible()
|
await expect(joinField).toBeVisible()
|
||||||
|
|
||||||
|
await expect(joinField.locator('tbody tr')).toHaveCount(3)
|
||||||
|
|
||||||
const addButton = joinField.locator('.relationship-table__actions button.doc-drawer__toggler', {
|
const addButton = joinField.locator('.relationship-table__actions button.doc-drawer__toggler', {
|
||||||
hasText: exactText('Add new'),
|
hasText: exactText('Add new'),
|
||||||
})
|
})
|
||||||
@@ -263,8 +290,9 @@ test.describe('Join Field', () => {
|
|||||||
await addButton.click()
|
await addButton.click()
|
||||||
const drawer = page.locator('[id^=doc-drawer_posts_1_]')
|
const drawer = page.locator('[id^=doc-drawer_posts_1_]')
|
||||||
await expect(drawer).toBeVisible()
|
await expect(drawer).toBeVisible()
|
||||||
|
|
||||||
const categoryField = drawer.locator('#field-category')
|
const categoryField = drawer.locator('#field-category')
|
||||||
await expect(categoryField).toBeVisible()
|
await expect(categoryField).toBeVisible({ timeout: EXPECT_TIMEOUT * 5 })
|
||||||
const categoryValue = categoryField.locator('.relationship--single-value__text')
|
const categoryValue = categoryField.locator('.relationship--single-value__text')
|
||||||
await expect(categoryValue).toHaveText('example')
|
await expect(categoryValue).toHaveText('example')
|
||||||
const titleField = drawer.locator('#field-title')
|
const titleField = drawer.locator('#field-title')
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ import {
|
|||||||
const filename = fileURLToPath(import.meta.url)
|
const filename = fileURLToPath(import.meta.url)
|
||||||
const dirname = path.dirname(filename)
|
const dirname = path.dirname(filename)
|
||||||
|
|
||||||
export const seed = async (_payload) => {
|
export const seed = async (_payload: Payload) => {
|
||||||
await _payload.create({
|
await _payload.create({
|
||||||
collection: 'users',
|
collection: 'users',
|
||||||
data: {
|
data: {
|
||||||
@@ -90,7 +90,7 @@ export const seed = async (_payload) => {
|
|||||||
await _payload.create({
|
await _payload.create({
|
||||||
collection: postsSlug,
|
collection: postsSlug,
|
||||||
data: {
|
data: {
|
||||||
upload: uploadedImage.id,
|
upload: uploadedImage,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -123,6 +123,6 @@ export async function clearAndSeedEverything(_payload: Payload) {
|
|||||||
_payload,
|
_payload,
|
||||||
collectionSlugs,
|
collectionSlugs,
|
||||||
seedFunction: seed,
|
seedFunction: seed,
|
||||||
snapshotKey: 'adminTest',
|
snapshotKey: 'joinsTest',
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ describe('Localization', () => {
|
|||||||
|
|
||||||
initPageConsoleErrorCatch(page)
|
initPageConsoleErrorCatch(page)
|
||||||
|
|
||||||
client = new RESTClient(null, { defaultSlug: 'users', serverURL })
|
client = new RESTClient({ defaultSlug: 'users', serverURL })
|
||||||
await client.login()
|
await client.login()
|
||||||
|
|
||||||
await ensureCompilationIsDone({ page, serverURL })
|
await ensureCompilationIsDone({ page, serverURL })
|
||||||
|
|||||||
@@ -8,8 +8,8 @@ const dirname = path.dirname(filename)
|
|||||||
|
|
||||||
dotenv.config({ path: path.resolve(dirname, 'test.env') })
|
dotenv.config({ path: path.resolve(dirname, 'test.env') })
|
||||||
|
|
||||||
let multiplier = process.env.CI ? 3 : 1
|
let multiplier = process.env.CI ? 5 : 1
|
||||||
let smallMultiplier = process.env.CI ? 2 : 1
|
let smallMultiplier = process.env.CI ? 4 : 1
|
||||||
|
|
||||||
export const TEST_TIMEOUT_LONG = 640000 * multiplier // 8*3 minutes - used as timeOut for the beforeAll
|
export const TEST_TIMEOUT_LONG = 640000 * multiplier // 8*3 minutes - used as timeOut for the beforeAll
|
||||||
export const TEST_TIMEOUT = 40000 * multiplier
|
export const TEST_TIMEOUT = 40000 * multiplier
|
||||||
|
|||||||
@@ -109,7 +109,7 @@ describe('Uploads', () => {
|
|||||||
if (client) {
|
if (client) {
|
||||||
await client.logout()
|
await client.logout()
|
||||||
}
|
}
|
||||||
client = new RESTClient(null, { defaultSlug: 'users', serverURL })
|
client = new RESTClient({ defaultSlug: 'users', serverURL })
|
||||||
await client.login()
|
await client.login()
|
||||||
|
|
||||||
await ensureCompilationIsDone({ page, serverURL })
|
await ensureCompilationIsDone({ page, serverURL })
|
||||||
|
|||||||
Reference in New Issue
Block a user