Make engine reconnection test pass every time (#3066)
* Ensure that isFreezeFrame is reset by isFirstRender, because it can't be a freeze frame if it's the first render * `restart`-type engine starts should count as first renders * Ensure we don't see a loading spinner after network is reconnected in test * Make `waitForPageLoad` robust against if the page has already loaded and make it actually wait for the Start Sketch button to be enabled --------- Co-authored-by: 49fl <ircsurfer33@gmail.com>
This commit is contained in:
@ -16,14 +16,14 @@ export const TEST_COLORS = {
|
||||
} as const
|
||||
|
||||
async function waitForPageLoad(page: Page) {
|
||||
// wait for 'Loading stream...' spinner
|
||||
await page.getByTestId('loading-stream').waitFor()
|
||||
// wait for all spinners to be gone
|
||||
await page
|
||||
.getByTestId('loading')
|
||||
.waitFor({ state: 'detached', timeout: 20_000 })
|
||||
await expect(page.getByTestId('loading')).not.toBeAttached({
|
||||
timeout: 20_000,
|
||||
})
|
||||
|
||||
await page.getByTestId('start-sketch').waitFor()
|
||||
await expect(page.getByTestId('start-sketch')).toBeEnabled({
|
||||
timeout: 20_000,
|
||||
})
|
||||
}
|
||||
|
||||
async function removeCurrentCode(page: Page) {
|
||||
|
Reference in New Issue
Block a user