Skip to content

Commit 54a889e

Browse files
author
Luca Forstner
authored
ci: Fix nextjs-15 canary tests (#12918)
1 parent 6f4c045 commit 54a889e

File tree

3 files changed

+23
-1
lines changed

3 files changed

+23
-1
lines changed

dev-packages/e2e-tests/test-applications/nextjs-15/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"test:prod": "TEST_ENV=production __NEXT_EXPERIMENTAL_INSTRUMENTATION=1 playwright test",
99
"test:dev": "TEST_ENV=development __NEXT_EXPERIMENTAL_INSTRUMENTATION=1 playwright test",
1010
"test:build": "pnpm install && npx playwright install && pnpm build",
11-
"test:build-canary": "pnpm install && pnpm add next@rc && pnpm add react@beta && pnpm add react-dom@beta && npx playwright install && pnpm build",
11+
"test:build-canary": "pnpm install && pnpm add next@canary && pnpm add react@beta && pnpm add react-dom@beta && npx playwright install && pnpm build",
1212
"test:build-latest": "pnpm install && pnpm add next@rc && pnpm add react@beta && pnpm add react-dom@beta && npx playwright install && pnpm build",
1313
"test:assert": "pnpm test:prod && pnpm test:dev"
1414
},

dev-packages/e2e-tests/test-applications/nextjs-15/tests/nested-rsc-error.test.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,20 @@
11
import { expect, test } from '@playwright/test';
22
import { waitForError, waitForTransaction } from '@sentry-internal/test-utils';
33

4+
const packageJson = require('../package.json');
5+
46
test('Should capture errors from nested server components when `Sentry.captureRequestError` is added to the `onRequestError` hook', async ({
57
page,
68
}) => {
9+
const [, minor, patch, canary] = packageJson.dependencies.next.split('.');
10+
11+
test.skip(
12+
minor === '0' &&
13+
patch.startsWith('0-') &&
14+
((patch.includes('canary') && Number(canary) < 63) || patch.includes('rc')),
15+
'Next.js version does not expose these errors',
16+
);
17+
718
const errorEventPromise = waitForError('nextjs-15', errorEvent => {
819
return !!errorEvent?.exception?.values?.some(value => value.value === 'I am technically uncatchable');
920
});

dev-packages/e2e-tests/test-applications/nextjs-15/tests/streaming-rsc-error.test.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,20 @@
11
import { expect, test } from '@playwright/test';
22
import { waitForError, waitForTransaction } from '@sentry-internal/test-utils';
33

4+
const packageJson = require('../package.json');
5+
46
test('Should capture errors for crashing streaming promises in server components when `Sentry.captureRequestError` is added to the `onRequestError` hook', async ({
57
page,
68
}) => {
9+
const [, minor, patch, canary] = packageJson.dependencies.next.split('.');
10+
11+
test.skip(
12+
minor === '0' &&
13+
patch.startsWith('0-') &&
14+
((patch.includes('canary') && Number(canary) < 63) || patch.includes('rc')),
15+
'Next.js version does not expose these errors',
16+
);
17+
718
const errorEventPromise = waitForError('nextjs-15', errorEvent => {
819
return !!errorEvent?.exception?.values?.some(value => value.value === 'I am a data streaming error');
920
});

0 commit comments

Comments
 (0)