mirror of
https://github.com/hanzoai/next.js.git
synced 2026-10-30 14:46:38 +00:00
This hard deprecates the `experimental.ppr` configuration, requiring users to opt-in instead via `experimental.cacheComponents`. This does mean that the previous `experimental.ppr = "incremental"` will no longer be supported. NAR-433
28 lines
917 B
TypeScript
28 lines
917 B
TypeScript
import { nextTestSetup } from 'e2e-utils'
|
|
import { expectedParams as expected } from './expected'
|
|
|
|
// TODO(NAR-423): Migrate to Cache Components.
|
|
describe.skip('ppr-middleware-rewrite-force-dynamic-generate-static-params', () => {
|
|
const { next } = nextTestSetup({
|
|
files: __dirname,
|
|
})
|
|
|
|
const expectedParams = JSON.stringify(expected)
|
|
|
|
it('should have correct dynamic params', async () => {
|
|
// should be rewritten with /en
|
|
const browser = await next.browser('/')
|
|
expect(await browser.elementByCss('a').text()).toBe('Go to /1/2')
|
|
|
|
// navigate to /1/2
|
|
await browser.elementByCss('a').click()
|
|
|
|
// should be rewritten with /en/1/2 with correct params
|
|
expect(await browser.elementByCss('p').text()).toBe(expectedParams)
|
|
|
|
// reloading the page should have the same params
|
|
await browser.refresh()
|
|
expect(await browser.elementByCss('p').text()).toBe(expectedParams)
|
|
})
|
|
})
|