mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
## Summary - Strip the configured `basePath` from response URL pathnames before reconstructing fallback route parameters on the client. - Add production regression coverage for both direct hydration and client navigation with Cache Components enabled. This prevents dynamic parameters from shifting when the response URL includes a base path but the App Router tree does not. ## Verification - Added production Turbopack E2E coverage for direct visits and client navigation. <!-- NEXT_JS_LLM_PR -->
22 lines
620 B
TypeScript
22 lines
620 B
TypeScript
import { nextTestSetup } from 'e2e-utils'
|
|
|
|
describe('basepath-fallback-params', () => {
|
|
const { next } = nextTestSetup({
|
|
files: __dirname,
|
|
})
|
|
|
|
it('reads fallback params on a direct visit', async () => {
|
|
const browser = await next.browser('/dashboard/items/expected-id')
|
|
|
|
expect(await browser.elementById('item-id').text()).toBe('expected-id')
|
|
})
|
|
|
|
it('reads fallback params after a client navigation', async () => {
|
|
const browser = await next.browser('/dashboard')
|
|
|
|
await browser.elementByCss('a').click()
|
|
|
|
expect(await browser.elementById('item-id').text()).toBe('expected-id')
|
|
})
|
|
})
|