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"

packages/e2e-tests/test-applications/node-express-app/playwright.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ const config: PlaywrightTestConfig = {
5858
/* Run your local dev server before starting the tests */
5959
webServer: {
6060
command: 'pnpm start',
61-
port: 9000,
61+
port: 3030,
6262
},
6363
};
6464

packages/e2e-tests/test-applications/node-express-app/src/app.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Sentry.init({
1818
});
1919

2020
const app = express();
21-
const port = 9000;
21+
const port = 3030;
2222

2323
app.use(Sentry.Handlers.requestHandler());
2424
app.use(Sentry.Handlers.tracingHandler());

packages/e2e-tests/test-applications/react-create-hash-router/playwright.config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,9 @@ const config: PlaywrightTestConfig = {
6060
/* Run your local dev server before starting the tests */
6161
webServer: {
6262
command: 'pnpm start',
63-
port: 9000,
63+
port: 3030,
6464
env: {
65-
PORT: '9000',
65+
PORT: '3030',
6666
},
6767
},
6868
};

packages/e2e-tests/test-applications/standard-frontend-react-tracing-import/playwright.config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,9 @@ const config: PlaywrightTestConfig = {
6060
/* Run your local dev server before starting the tests */
6161
webServer: {
6262
command: 'pnpm start',
63-
port: 9000,
63+
port: 3030,
6464
env: {
65-
PORT: '9000',
65+
PORT: '3030',
6666
},
6767
},
6868
};

packages/e2e-tests/test-applications/standard-frontend-react/playwright.config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,9 @@ const config: PlaywrightTestConfig = {
6060
/* Run your local dev server before starting the tests */
6161
webServer: {
6262
command: 'pnpm start',
63-
port: 9000,
63+
port: 3030,
6464
env: {
65-
PORT: '9000',
65+
PORT: '3030',
6666
},
6767
},
6868
};

packages/e2e-tests/test-applications/sveltekit/playwright.config.ts

Lines changed: 2 additions & 2 deletions
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.
@@ -56,7 +56,7 @@ const config: PlaywrightTestConfig = {
5656
webServer: [
5757
{
5858
command: 'pnpm ts-node --esm start-event-proxy.ts',
59-
port: 9001,
59+
port: 3031,
6060
},
6161
{
6262
command:

packages/e2e-tests/test-applications/sveltekit/src/hooks.client.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Sentry.init({
55
environment: 'qa', // dynamic sampling bias to keep transactions
66
dsn: env.PUBLIC_E2E_TEST_DSN,
77
debug: true,
8-
tunnel: `http://localhost:9001/`, // proxy server
8+
tunnel: `http://localhost:3031/`, // proxy server
99
tracesSampleRate: 1.0,
1010
});
1111

packages/e2e-tests/test-applications/sveltekit/src/hooks.server.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Sentry.init({
55
environment: 'qa', // dynamic sampling bias to keep transactions
66
dsn: env.E2E_TEST_DSN,
77
debug: true,
8-
tunnel: `http://localhost:9001/`, // proxy server
8+
tunnel: `http://localhost:3031/`, // proxy server
99
tracesSampleRate: 1.0,
1010
});
1111

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { startEventProxyServer } from './event-proxy-server';
22

33
startEventProxyServer({
4-
port: 9001,
4+
port: 3031,
55
proxyServerName: 'sveltekit',
66
});

0 commit comments

Comments
 (0)