Unverified Commit f19ae744 authored by Jamiboy Mohammad's avatar Jamiboy Mohammad Committed by GitHub

test: migrate independent App Router deploy exclusions to force gates (#99431)

## Summary

Replace the App Router `skipDeployment` options still present in the
base with equivalent static `@force-gate` directives. Existing `skipped`
bindings and checks, manual mode guards, fixture configuration,
assertions, and hooks are preserved. Tests whose deployment exclusions
were already removed on canary are left unchanged.

The two adapter exceptions remain `!deploy || adapter`. The existing
Turbopack restriction on the missing-root-layout suite is retained. The
shared instant-validation suite wrapper moves to its five test entry
points so the gate transformer can apply `!deploy`; the
partial-prefetching variants inherit these gates.

This is the independent portion of #98155, after #98160 in the
canary-based stack containing #98158. The viewport known-limitation
suite remains in #98155 because its lazy configuration predicate needs
#98430.

## Verification

- Compared the complete syntax trees of all 60 previously touched files
against the base: only deployment-option removal, directly associated
adapter bindings, and required gate-wrapper placement differ. All 120
references to `skipped` are preserved; 27 files are now byte-for-byte
unchanged from the base.
- Registration-only comparisons cover 37 entry points in dev, start, and
deploy with Webpack and Turbopack, including deploy with the adapter
disabled. Fixture eligibility is unchanged. The already-enabled
opaque-origin sibling is no longer suppressed by the legacy `it.only`
placeholder.
- TypeScript, Prettier, and ESLint passed. Registration probes disable
bodies and hooks and use default resolved values for existing lazy
predicates; they do not validate remote deployment builds or browser
behavior.
- Rebased the five open migration layers onto canary; 16 superseded
files are unchanged from canary, with all other layer files preserved
exactly. All 15 commits retain their authorship and signatures.
- The 79 gate unit tests passed. Full bootstrap attempted: 14/15 tasks
passed; the isolated worktree lacks the bundle-analyzer app
dependencies. Browser and remote deployment execution remains for CI.

<!-- NEXT_JS_LLM -->

---------
Co-authored-by: 's avatarJosh Story <gnoff@storyposted.com>
parent 5ccf52d1
...@@ -2,10 +2,10 @@ import { nextTestSetup } from 'e2e-utils' ...@@ -2,10 +2,10 @@ import { nextTestSetup } from 'e2e-utils'
import { check } from 'next-test-utils' import { check } from 'next-test-utils'
import { join } from 'path' import { join } from 'path'
// @force-gate !deploy
describe('app-dir action disallowed origins', () => { describe('app-dir action disallowed origins', () => {
const { next, skipped } = nextTestSetup({ const { next, skipped } = nextTestSetup({
files: join(__dirname, 'unsafe-origins'), files: join(__dirname, 'unsafe-origins'),
skipDeployment: true,
dependencies: { dependencies: {
'server-only': 'latest', 'server-only': 'latest',
}, },
......
...@@ -2,6 +2,8 @@ import { nextTestSetup } from 'e2e-utils' ...@@ -2,6 +2,8 @@ import { nextTestSetup } from 'e2e-utils'
import { retry } from 'next-test-utils' import { retry } from 'next-test-utils'
import { join } from 'path' import { join } from 'path'
// Preserve the sibling suite's deploy exclusion previously imposed by skipDeployment's it.only.
// @force-gate !deploy
describe('app-dir action allowed from opaque origins', () => { describe('app-dir action allowed from opaque origins', () => {
const { next } = nextTestSetup({ const { next } = nextTestSetup({
files: join(__dirname, 'opaque-origin'), files: join(__dirname, 'opaque-origin'),
...@@ -23,10 +25,10 @@ describe('app-dir action allowed from opaque origins', () => { ...@@ -23,10 +25,10 @@ describe('app-dir action allowed from opaque origins', () => {
}) })
}) })
// @force-gate !deploy
describe('app-dir action disallowed from opaque origins', () => { describe('app-dir action disallowed from opaque origins', () => {
const { isNextDev, next, skipped } = nextTestSetup({ const { isNextDev, next, skipped } = nextTestSetup({
files: join(__dirname, 'opaque-origin'), files: join(__dirname, 'opaque-origin'),
skipDeployment: true,
env: { env: {
NEXT_TEST_ALLOW_OPAQUE_ORIGIN: '', NEXT_TEST_ALLOW_OPAQUE_ORIGIN: '',
}, },
......
import { nextTestSetup } from 'e2e-utils' import { nextTestSetup } from 'e2e-utils'
import { retry } from '../../../lib/next-test-utils' import { retry } from '../../../lib/next-test-utils'
// No access to runtime logs when deployed.
// @force-gate !deploy
describe('actions-unused-args', () => { describe('actions-unused-args', () => {
const { next, skipped } = nextTestSetup({ const { next, skipped } = nextTestSetup({
files: __dirname, files: __dirname,
// No access to runtime logs when deployed.
skipDeployment: true,
}) })
if (skipped) { if (skipped) {
......
...@@ -15,6 +15,7 @@ async function resolveStreamResponse(response: any, onData?: any) { ...@@ -15,6 +15,7 @@ async function resolveStreamResponse(response: any, onData?: any) {
return result return result
} }
// @force-gate !deploy
describe('app dir - external dependency', () => { describe('app dir - external dependency', () => {
const { next, skipped } = nextTestSetup({ const { next, skipped } = nextTestSetup({
files: __dirname, files: __dirname,
...@@ -32,7 +33,6 @@ describe('app dir - external dependency', () => { ...@@ -32,7 +33,6 @@ describe('app dir - external dependency', () => {
installCommand: 'pnpm i', installCommand: 'pnpm i',
startCommand: (global as any).isNextDev ? 'pnpm dev' : 'pnpm start', startCommand: (global as any).isNextDev ? 'pnpm dev' : 'pnpm start',
buildCommand: 'pnpm build', buildCommand: 'pnpm build',
skipDeployment: true,
}) })
if (skipped) { if (skipped) {
......
...@@ -8,12 +8,12 @@ import { retry } from 'next-test-utils' ...@@ -8,12 +8,12 @@ import { retry } from 'next-test-utils'
// Running `tsc --noEmit` verifies the generated root-params.d.ts is wired in // Running `tsc --noEmit` verifies the generated root-params.d.ts is wired in
// and produces the expected types. // and produces the expected types.
// @force-gate !deploy
describe.each([{ fixture: 'simple' }, { fixture: 'multiple-roots' }])( describe.each([{ fixture: 'simple' }, { fixture: 'multiple-roots' }])(
'app-root-param-getters - typecheck ($fixture)', 'app-root-param-getters - typecheck ($fixture)',
({ fixture }) => { ({ fixture }) => {
const { next, skipped } = nextTestSetup({ const { next, skipped } = nextTestSetup({
files: join(__dirname, 'fixtures', fixture), files: join(__dirname, 'fixtures', fixture),
skipDeployment: true,
}) })
if (skipped) { if (skipped) {
......
import { nextTestSetup } from 'e2e-utils' import { nextTestSetup } from 'e2e-utils'
import { getClientReferenceManifest } from 'next-test-utils' import { getClientReferenceManifest } from 'next-test-utils'
// @force-gate !deploy
describe('client-reference-chunking', () => { describe('client-reference-chunking', () => {
const { next } = nextTestSetup({ const { next } = nextTestSetup({
files: __dirname, files: __dirname,
skipDeployment: true,
}) })
it('should use the same chunks for client references across routes', async () => { it('should use the same chunks for client references across routes', async () => {
......
...@@ -224,40 +224,37 @@ import stripAnsi from 'strip-ansi' ...@@ -224,40 +224,37 @@ import stripAnsi from 'strip-ansi'
} }
} }
) )
;(process.env.IS_TURBOPACK_TEST ? describe : describe.skip)( // @force-gate !deploy && turbopack
'app-dir missing root layout', describe('app-dir missing root layout', () => {
() => { const { next, isNextDev, skipped } = nextTestSetup({
const { next, isNextDev, skipped } = nextTestSetup({ files: {
files: { app: new FileRef(path.join(__dirname, 'app')),
app: new FileRef(path.join(__dirname, 'app')), 'next.config.js': new FileRef(path.join(__dirname, 'next.config.js')),
'next.config.js': new FileRef(path.join(__dirname, 'next.config.js')), },
}, skipStart: true,
skipDeployment: true, })
skipStart: true,
}) if (skipped) return
if (skipped) return it('reports a compiler error without modifying the app', async () => {
if (isNextDev) {
it('reports a compiler error without modifying the app', async () => { await next.start()
if (isNextDev) {
await next.start() const response = await next.fetch('/route')
expect(response.status).toBe(500)
const response = await next.fetch('/route')
expect(response.status).toBe(500) await retry(async () => {
await retry(async () => {
expect(stripAnsi(next.cliOutput)).toContain(
"route/page.js doesn't have a root layout. To fix this error, make sure every page has a root layout."
)
})
} else {
await expect(next.start()).rejects.toThrow('next build failed')
expect(stripAnsi(next.cliOutput)).toContain( expect(stripAnsi(next.cliOutput)).toContain(
"route/page.js doesn't have a root layout. To fix this error, make sure every page has a root layout." "route/page.js doesn't have a root layout. To fix this error, make sure every page has a root layout."
) )
} })
} else {
await expect(next.start()).rejects.toThrow('next build failed')
expect(stripAnsi(next.cliOutput)).toContain(
"route/page.js doesn't have a root layout. To fix this error, make sure every page has a root layout."
)
}
expect(await next.hasFile('app/layout.js')).toBe(false) expect(await next.hasFile('app/layout.js')).toBe(false)
}) })
} })
)
...@@ -9,11 +9,11 @@ async function expectContainOnce(next: any, search: string) { ...@@ -9,11 +9,11 @@ async function expectContainOnce(next: any, search: string) {
}) })
} }
// Runtime logs aren't available when deployed
// @force-gate !deploy
describe('dedupe-rsc-error-log', () => { describe('dedupe-rsc-error-log', () => {
const { next } = nextTestSetup({ const { next } = nextTestSetup({
files: __dirname, files: __dirname,
// Runtime logs aren't available when deployed
skipDeployment: true,
}) })
it('should only log RSC error once for nodejs runtime', async () => { it('should only log RSC error once for nodejs runtime', async () => {
......
import { nextTestSetup } from 'e2e-utils' import { nextTestSetup } from 'e2e-utils'
// @force-gate !deploy
describe('empty-generate-static-params', () => { describe('empty-generate-static-params', () => {
const { next, isNextDev, isTurbopack, skipped } = nextTestSetup({ const { next, isNextDev, isTurbopack, skipped } = nextTestSetup({
files: __dirname, files: __dirname,
skipStart: true, skipStart: true,
skipDeployment: true,
}) })
if (skipped) { if (skipped) {
......
...@@ -2,10 +2,10 @@ import { nextTestSetup } from 'e2e-utils' ...@@ -2,10 +2,10 @@ import { nextTestSetup } from 'e2e-utils'
import { retry } from 'next-test-utils' import { retry } from 'next-test-utils'
import stripAnsi from 'strip-ansi' import stripAnsi from 'strip-ansi'
// @force-gate !deploy
describe('app-dir - errors', () => { describe('app-dir - errors', () => {
const { next, isNextDev, isNextStart, skipped } = nextTestSetup({ const { next, isNextDev, isNextStart, skipped } = nextTestSetup({
files: __dirname, files: __dirname,
skipDeployment: true,
}) })
if (skipped) { if (skipped) {
......
...@@ -14,11 +14,11 @@ import { waitForNoErrorToast } from '../../../lib/next-test-utils' ...@@ -14,11 +14,11 @@ import { waitForNoErrorToast } from '../../../lib/next-test-utils'
// For exhaustive coverage of explicit levels and per-segment overrides, // For exhaustive coverage of explicit levels and per-segment overrides,
// see the sibling `instant-validation-level-{warning,manual-warning,error, // see the sibling `instant-validation-level-{warning,manual-warning,error,
// manual-error}` fixtures. // manual-error}` fixtures.
// @force-gate !deploy
describe('instant validation - default level', () => { describe('instant validation - default level', () => {
const { next, skipped, isNextDev, isNextStart, isTurbopack } = nextTestSetup({ const { next, skipped, isNextDev, isNextStart, isTurbopack } = nextTestSetup({
files: __dirname, files: __dirname,
skipStart: true, skipStart: true,
skipDeployment: true,
env: { env: {
NEXT_TEST_LOG_VALIDATION: '1', NEXT_TEST_LOG_VALIDATION: '1',
}, },
......
...@@ -6,11 +6,11 @@ import { ...@@ -6,11 +6,11 @@ import {
} from 'e2e-utils/instant-validation' } from 'e2e-utils/instant-validation'
import { waitForNoErrorToast } from '../../../lib/next-test-utils' import { waitForNoErrorToast } from '../../../lib/next-test-utils'
// @force-gate !deploy
describe('instant validation - level error', () => { describe('instant validation - level error', () => {
const { next, skipped, isNextDev, isNextStart, isTurbopack } = nextTestSetup({ const { next, skipped, isNextDev, isNextStart, isTurbopack } = nextTestSetup({
files: __dirname, files: __dirname,
skipStart: true, skipStart: true,
skipDeployment: true,
env: { env: {
NEXT_TEST_LOG_VALIDATION: '1', NEXT_TEST_LOG_VALIDATION: '1',
}, },
......
...@@ -6,11 +6,11 @@ import { ...@@ -6,11 +6,11 @@ import {
} from 'e2e-utils/instant-validation' } from 'e2e-utils/instant-validation'
import { waitForNoErrorToast } from '../../../lib/next-test-utils' import { waitForNoErrorToast } from '../../../lib/next-test-utils'
// @force-gate !deploy
describe('instant validation - level manual-error', () => { describe('instant validation - level manual-error', () => {
const { next, skipped, isNextDev, isNextStart, isTurbopack } = nextTestSetup({ const { next, skipped, isNextDev, isNextStart, isTurbopack } = nextTestSetup({
files: __dirname, files: __dirname,
skipStart: true, skipStart: true,
skipDeployment: true,
env: { env: {
NEXT_TEST_LOG_VALIDATION: '1', NEXT_TEST_LOG_VALIDATION: '1',
}, },
......
...@@ -8,11 +8,11 @@ import { ...@@ -8,11 +8,11 @@ import {
import { getPrerenderOutput } from '../cache-components-errors/utils' import { getPrerenderOutput } from '../cache-components-errors/utils'
import { waitForNoErrorToast } from '../../../lib/next-test-utils' import { waitForNoErrorToast } from '../../../lib/next-test-utils'
// @force-gate !deploy
describe('instant validation - level manual-warning', () => { describe('instant validation - level manual-warning', () => {
const { next, skipped, isNextDev, isNextStart, isTurbopack } = nextTestSetup({ const { next, skipped, isNextDev, isNextStart, isTurbopack } = nextTestSetup({
files: __dirname, files: __dirname,
skipStart: true, skipStart: true,
skipDeployment: true,
env: { env: {
NEXT_TEST_LOG_VALIDATION: '1', NEXT_TEST_LOG_VALIDATION: '1',
}, },
......
...@@ -6,11 +6,11 @@ import { ...@@ -6,11 +6,11 @@ import {
} from 'e2e-utils/instant-validation' } from 'e2e-utils/instant-validation'
import { waitForNoErrorToast } from '../../../lib/next-test-utils' import { waitForNoErrorToast } from '../../../lib/next-test-utils'
// @force-gate !deploy
describe('instant validation - level warning', () => { describe('instant validation - level warning', () => {
const { next, skipped, isNextDev, isNextStart, isTurbopack } = nextTestSetup({ const { next, skipped, isNextDev, isNextStart, isTurbopack } = nextTestSetup({
files: __dirname, files: __dirname,
skipStart: true, skipStart: true,
skipDeployment: true,
env: { env: {
NEXT_TEST_LOG_VALIDATION: '1', NEXT_TEST_LOG_VALIDATION: '1',
}, },
......
import { runInstantValidationTests } from './harness.util' import { runInstantValidationTests } from './harness.util'
import { registerClientTests } from './client.util' import { registerClientTests } from './client.util'
runInstantValidationTests((ctx) => { // @force-gate !deploy
registerClientTests(ctx) describe('instant validation', () => {
runInstantValidationTests((ctx) => {
registerClientTests(ctx)
})
}) })
import { runInstantValidationTests } from './harness.util' import { runInstantValidationTests } from './harness.util'
import { registerHeadAndReportingTests } from './head-and-reporting.util' import { registerHeadAndReportingTests } from './head-and-reporting.util'
runInstantValidationTests((ctx) => { // @force-gate !deploy
registerHeadAndReportingTests(ctx) describe('instant validation', () => {
runInstantValidationTests((ctx) => {
registerHeadAndReportingTests(ctx)
})
}) })
...@@ -8,11 +8,11 @@ import { ...@@ -8,11 +8,11 @@ import {
} from 'e2e-utils/instant-validation' } from 'e2e-utils/instant-validation'
import { retry, waitForNoErrorToast } from '../../../lib/next-test-utils' import { retry, waitForNoErrorToast } from '../../../lib/next-test-utils'
// @force-gate !deploy
describe('instant validation - parallel slot configs', () => { describe('instant validation - parallel slot configs', () => {
const { next, skipped, isNextDev, isNextStart, isTurbopack } = nextTestSetup({ const { next, skipped, isNextDev, isNextStart, isTurbopack } = nextTestSetup({
files: __dirname, files: __dirname,
skipStart: true, skipStart: true,
skipDeployment: true,
env: { env: {
NEXT_TEST_LOG_VALIDATION: '1', NEXT_TEST_LOG_VALIDATION: '1',
}, },
......
...@@ -6,11 +6,11 @@ import { ...@@ -6,11 +6,11 @@ import {
import { retry, waitForRedbox } from '../../../lib/next-test-utils' import { retry, waitForRedbox } from '../../../lib/next-test-utils'
import { createRedboxSnapshot } from '../../../lib/add-redbox-matchers' import { createRedboxSnapshot } from '../../../lib/add-redbox-matchers'
// @force-gate !deploy
describe('instant validation - server errors', () => { describe('instant validation - server errors', () => {
const { next, skipped, isNextDev, isNextStart, isTurbopack } = nextTestSetup({ const { next, skipped, isNextDev, isNextStart, isTurbopack } = nextTestSetup({
files: __dirname, files: __dirname,
skipStart: true, skipStart: true,
skipDeployment: true,
env: { env: {
NEXT_TEST_LOG_VALIDATION: '1', NEXT_TEST_LOG_VALIDATION: '1',
}, },
......
import { runInstantValidationTests } from './harness.util' import { runInstantValidationTests } from './harness.util'
import { registerSlotsAndGroupsTests } from './slots-and-groups.util' import { registerSlotsAndGroupsTests } from './slots-and-groups.util'
runInstantValidationTests((ctx) => { // @force-gate !deploy
registerSlotsAndGroupsTests(ctx) describe('instant validation', () => {
runInstantValidationTests((ctx) => {
registerSlotsAndGroupsTests(ctx)
})
}) })
import { runInstantValidationTests } from './harness.util' import { runInstantValidationTests } from './harness.util'
import { registerSuspenseBoundariesTests } from './suspense-boundaries.util' import { registerSuspenseBoundariesTests } from './suspense-boundaries.util'
runInstantValidationTests((ctx) => { // @force-gate !deploy
registerSuspenseBoundariesTests(ctx) describe('instant validation', () => {
runInstantValidationTests((ctx) => {
registerSuspenseBoundariesTests(ctx)
})
}) })
import { runInstantValidationTests } from './harness.util' import { runInstantValidationTests } from './harness.util'
import { registerSyncIoAndBlockingTests } from './sync-io-and-blocking.util' import { registerSyncIoAndBlockingTests } from './sync-io-and-blocking.util'
runInstantValidationTests((ctx) => { // @force-gate !deploy
registerSyncIoAndBlockingTests(ctx) describe('instant validation', () => {
runInstantValidationTests((ctx) => {
registerSyncIoAndBlockingTests(ctx)
})
}) })
...@@ -3,10 +3,10 @@ import { nextTestSetup } from 'e2e-utils' ...@@ -3,10 +3,10 @@ import { nextTestSetup } from 'e2e-utils'
const METADATA_BASE_WARN_STRING = const METADATA_BASE_WARN_STRING =
'metadataBase property in metadata export is not set for resolving social open graph or twitter images,' 'metadataBase property in metadata export is not set for resolving social open graph or twitter images,'
// @force-gate !deploy
describe('app dir - metadata missing metadataBase', () => { describe('app dir - metadata missing metadataBase', () => {
const { next, isNextDev, skipped } = nextTestSetup({ const { next, isNextDev, skipped } = nextTestSetup({
files: __dirname, files: __dirname,
skipDeployment: true,
}) })
if (skipped) { if (skipped) {
......
import { FileRef, nextTestSetup } from 'e2e-utils' import { FileRef, nextTestSetup } from 'e2e-utils'
// Deploy tests are broken with `config.serverExternalPackages`
// @force-gate !deploy
describe('`next-js` Condition - Rendering', () => { describe('`next-js` Condition - Rendering', () => {
const { next, isTurbopack, skipped } = nextTestSetup({ const { next, isTurbopack, skipped } = nextTestSetup({
files: __dirname + '/fixtures/render', files: __dirname + '/fixtures/render',
...@@ -9,8 +11,6 @@ describe('`next-js` Condition - Rendering', () => { ...@@ -9,8 +11,6 @@ describe('`next-js` Condition - Rendering', () => {
'sym-linked-packages': new FileRef(__dirname + '/packages'), 'sym-linked-packages': new FileRef(__dirname + '/packages'),
}, },
dependencies: require('./fixtures/render/package.json').dependencies, dependencies: require('./fixtures/render/package.json').dependencies,
// Deploy tests are broken with `config.serverExternalPackages`
skipDeployment: true,
}) })
if (skipped) { if (skipped) {
...@@ -623,6 +623,8 @@ describe('`next-js` Condition - Rendering', () => { ...@@ -623,6 +623,8 @@ describe('`next-js` Condition - Rendering', () => {
} }
}) })
// Deploy tests are broken with `config.serverExternalPackages`
// @force-gate !deploy
describe('`next-js` Condition - middleware (legacy)', () => { describe('`next-js` Condition - middleware (legacy)', () => {
const { next, skipped } = nextTestSetup({ const { next, skipped } = nextTestSetup({
files: __dirname + '/fixtures/middleware', files: __dirname + '/fixtures/middleware',
...@@ -632,8 +634,6 @@ describe('`next-js` Condition - middleware (legacy)', () => { ...@@ -632,8 +634,6 @@ describe('`next-js` Condition - middleware (legacy)', () => {
'sym-linked-packages': new FileRef(__dirname + '/packages'), 'sym-linked-packages': new FileRef(__dirname + '/packages'),
}, },
dependencies: require('./fixtures/middleware/package.json').dependencies, dependencies: require('./fixtures/middleware/package.json').dependencies,
// Deploy tests are broken with `config.serverExternalPackages`
skipDeployment: true,
}) })
if (skipped) { if (skipped) {
...@@ -668,6 +668,8 @@ describe('`next-js` Condition - middleware (legacy)', () => { ...@@ -668,6 +668,8 @@ describe('`next-js` Condition - middleware (legacy)', () => {
}) })
}) })
// Deploy tests are broken with `config.serverExternalPackages`
// @force-gate !deploy
describe('`next-js` Condition - proxy', () => { describe('`next-js` Condition - proxy', () => {
const { next, skipped } = nextTestSetup({ const { next, skipped } = nextTestSetup({
files: __dirname + '/fixtures/proxy', files: __dirname + '/fixtures/proxy',
...@@ -677,8 +679,6 @@ describe('`next-js` Condition - proxy', () => { ...@@ -677,8 +679,6 @@ describe('`next-js` Condition - proxy', () => {
'sym-linked-packages': new FileRef(__dirname + '/packages'), 'sym-linked-packages': new FileRef(__dirname + '/packages'),
}, },
dependencies: require('./fixtures/proxy/package.json').dependencies, dependencies: require('./fixtures/proxy/package.json').dependencies,
// Deploy tests are broken with `config.serverExternalPackages`
skipDeployment: true,
}) })
if (skipped) { if (skipped) {
...@@ -713,6 +713,8 @@ describe('`next-js` Condition - proxy', () => { ...@@ -713,6 +713,8 @@ describe('`next-js` Condition - proxy', () => {
}) })
}) })
// Deploy tests are broken with `config.serverExternalPackages`
// @force-gate !deploy
describe('`next-js` Condition - instrumentation', () => { describe('`next-js` Condition - instrumentation', () => {
const { next, skipped } = nextTestSetup({ const { next, skipped } = nextTestSetup({
files: __dirname + '/fixtures/instrumentation', files: __dirname + '/fixtures/instrumentation',
...@@ -723,8 +725,6 @@ describe('`next-js` Condition - instrumentation', () => { ...@@ -723,8 +725,6 @@ describe('`next-js` Condition - instrumentation', () => {
}, },
dependencies: require('./fixtures/instrumentation/package.json') dependencies: require('./fixtures/instrumentation/package.json')
.dependencies, .dependencies,
// Deploy tests are broken with `config.serverExternalPackages`
skipDeployment: true,
}) })
if (skipped) { if (skipped) {
......
import { nextTestSetup } from 'e2e-utils' import { nextTestSetup } from 'e2e-utils'
import { waitForNoRedbox } from 'next-test-utils' import { waitForNoRedbox } from 'next-test-utils'
// @force-gate !deploy
describe('app dir - not found with default 404 page', () => { describe('app dir - not found with default 404 page', () => {
const { next, isNextDev, skipped } = nextTestSetup({ const { next, isNextDev, skipped } = nextTestSetup({
files: __dirname, files: __dirname,
skipDeployment: true,
}) })
if (skipped) { if (skipped) {
......
import { nextTestSetup } from 'e2e-utils' import { nextTestSetup } from 'e2e-utils'
import { check } from 'next-test-utils' import { check } from 'next-test-utils'
// @force-gate !deploy
describe('app dir - not-found - basic', () => { describe('app dir - not-found - basic', () => {
const { next, isNextDev, isNextStart, skipped } = nextTestSetup({ const { next, isNextDev, isNextStart, skipped } = nextTestSetup({
files: __dirname, files: __dirname,
skipDeployment: true,
}) })
if (skipped) { if (skipped) {
......
import { nextTestSetup } from 'e2e-utils' import { nextTestSetup } from 'e2e-utils'
const isAdapterTest = process.env.NEXT_ENABLE_ADAPTER === '1' // The legacy builder incorrectly replaces this response with the Pages
// Router error page. The adapter preserves the App Router not-found page.
// @force-gate !deploy || adapter
describe('pages-router-app-not-found', () => { describe('pages-router-app-not-found', () => {
const { next } = nextTestSetup({ const { next } = nextTestSetup({
files: __dirname, files: __dirname,
// The legacy builder incorrectly replaces this response with the Pages
// Router error page. The adapter preserves the App Router not-found page.
skipDeployment: !isAdapterTest,
}) })
it('fully renders an app not-found selected by a pages route', async () => { it('fully renders an app not-found selected by a pages route', async () => {
......
import { nextTestSetup } from 'e2e-utils' import { nextTestSetup } from 'e2e-utils'
import { retry, waitForRedbox, getRedboxDescription } from 'next-test-utils' import { retry, waitForRedbox, getRedboxDescription } from 'next-test-utils'
// We do not have access to runtime logs when deployed
// @force-gate !deploy
describe('app-dir refresh', () => { describe('app-dir refresh', () => {
const { next, skipped, isNextDev } = nextTestSetup({ const { next, skipped, isNextDev } = nextTestSetup({
files: __dirname, files: __dirname,
// We do not have access to runtime logs when deployed
skipDeployment: true,
}) })
if (skipped) return if (skipped) return
......
...@@ -460,11 +460,11 @@ const cases: { ...@@ -460,11 +460,11 @@ const cases: {
}, },
] ]
// TODO: re-enable once changes in infrastructure are merged
// @force-gate !deploy
describe('rewrite-headers', () => { describe('rewrite-headers', () => {
const { next, skipped } = nextTestSetup({ const { next, skipped } = nextTestSetup({
files: __dirname, files: __dirname,
// TODO: re-enable once changes in infrastructure are merged
skipDeployment: true,
}) })
if (skipped) return if (skipped) return
......
import { nextTestSetup } from 'e2e-utils' import { nextTestSetup } from 'e2e-utils'
import * as cheerio from 'cheerio' import * as cheerio from 'cheerio'
const isAdapterTest = process.env.NEXT_ENABLE_ADAPTER === '1' // The latest changes to support this behavior on deployed infra are available in the adapter,
// and are not being backported to the CLI
// @force-gate !deploy || adapter
describe('sub-shell-generation', () => { describe('sub-shell-generation', () => {
const { next, isNextDev, isNextDeploy } = nextTestSetup({ const { next, isNextDev, isNextDeploy } = nextTestSetup({
files: __dirname, files: __dirname,
// The latest changes to support this behavior on deployed infra are available in the adapter,
// and are not being backported to the CLI
skipDeployment: !isAdapterTest,
}) })
if (isNextDev) { if (isNextDev) {
......
import { execSync } from 'child_process' import { execSync } from 'child_process'
import { nextTestSetup } from 'e2e-utils' import { nextTestSetup } from 'e2e-utils'
// @force-gate !deploy
describe('app-dir types', () => { describe('app-dir types', () => {
const { next, skipped } = nextTestSetup({ const { next, skipped } = nextTestSetup({
files: __dirname, files: __dirname,
skipDeployment: true,
skipStart: true, skipStart: true,
}) })
......
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