Unverified Commit cc01bcd6 authored by Zack Tanner's avatar Zack Tanner Committed by GitHub

[ci]: de-flake client cache test (#84517)

Waits for prefetches to complete before navigating.
[x-ref](https://github.com/vercel/next.js/actions/runs/18237285313/attempts/3)
parent c6d03456
...@@ -75,6 +75,9 @@ describe('app dir client cache semantics (experimental staleTimes)', () => { ...@@ -75,6 +75,9 @@ describe('app dir client cache semantics (experimental staleTimes)', () => {
it('should re-use the cache for 5 minutes (default "static" time)', async () => { it('should re-use the cache for 5 minutes (default "static" time)', async () => {
const browser = await next.browser('/', browserConfigWithFixedTime) const browser = await next.browser('/', browserConfigWithFixedTime)
// Wait for the prefetch to complete before clicking
await browser.waitForIdleNetwork()
let initialRandomNumber = await browser let initialRandomNumber = await browser
.elementByCss('[href="/0?timeout=0"]') .elementByCss('[href="/0?timeout=0"]')
.click() .click()
...@@ -265,6 +268,9 @@ describe('app dir client cache semantics (experimental staleTimes)', () => { ...@@ -265,6 +268,9 @@ describe('app dir client cache semantics (experimental staleTimes)', () => {
it('should use the custom static override time (3 minutes)', async () => { it('should use the custom static override time (3 minutes)', async () => {
const browser = await next.browser('/', browserConfigWithFixedTime) const browser = await next.browser('/', browserConfigWithFixedTime)
// Wait for the prefetch to complete before clicking
await browser.waitForIdleNetwork()
let initialRandomNumber = await browser let initialRandomNumber = await browser
.elementByCss('[href="/0?timeout=0"]') .elementByCss('[href="/0?timeout=0"]')
.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