Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
N
next.js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex
next.js
Commits
b5e5864d
Commit
b5e5864d
authored
Oct 28, 2025
by
Zack Tanner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
de-flake client-cache tests
parent
96d4a79a
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
1568 additions
and
662 deletions
+1568
-662
client-cache.defaults.test.ts
...2e/app-dir/app-client-cache/client-cache.defaults.test.ts
+433
-221
client-cache.experimental.test.ts
...pp-dir/app-client-cache/client-cache.experimental.test.ts
+466
-196
client-cache.original.test.ts
...2e/app-dir/app-client-cache/client-cache.original.test.ts
+607
-215
page.js
...pp-dir/app-client-cache/fixtures/regular/app/[id]/page.js
+2
-2
link-accordion.tsx
...-cache/fixtures/regular/app/components/link-accordion.tsx
+25
-0
page.js
...e2e/app-dir/app-client-cache/fixtures/regular/app/page.js
+19
-14
page.js
...t-cache/fixtures/regular/app/without-loading/[id]/page.js
+2
-2
page.js
...client-cache/fixtures/regular/app/without-loading/page.js
+14
-12
No files found.
test/e2e/app-dir/app-client-cache/client-cache.defaults.test.ts
View file @
b5e5864d
This diff is collapsed.
Click to expand it.
test/e2e/app-dir/app-client-cache/client-cache.experimental.test.ts
View file @
b5e5864d
This diff is collapsed.
Click to expand it.
test/e2e/app-dir/app-client-cache/client-cache.original.test.ts
View file @
b5e5864d
This diff is collapsed.
Click to expand it.
test/e2e/app-dir/app-client-cache/fixtures/regular/app/[id]/page.js
View file @
b5e5864d
import
Link
from
'next/link
'
import
{
LinkAccordion
}
from
'../components/link-accordion
'
export
default
async
function
Page
({
searchParams
})
{
export
default
async
function
Page
({
searchParams
})
{
const
timeout
=
(
await
searchParams
).
timeout
const
timeout
=
(
await
searchParams
).
timeout
...
@@ -14,7 +14,7 @@ export default async function Page({ searchParams }) {
...
@@ -14,7 +14,7 @@ export default async function Page({ searchParams }) {
return
(
return
(
<>
<>
<
div
>
<
div
>
<
Link
href
=
"/"
>
Back
to
Home
<
/Link
>
<
Link
Accordion
href
=
"/"
>
Back
to
Home
<
/LinkAccordion
>
<
/div
>
<
/div
>
<
div
id
=
"random-number"
>
{
randomNumber
}
<
/div
>
<
div
id
=
"random-number"
>
{
randomNumber
}
<
/div
>
<
/
>
<
/
>
...
...
test/e2e/app-dir/app-client-cache/fixtures/regular/app/components/link-accordion.tsx
0 → 100644
View file @
b5e5864d
'use client'
import
Link
from
'next/link'
import
{
useState
}
from
'react'
export
function
LinkAccordion
({
href
,
children
,
prefetch
=
undefined
})
{
const
[
isVisible
,
setIsVisible
]
=
useState
(
false
)
return
(
<>
<
input
type=
"checkbox"
checked=
{
isVisible
}
onChange=
{
()
=>
setIsVisible
(
!
isVisible
)
}
data
-
link
-
accordion=
{
href
}
/>
{
isVisible
?
(
<
Link
href=
{
href
}
prefetch=
{
prefetch
}
>
{
children
}
</
Link
>
)
:
(
<>
{
children
}
(link is hidden)
</>
)
}
</>
)
}
test/e2e/app-dir/app-client-cache/fixtures/regular/app/page.js
View file @
b5e5864d
import
Link
from
'next/link'
import
{
LinkAccordion
}
from
'./components/link-accordion'
export
default
function
HomePage
()
{
export
default
function
HomePage
()
{
return
(
return
(
<>
<>
<
div
>
<
div
id
=
"home-page"
>
<
Link
href
=
"/0?timeout=0"
prefetch
=
{
true
}
>
<
Link
Accordion
href
=
"/0?timeout=0"
prefetch
=
{
true
}
>
To
Random
Number
-
prefetch
:
true
To
Random
Number
-
prefetch
:
true
<
/Link
>
<
/Link
Accordion
>
<
/div
>
<
/div
>
<
div
>
<
div
>
<
Link
href
=
"/0?timeout=1000"
prefetch
=
{
true
}
>
<
Link
Accordion
href
=
"/0?timeout=1000"
prefetch
=
{
true
}
>
To
Random
Number
-
prefetch
:
true
,
slow
To
Random
Number
-
prefetch
:
true
,
slow
<
/Link
>
<
/Link
Accordion
>
<
/div
>
<
/div
>
<
div
>
<
div
>
<
Link
href
=
"/1"
>
To
Random
Number
-
prefetch
:
auto
<
/Link
>
<
LinkAccordion
href
=
"/1"
>
To
Random
Number
-
prefetch
:
auto
<
/LinkAccordion
>
<
/div
>
<
/div
>
<
div
>
<
div
>
<
Link
href
=
"/2"
prefetch
=
{
false
}
>
<
Link
Accordion
href
=
"/2"
prefetch
=
{
false
}
>
To
Random
Number
2
-
prefetch
:
false
To
Random
Number
2
-
prefetch
:
false
<
/Link
>
<
/Link
Accordion
>
<
/div
>
<
/div
>
<
div
>
<
div
>
<
Link
href
=
"/2?timeout=1000"
prefetch
=
{
false
}
>
<
Link
Accordion
href
=
"/2?timeout=1000"
prefetch
=
{
false
}
>
To
Random
Number
2
-
prefetch
:
false
,
slow
To
Random
Number
2
-
prefetch
:
false
,
slow
<
/Link
>
<
/Link
Accordion
>
<
/div
>
<
/div
>
<
div
>
<
div
>
<
Link
href
=
"/1?timeout=1000"
>
<
Link
Accordion
href
=
"/1?timeout=1000"
>
To
Random
Number
-
prefetch
:
auto
,
slow
To
Random
Number
-
prefetch
:
auto
,
slow
<
/Link
>
<
/Link
Accordion
>
<
/div
>
<
/div
>
<
div
>
<
div
>
<
Link
href
=
"/null-loading"
>
To
Null
Loading
-
prefetch
:
auto
<
/Link
>
<
LinkAccordion
href
=
"/null-loading"
>
To
Null
Loading
-
prefetch
:
auto
<
/LinkAccordion
>
<
/div
>
<
/div
>
<
/
>
<
/
>
)
)
...
...
test/e2e/app-dir/app-client-cache/fixtures/regular/app/without-loading/[id]/page.js
View file @
b5e5864d
import
Link
from
'next/link
'
import
{
LinkAccordion
}
from
'../../components/link-accordion
'
export
default
async
function
Page
({
searchParams
})
{
export
default
async
function
Page
({
searchParams
})
{
const
timeout
=
(
await
searchParams
).
timeout
const
timeout
=
(
await
searchParams
).
timeout
...
@@ -14,7 +14,7 @@ export default async function Page({ searchParams }) {
...
@@ -14,7 +14,7 @@ export default async function Page({ searchParams }) {
return
(
return
(
<>
<>
<
div
>
<
div
>
<
Link
href
=
"/without-loading"
>
Back
to
Home
<
/Link
>
<
Link
Accordion
href
=
"/without-loading"
>
Back
to
Home
<
/LinkAccordion
>
<
/div
>
<
/div
>
<
div
id
=
"random-number"
>
{
randomNumber
}
<
/div
>
<
div
id
=
"random-number"
>
{
randomNumber
}
<
/div
>
<
/
>
<
/
>
...
...
test/e2e/app-dir/app-client-cache/fixtures/regular/app/without-loading/page.js
View file @
b5e5864d
import
Link
from
'next/link
'
import
{
LinkAccordion
}
from
'../components/link-accordion
'
export
default
function
Page
()
{
export
default
function
Page
()
{
return
(
return
(
<>
<>
<
div
>
<
div
>
<
Link
href
=
"/without-loading/0?timeout=0"
prefetch
=
{
true
}
>
<
Link
Accordion
href
=
"/without-loading/0?timeout=0"
prefetch
=
{
true
}
>
To
Random
Number
-
prefetch
:
true
To
Random
Number
-
prefetch
:
true
<
/Link
>
<
/Link
Accordion
>
<
/div
>
<
/div
>
<
div
>
<
div
>
<
Link
href
=
"/without-loading/0?timeout=1000"
prefetch
=
{
true
}
>
<
Link
Accordion
href
=
"/without-loading/0?timeout=1000"
prefetch
=
{
true
}
>
To
Random
Number
-
prefetch
:
true
,
slow
To
Random
Number
-
prefetch
:
true
,
slow
<
/Link
>
<
/Link
Accordion
>
<
/div
>
<
/div
>
<
div
>
<
div
>
<
Link
href
=
"/without-loading/1"
>
To
Random
Number
-
prefetch
:
auto
<
/Link
>
<
LinkAccordion
href
=
"/without-loading/1"
>
To
Random
Number
-
prefetch
:
auto
<
/LinkAccordion
>
<
/div
>
<
/div
>
<
div
>
<
div
>
<
Link
href
=
"/without-loading/2"
prefetch
=
{
false
}
>
<
Link
Accordion
href
=
"/without-loading/2"
prefetch
=
{
false
}
>
To
Random
Number
2
-
prefetch
:
false
To
Random
Number
2
-
prefetch
:
false
<
/Link
>
<
/Link
Accordion
>
<
/div
>
<
/div
>
<
div
>
<
div
>
<
Link
href
=
"/without-loading/2?timeout=1000"
prefetch
=
{
false
}
>
<
Link
Accordion
href
=
"/without-loading/2?timeout=1000"
prefetch
=
{
false
}
>
To
Random
Number
2
-
prefetch
:
false
,
slow
To
Random
Number
2
-
prefetch
:
false
,
slow
<
/Link
>
<
/Link
Accordion
>
<
/div
>
<
/div
>
<
div
>
<
div
>
<
Link
href
=
"/without-loading/1?timeout=1000"
>
<
Link
Accordion
href
=
"/without-loading/1?timeout=1000"
>
To
Random
Number
-
prefetch
:
auto
,
slow
To
Random
Number
-
prefetch
:
auto
,
slow
<
/Link
>
<
/Link
Accordion
>
<
/div
>
<
/div
>
<
/
>
<
/
>
)
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment