mirror of
https://github.com/cloudflare/vinext.git
synced 2026-05-09 08:25:34 +02:00
[PR #925] [MERGED] test(app-router): stabilize RSC fetch error redirects #952
Labels
No labels
enhancement
enhancement
good first issue
help wanted
nextjs-tracking
nextjs-tracking
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/vinext#952
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/cloudflare/vinext/pull/925
Author: @NathanDrake2406
Created: 4/28/2026
Status: ✅ Merged
Merged: 4/28/2026
Merged by: @james-elicx
Base:
main← Head:nathan/rsc-fetch-errors-flake📝 Commits (1)
5818d03test(app-router): stabilize RSC fetch error redirects📊 Changes
4 files changed (+62 additions, -34 deletions)
View changed files
📝
tests/e2e/app-router/rsc-fetch-errors.spec.ts(+35 -34)📝
tests/fixtures/app-basic/app/page.tsx(+10 -0)➕
tests/fixtures/app-basic/app/rsc-fetch-error-target/page.tsx(+3 -0)📝
tests/fixtures/app-basic/middleware.ts(+14 -0)📄 Description
What this changes
Stabilizes the App Router RSC fetch error E2E coverage by driving the navigation cases through real fixture links and a server-backed redirect-to-500 RSC chain.
Fixes #901.
Why
The flaky test depended on direct calls to the private
__VINEXT_RSC_NAVIGATE__global and a Playwright-mocked 307 chain. Under CI timing and Playwright behavior changes, the test could miss the intended follow-up.rscrequest or call navigation before router state had committed.Approach
The fixture now exposes prefetch-disabled links for the missing-route and redirect-chain cases. Middleware handles RSC requests for
/rsc-fetch-redirect-srcby returning a 307 to/rsc-fetch-error-target.rsc, then returns a 500 HTML response for that RSC target. The spec observes those real network responses and asserts the browser hard-navigates to the post-redirect HTML page without flashing the source URL.Validation
vp check tests/e2e/app-router/rsc-fetch-errors.spec.ts tests/fixtures/app-basic/middleware.ts tests/fixtures/app-basic/app/page.tsx tests/fixtures/app-basic/app/rsc-fetch-error-target/page.tsxgit diff --checkCI=1 PLAYWRIGHT_PROJECT=app-router vp run test:e2e tests/e2e/app-router/rsc-fetch-errors.spec.ts --repeat-each=5🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.