Remove CI-only page load retry loop (#7272)
Remove CI-only page load retry
This commit is contained in:
@ -79,20 +79,6 @@ export function runningOnWindows() {
|
|||||||
return process.platform === 'win32'
|
return process.platform === 'win32'
|
||||||
}
|
}
|
||||||
|
|
||||||
async function waitForPageLoadWithRetry(page: Page) {
|
|
||||||
await expect(async () => {
|
|
||||||
await page.goto('/')
|
|
||||||
const errorMessage = 'App failed to load - 🔃 Retrying ...'
|
|
||||||
|
|
||||||
await expect(
|
|
||||||
page.getByRole('button', { name: 'sketch Start Sketch' }),
|
|
||||||
errorMessage
|
|
||||||
).toBeEnabled({
|
|
||||||
timeout: 20_000,
|
|
||||||
})
|
|
||||||
}).toPass({ timeout: 70_000, intervals: [1_000] })
|
|
||||||
}
|
|
||||||
|
|
||||||
// lee: This needs to be replaced by scene.settled() eventually.
|
// lee: This needs to be replaced by scene.settled() eventually.
|
||||||
async function waitForPageLoad(page: Page) {
|
async function waitForPageLoad(page: Page) {
|
||||||
await expect(page.getByRole('button', { name: 'Start Sketch' })).toBeEnabled({
|
await expect(page.getByRole('button', { name: 'Start Sketch' })).toBeEnabled({
|
||||||
@ -354,13 +340,8 @@ async function waitForAuthAndLsp(page: Page) {
|
|||||||
},
|
},
|
||||||
timeout: 45_000,
|
timeout: 45_000,
|
||||||
})
|
})
|
||||||
if (process.env.CI) {
|
await page.goto('/')
|
||||||
await waitForPageLoadWithRetry(page)
|
await waitForPageLoad(page)
|
||||||
} else {
|
|
||||||
await page.goto('/')
|
|
||||||
await waitForPageLoad(page)
|
|
||||||
}
|
|
||||||
|
|
||||||
return waitForLspPromise
|
return waitForLspPromise
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -391,7 +372,6 @@ export async function getUtils(page: Page, test_?: typeof test) {
|
|||||||
const util = {
|
const util = {
|
||||||
waitForAuthSkipAppStart: () => waitForAuthAndLsp(page),
|
waitForAuthSkipAppStart: () => waitForAuthAndLsp(page),
|
||||||
waitForPageLoad: () => waitForPageLoad(page),
|
waitForPageLoad: () => waitForPageLoad(page),
|
||||||
waitForPageLoadWithRetry: () => waitForPageLoadWithRetry(page),
|
|
||||||
removeCurrentCode: () => removeCurrentCode(page),
|
removeCurrentCode: () => removeCurrentCode(page),
|
||||||
sendCustomCmd: (cmd: EngineCommand) => sendCustomCmd(page, cmd),
|
sendCustomCmd: (cmd: EngineCommand) => sendCustomCmd(page, cmd),
|
||||||
updateCamPosition: async (xyz: [number, number, number]) => {
|
updateCamPosition: async (xyz: [number, number, number]) => {
|
||||||
|
Reference in New Issue
Block a user