Merge branch 'alpha' into fix/alpha/admin-e2e

This commit is contained in:
Jacob Fletcher
2024-04-04 13:45:46 -04:00
41 changed files with 358 additions and 1125 deletions

View File

@@ -35,6 +35,30 @@ const networkConditions = {
},
}
/**
* Load admin panel and make sure autologin has passed before running tests
* @param page
* @param serverURL
*/
export async function ensureAutoLoginAndCompilationIsDone({
page,
serverURL,
}: {
page: Page
serverURL: string
}): Promise<void> {
const adminURL = `${serverURL}/admin`
await page.goto(adminURL)
await page.waitForURL(adminURL)
await expect(() => expect(page.url()).not.toContain(`/admin/login`)).toPass({
timeout: POLL_TOPASS_TIMEOUT,
})
await expect(() => expect(page.url()).not.toContain(`/admin/create-first-user`)).toPass({
timeout: POLL_TOPASS_TIMEOUT,
})
}
export async function delayNetwork({
context,
page,