Unverified Commit a37e8bb1 authored by vercel-fleet-prod[bot]'s avatar vercel-fleet-prod[bot] Committed by GitHub

Stabilize migrated timing tests

Co-authored-by: 's avatarWill Binns-Smith <755844+wbinnssmith@users.noreply.github.com>
parent 126c288e
/* eslint-env jest */ /* eslint-env jest */
import { createSandbox } from 'development-sandbox' import { createSandbox } from 'development-sandbox'
import { FileRef, nextTestSetup } from 'e2e-utils' import { FileRef, nextTestSetup } from 'e2e-utils'
import { waitFor, check } from 'next-test-utils' import { waitFor, check, retry } from 'next-test-utils'
import path from 'path' import path from 'path'
import { outdent } from 'outdent' import { outdent } from 'outdent'
...@@ -113,7 +113,7 @@ describe('Error recovery app', () => { ...@@ -113,7 +113,7 @@ describe('Error recovery app', () => {
` `
) )
await session.waitForNoRedbox() await retry(() => session.waitForNoRedbox(), 15_000)
await check( await check(
() => session.evaluate(() => document.querySelector('p').textContent), () => session.evaluate(() => document.querySelector('p').textContent),
......
...@@ -308,6 +308,11 @@ describe('searchparams-reuse-loading', () => { ...@@ -308,6 +308,11 @@ describe('searchparams-reuse-loading', () => {
// Dev mode doesn't perform full prefetches, so this test is conditional // Dev mode doesn't perform full prefetches, so this test is conditional
await browser.elementByCss(`[href='${path}']`).click() await browser.elementByCss(`[href='${path}']`).click()
// Wait for the full prefetch to finish before navigating. Otherwise a
// slow CI worker can click while the prefetch response is still in
// flight and time out waiting for the destination to render.
await browser.waitForIdleNetwork()
await browser await browser
.elementByCss(`[href="${searchParamsPagePath}?id=3"]`) .elementByCss(`[href="${searchParamsPagePath}?id=3"]`)
.click() .click()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment