Unverified Commit bb5ada6e authored by Hendrik Liebau's avatar Hendrik Liebau Committed by GitHub

[backport] [test] Deflake `instant-navs-devtools` (#93534)

Backports:

- #91912
- #93365

---------
Co-authored-by: 's avatarSebastian "Sebbie" Silbermann <sebastian.silbermann@vercel.com>
parent f1c11203
......@@ -38,7 +38,10 @@ describe('instant-nav-panel', () => {
}
async function clickStartClientNav(browser: Playwright) {
await browser.elementByCssInstant('[data-instant-nav-client]').click()
await browser
// TODO: Monitor if we need to increase timeouts for all *instant calls
.elementByCss('[data-instant-nav-client]', { timeout: 50 })
.click()
await waitForInstantModeCookie(browser)
}
......@@ -93,11 +96,13 @@ describe('instant-nav-panel', () => {
it('should show client nav state after clicking Start and navigating', async () => {
const targetPage = '/target-page/my-post?search=foo'
if (isNextDev && !isTurbopack) {
// warmup target page compilation before clicking Start, to avoid extra flakiness.
void next.render(targetPage).catch(() => {})
}
const browser = await next.browser('/')
const [browser] = await Promise.all([
next.browser('/'),
isNextDev && !isTurbopack
? // warmup target page compilation before clicking Start, to avoid extra flakiness.
next.render(targetPage).catch(() => {})
: null,
])
await clearInstantModeCookie(browser)
await browser.waitForElementByCss('[data-testid="home-title"]')
......@@ -135,11 +140,13 @@ describe('instant-nav-panel', () => {
it('should show loading skeleton during SPA navigation after clicking Start', async () => {
const targetPage = '/target-page/my-post?search=foo'
if (isNextDev && !isTurbopack) {
// warmup target page compilation before clicking Start, to avoid extra flakiness.
void next.render(targetPage).catch(() => {})
}
const browser = await next.browser('/')
const [browser] = await Promise.all([
next.browser('/'),
isNextDev && !isTurbopack
? // warmup target page compilation before clicking Start, to avoid extra flakiness.
next.render(targetPage).catch(() => {})
: null,
])
await clearInstantModeCookie(browser)
await browser.waitForElementByCss('[data-testid="home-title"]')
......
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