Skip to content

Commit 751f797

Browse files
committed
Fix nuxt-3-min tests
1 parent 6127778 commit 751f797

File tree

5 files changed

+13
-10
lines changed

5 files changed

+13
-10
lines changed

dev-packages/e2e-tests/test-applications/nuxt-3-min/nuxt.config.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,10 @@ export default defineNuxtConfig({
1111
},
1212
},
1313
},
14+
nitro: {
15+
rollupConfig: {
16+
// @sentry/... is set external to prevent bundling all of Sentry into the `runtime.mjs` file in the build output
17+
external: [/@sentry\/.*/],
18+
},
19+
},
1420
});

dev-packages/e2e-tests/test-applications/nuxt-3-min/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
},
2727
"overrides": {
2828
"nitropack": "2.10.0",
29-
"ofetch": "1.4.0"
29+
"ofetch": "1.4.0",
30+
"@vercel/nft": "^0.27.4"
3031
}
3132
}

dev-packages/e2e-tests/test-applications/nuxt-3-min/playwright.config.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,12 @@
11
import { fileURLToPath } from 'node:url';
2-
import type { ConfigOptions } from '@nuxt/test-utils/playwright';
32
import { getPlaywrightConfig } from '@sentry-internal/test-utils';
43

5-
const nuxtConfigOptions: ConfigOptions = {
4+
const nuxtConfigOptions = {
65
nuxt: {
76
rootDir: fileURLToPath(new URL('.', import.meta.url)),
87
},
98
};
109

11-
/* Make sure to import from '@nuxt/test-utils/playwright' in the tests
12-
* Like this: import { expect, test } from '@nuxt/test-utils/playwright' */
13-
1410
const config = getPlaywrightConfig({
1511
startCommand: `pnpm start:import`,
1612
use: { ...nuxtConfigOptions },

dev-packages/e2e-tests/test-applications/nuxt-3-min/tests/tracing.client.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { expect, test } from '@playwright/test';
22
import { waitForTransaction } from '@sentry-internal/test-utils';
33
import type { Span } from '@sentry/nuxt';
44

5-
test.skip('sends a pageload root span with a parameterized URL', async ({ page }) => {
5+
test('sends a pageload root span with a parameterized URL', async ({ page }) => {
66
const transactionPromise = waitForTransaction('nuxt-3-min', async transactionEvent => {
77
return transactionEvent.transaction === '/test-param/:param()';
88
});
@@ -31,7 +31,7 @@ test.skip('sends a pageload root span with a parameterized URL', async ({ page }
3131
});
3232
});
3333

34-
test.skip('sends component tracking spans when `trackComponents` is enabled', async ({ page }) => {
34+
test('sends component tracking spans when `trackComponents` is enabled', async ({ page }) => {
3535
const transactionPromise = waitForTransaction('nuxt-3-min', async transactionEvent => {
3636
return transactionEvent.transaction === '/client-error';
3737
});

dev-packages/e2e-tests/test-applications/nuxt-3-min/tests/tracing.server.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { expect, test } from '@playwright/test';
22
import { waitForTransaction } from '@sentry-internal/test-utils';
33
import { SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN } from '@sentry/core';
44

5-
test.skip('sends a server action transaction on pageload', async ({ page }) => {
5+
test('sends a server action transaction on pageload', async ({ page }) => {
66
const transactionPromise = waitForTransaction('nuxt-3-min', transactionEvent => {
77
return transactionEvent.transaction.includes('GET /test-param/');
88
});
@@ -21,7 +21,7 @@ test.skip('sends a server action transaction on pageload', async ({ page }) => {
2121
);
2222
});
2323

24-
test.skip('does not send transactions for build asset folder "_nuxt"', async ({ page }) => {
24+
test('does not send transactions for build asset folder "_nuxt"', async ({ page }) => {
2525
let buildAssetFolderOccurred = false;
2626

2727
waitForTransaction('nuxt-3-min', transactionEvent => {

0 commit comments

Comments
 (0)