Skip to content

Commit cc01bcd

Browse files
authored
[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)
1 parent c6d0345 commit cc01bcd

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

test/e2e/app-dir/app-client-cache/client-cache.experimental.test.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,9 @@ describe('app dir client cache semantics (experimental staleTimes)', () => {
7575
it('should re-use the cache for 5 minutes (default "static" time)', async () => {
7676
const browser = await next.browser('/', browserConfigWithFixedTime)
7777

78+
// Wait for the prefetch to complete before clicking
79+
await browser.waitForIdleNetwork()
80+
7881
let initialRandomNumber = await browser
7982
.elementByCss('[href="/0?timeout=0"]')
8083
.click()
@@ -265,6 +268,9 @@ describe('app dir client cache semantics (experimental staleTimes)', () => {
265268
it('should use the custom static override time (3 minutes)', async () => {
266269
const browser = await next.browser('/', browserConfigWithFixedTime)
267270

271+
// Wait for the prefetch to complete before clicking
272+
await browser.waitForIdleNetwork()
273+
268274
let initialRandomNumber = await browser
269275
.elementByCss('[href="/0?timeout=0"]')
270276
.click()

0 commit comments

Comments
 (0)