Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 21 additions & 1 deletion e2e-tests/tests/nextjs-14.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,26 @@ describe('NextJS-14', () => {
'Are you using a CI/CD tool',
));

ciCdPrompted &&
const sentryRulesPrompted =
ciCdPrompted &&
(await wizardInstance.sendStdinAndWaitForOutput(
// Selecting `No` for CI/CD tool
[KEYS.DOWN, KEYS.ENTER],
'Do you want to create an AI rules file with Sentry examples for your code editor?',
));

const editorTypePrompted =
sentryRulesPrompted &&
(await wizardInstance.sendStdinAndWaitForOutput(
// Selecting `Yes` for AI rules
[KEYS.ENTER],
'Which AI-enabled code editor are you using?',
));

editorTypePrompted &&
(await wizardInstance.sendStdinAndWaitForOutput(
// Selecting Cursor (default)
[KEYS.ENTER],
'Successfully installed the Sentry Next.js SDK!',
));

Expand Down Expand Up @@ -134,6 +150,10 @@ export const onRequestError = Sentry.captureRequestError;`,
]);
});

test('sentryrules file exists for Cursor', () => {
checkFileExists(`${projectDir}/.cursorrules`);
});

test('next.config file contains Sentry wrapper', () => {
checkFileContents(`${projectDir}/next.config.mjs`, [
"import {withSentryConfig} from '@sentry/nextjs'",
Expand Down
22 changes: 21 additions & 1 deletion e2e-tests/tests/nextjs-15.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,26 @@ describe('NextJS-15', () => {
'Are you using a CI/CD tool',
));

ciCdPrompted &&
const sentryRulesPrompted =
ciCdPrompted &&
(await wizardInstance.sendStdinAndWaitForOutput(
// Selecting `No` for CI/CD tool
[KEYS.DOWN, KEYS.ENTER],
'Do you want to create an AI rules file with Sentry examples for your code editor?',
));

const editorTypePrompted =
sentryRulesPrompted &&
(await wizardInstance.sendStdinAndWaitForOutput(
// Selecting `Yes` for AI rules
[KEYS.ENTER],
'Which AI-enabled code editor are you using?',
));

editorTypePrompted &&
(await wizardInstance.sendStdinAndWaitForOutput(
// Selecting Cursor (default)
[KEYS.ENTER],
'Successfully installed the Sentry Next.js SDK!',
));

Expand Down Expand Up @@ -133,6 +149,10 @@ export const onRequestError = Sentry.captureRequestError;`,
]);
});

test('sentryrules file exists for Cursor', () => {
checkFileExists(`${projectDir}/.cursorrules`);
});

test('next.config file contains Sentry wrapper', () => {
checkFileContents(`${projectDir}/next.config.ts`, [
'import {withSentryConfig} from "@sentry/nextjs"',
Expand Down
Loading
Loading