Skip to content

Commit a1ff4e0

Browse files
committed
fix next e2e test
1 parent ea5d99e commit a1ff4e0

File tree

19 files changed

+46
-44
lines changed

19 files changed

+46
-44
lines changed

packages/e2e-tests/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
.env
22
tmp
3+
.tmp_build_output

packages/e2e-tests/test-applications/create-next-app/playwright.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ if (!testEnv) {
77
throw new Error('No test env defined');
88
}
99

10-
const port = 9000;
10+
const port = 3030;
1111

1212
/**
1313
* See https://playwright.dev/docs/test-configuration.
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
import * as fs from 'fs';
22
import * as assert from 'assert/strict';
33

4-
const stdin = fs.readFileSync(0).toString();
4+
const buildOutput = fs.readFileSync('.tmp_build_output', 'utf-8');
55

66
// Assert that all static components stay static and all dynamic components stay dynamic
77

8-
assert.match(stdin, / \/client-component/);
9-
assert.match(stdin, / \/client-component\/parameter\/\[\.\.\.parameters\]/);
10-
assert.match(stdin, / \/client-component\/parameter\/\[parameter\]/);
8+
assert.match(buildOutput, / \/client-component/);
9+
assert.match(buildOutput, / \/client-component\/parameter\/\[\.\.\.parameters\]/);
10+
assert.match(buildOutput, / \/client-component\/parameter\/\[parameter\]/);
1111

12-
assert.match(stdin, /λ \/server-component/);
13-
assert.match(stdin, /λ \/server-component\/parameter\/\[\.\.\.parameters\]/);
14-
assert.match(stdin, /λ \/server-component\/parameter\/\[parameter\]/);
12+
assert.match(buildOutput, /λ \/server-component/);
13+
assert.match(buildOutput, /λ \/server-component\/parameter\/\[\.\.\.parameters\]/);
14+
assert.match(buildOutput, /λ \/server-component\/parameter\/\[parameter\]/);
1515

1616
export {};

packages/e2e-tests/test-applications/nextjs-app-dir/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"build": "next build",
77
"test:prod": "TEST_ENV=production playwright test",
88
"test:dev": "TEST_ENV=development playwright test",
9-
"test:build": "pnpm install && npx playwright install && pnpm build",
9+
"test:build": "pnpm install && npx playwright install && pnpm build > .tmp_build_output",
1010
"test:test-build": "pnpm ts-node --script-mode assert-build.ts",
1111
"test:build-canary": "pnpm install && pnpm add next@canary && npx playwright install && pnpm build",
1212
"test:build-latest": "pnpm install && pnpm add next@latest && npx playwright install && pnpm build",

packages/e2e-tests/test-applications/nextjs-app-dir/playwright.config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ if (!testEnv) {
77
throw new Error('No test env defined');
88
}
99

10-
const nextPort = 9000;
11-
const eventProxyPort = 9001;
10+
const nextPort = 3030;
11+
const eventProxyPort = 3031;
1212

1313
/**
1414
* See https://playwright.dev/docs/test-configuration.

packages/e2e-tests/test-applications/nextjs-app-dir/sentry.client.config.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,6 @@ import * as Sentry from '@sentry/nextjs';
33
Sentry.init({
44
environment: 'qa', // dynamic sampling bias to keep transactions
55
dsn: process.env.NEXT_PUBLIC_E2E_TEST_DSN,
6-
tunnel: `http://localhost:${
7-
Number(process.env.NEXT_PUBLIC_BASE_PORT) +
8-
Number(process.env.NEXT_PUBLIC_PORT_MODULO) +
9-
Number(process.env.NEXT_PUBLIC_PORT_GAP)
10-
}/`, // proxy server
6+
tunnel: `http://localhost:3031/`, // proxy server
117
tracesSampleRate: 1.0,
128
});

packages/e2e-tests/test-applications/nextjs-app-dir/sentry.edge.config.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,6 @@ import * as Sentry from '@sentry/nextjs';
33
Sentry.init({
44
environment: 'qa', // dynamic sampling bias to keep transactions
55
dsn: process.env.NEXT_PUBLIC_E2E_TEST_DSN,
6-
tunnel: `http://localhost:${
7-
Number(process.env.NEXT_PUBLIC_BASE_PORT) +
8-
Number(process.env.NEXT_PUBLIC_PORT_MODULO) +
9-
Number(process.env.NEXT_PUBLIC_PORT_GAP)
10-
}/`, // proxy server
6+
tunnel: `http://localhost:3031/`, // proxy server
117
tracesSampleRate: 1.0,
128
});

packages/e2e-tests/test-applications/nextjs-app-dir/sentry.server.config.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,6 @@ import * as Sentry from '@sentry/nextjs';
33
Sentry.init({
44
environment: 'qa', // dynamic sampling bias to keep transactions
55
dsn: process.env.NEXT_PUBLIC_E2E_TEST_DSN,
6-
tunnel: `http://localhost:${
7-
Number(process.env.NEXT_PUBLIC_BASE_PORT) +
8-
Number(process.env.NEXT_PUBLIC_PORT_MODULO) +
9-
Number(process.env.NEXT_PUBLIC_PORT_GAP)
10-
}/`, // proxy server
6+
tunnel: `http://localhost:3031/`, // proxy server
117
tracesSampleRate: 1.0,
128
});
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { startEventProxyServer } from '../../test-utils/event-proxy-server';
22

33
startEventProxyServer({
4-
port: 9001,
4+
port: 3031,
55
proxyServerName: 'nextjs-13-app-dir',
66
});

packages/e2e-tests/test-applications/nextjs-app-dir/tsconfig.json

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
{
22
"compilerOptions": {
33
"target": "es5",
4-
"lib": ["dom", "dom.iterable", "esnext"],
4+
"lib": [
5+
"dom",
6+
"dom.iterable",
7+
"esnext"
8+
],
59
"allowJs": true,
610
"skipLibCheck": true,
711
"strict": true,
@@ -17,10 +21,19 @@
1721
{
1822
"name": "next"
1923
}
20-
]
24+
],
25+
"incremental": true
2126
},
22-
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", "next.config.js", ".next/types/**/*.ts"],
23-
"exclude": ["node_modules"],
27+
"include": [
28+
"next-env.d.ts",
29+
"**/*.ts",
30+
"**/*.tsx",
31+
"next.config.js",
32+
".next/types/**/*.ts"
33+
],
34+
"exclude": [
35+
"node_modules"
36+
],
2437
"ts-node": {
2538
"compilerOptions": {
2639
"module": "CommonJS"

0 commit comments

Comments
 (0)