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
04906eff
Unverified
Commit
04906eff
authored
Aug 18, 2026
by
David Alexandru Ilie
Committed by
GitHub
Aug 18, 2026
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test: cover blocking not-found status stability
parent
0b7e96f4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
49 additions
and
0 deletions
+49
-0
page.tsx
...al-prefetching-disabled/app/blocking/[[...slug]]/page.tsx
+28
-0
partial-fallback-shell-upgrade.test.ts
...back-shell-upgrade/partial-fallback-shell-upgrade.test.ts
+21
-0
No files found.
test/e2e/app-dir/partial-fallback-shell-upgrade/fixtures/partial-prefetching-disabled/app/blocking/[[...slug]]/page.tsx
0 → 100644
View file @
04906eff
import
{
notFound
}
from
'next/navigation'
const
prerenderedSlugs
=
[
'known'
]
const
runtimeSlugs
=
[
'runtime'
]
export
const
instant
=
false
export
function
generateStaticParams
()
{
return
prerenderedSlugs
.
map
((
slug
)
=>
({
slug
:
[
slug
]
}))
}
export
default
async
function
Page
({
params
,
}:
{
params
:
Promise
<
{
slug
?:
string
[]
}
>
})
{
const
{
slug
}
=
await
params
const
pathname
=
slug
?.
join
(
'/'
)
??
''
if
(
!
prerenderedSlugs
.
includes
(
pathname
)
&&
!
runtimeSlugs
.
includes
(
pathname
)
)
{
notFound
()
}
return
<
p
id=
"blocking-slug"
>
{
pathname
}
</
p
>
}
test/e2e/app-dir/partial-fallback-shell-upgrade/partial-fallback-shell-upgrade.test.ts
View file @
04906eff
...
@@ -240,4 +240,25 @@ describe('partial-fallback-shell-upgrade - partialPrefetching disabled', () => {
...
@@ -240,4 +240,25 @@ describe('partial-fallback-shell-upgrade - partialPrefetching disabled', () => {
'generic shell should remain shared without partialPrefetching'
'generic shell should remain shared without partialPrefetching'
)
)
})
})
it
(
'keeps blocking not-found responses stable after the first request'
,
async
()
=>
{
for
(
let
attempt
=
0
;
attempt
<
2
;
attempt
++
)
{
const
response
=
await
next
.
fetch
(
'/blocking/missing'
)
const
html
=
await
response
.
text
()
expect
(
response
.
status
).
toBe
(
404
)
expect
(
html
).
toContain
(
'<meta name="robots" content="noindex"'
)
}
})
it
(
'serves valid ungenerated params before and after the first request'
,
async
()
=>
{
for
(
let
attempt
=
0
;
attempt
<
2
;
attempt
++
)
{
const
response
=
await
next
.
fetch
(
'/blocking/runtime'
)
expect
(
response
.
status
).
toBe
(
200
)
expect
(
await
response
.
text
()).
toContain
(
'<p id="blocking-slug">runtime</p>'
)
}
})
})
})
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