Skip to content

Commit 1b706a0

Browse files
authored
[next] Fix test: segment cache test probe path needs _rsc query param (#13406)
As of vercel/next.js#79563, the `_rsc` query param is required for segment prefetch requests. This also revealed a bug in Next.js related to the PR above, so I'm removing the expectations for `/blog/hello-not-prerendered` for now, until this is resolved.
1 parent e9e2eca commit 1b706a0

File tree

3 files changed

+14
-51
lines changed

3 files changed

+14
-51
lines changed

.changeset/large-cheetahs-sparkle.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---
2+
---

packages/next/test/fixtures/00-app-dir-segment-prefetch-incremental-conflicting-routes/vercel.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
],
88
"probes": [
99
{
10-
"path": "/dynamic",
10+
"path": "/dynamic?_rsc=1r34m",
1111
"status": 200,
1212
"headers": {
1313
"RSC": "1",

packages/next/test/fixtures/00-app-dir-segment-prefetch/vercel.json

Lines changed: 11 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
],
88
"probes": [
99
{
10-
"path": "/",
10+
"path": "/?_rsc=1r34m",
1111
"status": 200,
1212
"headers": {
1313
"RSC": "1",
@@ -19,8 +19,8 @@
1919
},
2020
"mustNotContain": "Dynamic Component"
2121
},
22-
{
23-
"path": "/blog/hello-world",
22+
{
23+
"path": "/blog/hello-world?_rsc=1r34m",
2424
"status": 200,
2525
"headers": {
2626
"RSC": "1",
@@ -32,8 +32,8 @@
3232
},
3333
"mustNotContain": "Dynamic Component"
3434
},
35-
{
36-
"path": "/blog/hello-world",
35+
{
36+
"path": "/blog/hello-world?_rsc=nn07o",
3737
"status": 200,
3838
"headers": {
3939
"RSC": "1",
@@ -45,8 +45,8 @@
4545
},
4646
"mustNotContain": "Dynamic Component"
4747
},
48-
{
49-
"path": "/blog/hello-world",
48+
{
49+
"path": "/blog/hello-world?_rsc=ydjbj",
5050
"status": 200,
5151
"headers": {
5252
"RSC": "1",
@@ -58,8 +58,8 @@
5858
},
5959
"mustNotContain": "Dynamic Component"
6060
},
61-
{
62-
"path": "/blog/hello-world",
61+
{
62+
"path": "/blog/hello-world?_rsc=5ga50",
6363
"status": 200,
6464
"headers": {
6565
"RSC": "1",
@@ -71,8 +71,8 @@
7171
},
7272
"mustNotContain": "Dynamic Component"
7373
},
74-
{
75-
"path": "/blog/hello-world",
74+
{
75+
"path": "/blog/hello-world?_rsc=1a29i",
7676
"status": 200,
7777
"headers": {
7878
"RSC": "1",
@@ -83,45 +83,6 @@
8383
"x-matched-path": "/blog/hello-world.segments/blog/$d$slug$hello-world/__PAGE__.segment.rsc"
8484
},
8585
"mustNotContain": "Dynamic Component"
86-
},
87-
{
88-
"path": "/blog/hello-not-prerendered",
89-
"status": 200,
90-
"headers": {
91-
"RSC": "1",
92-
"Next-Router-Prefetch": "1",
93-
"Next-Router-Segment-Prefetch": "/_tree"
94-
},
95-
"responseHeaders": {
96-
"x-matched-path": "/blog/[slug].segments/_tree.segment.rsc"
97-
},
98-
"mustNotContain": "Dynamic Component"
99-
},
100-
{
101-
"path": "/blog/hello-not-prerendered",
102-
"status": 200,
103-
"headers": {
104-
"RSC": "1",
105-
"Next-Router-Prefetch": "1",
106-
"Next-Router-Segment-Prefetch": "/blog/$d$slug$hello-not-prerendered"
107-
},
108-
"responseHeaders": {
109-
"x-matched-path": "/blog/[slug].segments/blog/$d$slug$[slug].segment.rsc"
110-
},
111-
"mustNotContain": "Dynamic Component"
112-
},
113-
{
114-
"path": "/blog/hello-not-prerendered",
115-
"status": 200,
116-
"headers": {
117-
"RSC": "1",
118-
"Next-Router-Prefetch": "1",
119-
"Next-Router-Segment-Prefetch": "/blog/$d$slug$hello-not-prerendered/__PAGE__"
120-
},
121-
"responseHeaders": {
122-
"x-matched-path": "/blog/[slug].segments/blog/$d$slug$[slug]/__PAGE__.segment.rsc"
123-
},
124-
"mustNotContain": "Dynamic Component"
12586
}
12687
]
12788
}

0 commit comments

Comments
 (0)