Unverified Commit d52d9336 authored by Jiwon Choi's avatar Jiwon Choi Committed by GitHub

Clean up legacy PPR references in test fixtures (#90725)

Stacked on https://github.com/vercel/next.js/pull/90726

Migrate legacy PPR tests to Cache Components
parent c37ef484
...@@ -19,7 +19,7 @@ describe.skip('static-shell-debugging', () => { ...@@ -19,7 +19,7 @@ describe.skip('static-shell-debugging', () => {
: undefined, : undefined,
}, },
nextConfig: { nextConfig: {
experimental: { ppr: context.ppr }, cacheComponents: context.ppr,
}, },
}) })
......
...@@ -156,21 +156,6 @@ describe('Config Experimental Warning', () => { ...@@ -156,21 +156,6 @@ describe('Config Experimental Warning', () => {
expect(stdout).toMatch(' · cpus: 2') expect(stdout).toMatch(' · cpus: 2')
}) })
// TODO: the incremental option has been removed, update to another string feature
it.skip('should show the configured value for string features', async () => {
configFile.write(`
module.exports = {
experimental: {
ppr: 'incremental'
}
}
`)
const stdout = await collectStdoutFromDev(appDir)
expect(stdout).toMatch(experimentalHeader)
expect(stdout).toMatch(' · ppr: "incremental"')
})
it('should show warning with config from object with experimental and multiple keys', async () => { it('should show warning with config from object with experimental and multiple keys', async () => {
configFile.write(` configFile.write(`
module.exports = { module.exports = {
......
import { Suspense } from 'react'
import { connection } from 'next/server' import { connection } from 'next/server'
export default async function Page() { export default function Page() {
return (
<Suspense fallback={<p>Loading...</p>}>
<DynamicContent />
</Suspense>
)
}
async function DynamicContent() {
await connection() await connection()
return <p>dynamic</p> return <p>dynamic</p>
} }
import { Suspense } from 'react'
import { connection } from 'next/server' import { connection } from 'next/server'
export default async function Page() { export default function Page() {
return (
<Suspense fallback={<p>Loading...</p>}>
<DynamicContent />
</Suspense>
)
}
async function DynamicContent() {
await connection() await connection()
return <p>ppr</p> return <p>ppr</p>
} }
export const experimental_ppr = true
import { nextTestSetup } from 'e2e-utils' import { nextTestSetup } from 'e2e-utils'
// TODO: the incremental option has been removed, update to use cacheComponents describe('app-dir - metadata-streaming-config-customized', () => {
describe.skip('app-dir - metadata-streaming-config-customized', () => {
const { next } = nextTestSetup({ const { next } = nextTestSetup({
files: __dirname, files: __dirname,
skipDeployment: true, skipDeployment: true,
...@@ -9,9 +8,7 @@ describe.skip('app-dir - metadata-streaming-config-customized', () => { ...@@ -9,9 +8,7 @@ describe.skip('app-dir - metadata-streaming-config-customized', () => {
'next.config.js': ` 'next.config.js': `
module.exports = { module.exports = {
htmlLimitedBots: /MyBot/i, htmlLimitedBots: /MyBot/i,
experimental: { cacheComponents: true,
ppr: 'incremental',
}
} }
`, `,
}, },
...@@ -33,6 +30,26 @@ describe.skip('app-dir - metadata-streaming-config-customized', () => { ...@@ -33,6 +30,26 @@ describe.skip('app-dir - metadata-streaming-config-customized', () => {
expect(bypassConfigs).toMatchInlineSnapshot(` expect(bypassConfigs).toMatchInlineSnapshot(`
{ {
"/": {
"key": "user-agent",
"type": "header",
"value": "MyBot",
},
"/_global-error": {
"key": "user-agent",
"type": "header",
"value": "MyBot",
},
"/_not-found": {
"key": "user-agent",
"type": "header",
"value": "MyBot",
},
"/dynamic": {
"key": "user-agent",
"type": "header",
"value": "MyBot",
},
"/ppr": { "/ppr": {
"key": "user-agent", "key": "user-agent",
"type": "header", "type": "header",
......
...@@ -2,9 +2,7 @@ ...@@ -2,9 +2,7 @@
* @type {import('next').NextConfig} * @type {import('next').NextConfig}
*/ */
const nextConfig = { const nextConfig = {
experimental: { cacheComponents: true,
ppr: 'incremental',
},
} }
module.exports = nextConfig module.exports = nextConfig
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment