From 8e1c971507b705eaff1122e88965b76b9728ce53 Mon Sep 17 00:00:00 2001 From: Lukas Stracke Date: Mon, 10 Mar 2025 16:52:16 +0100 Subject: [PATCH 1/2] test(nuxt): Fix failing e2e tests --- .../test-applications/nuxt-3/package.json | 1 - .../test-applications/nuxt-3/playwright.config.ts | 14 +++++++------- .../nuxt-3/tests/errors.client.test.ts | 2 +- .../nuxt-3/tests/tracing.client.test.ts | 2 +- 4 files changed, 9 insertions(+), 10 deletions(-) diff --git a/dev-packages/e2e-tests/test-applications/nuxt-3/package.json b/dev-packages/e2e-tests/test-applications/nuxt-3/package.json index df88dd717a8d..0656c5978990 100644 --- a/dev-packages/e2e-tests/test-applications/nuxt-3/package.json +++ b/dev-packages/e2e-tests/test-applications/nuxt-3/package.json @@ -19,7 +19,6 @@ "nuxt": "^3.14.0" }, "devDependencies": { - "@nuxt/test-utils": "^3.14.1", "@playwright/test": "~1.50.0", "@sentry-internal/test-utils": "link:../../../test-utils" } diff --git a/dev-packages/e2e-tests/test-applications/nuxt-3/playwright.config.ts b/dev-packages/e2e-tests/test-applications/nuxt-3/playwright.config.ts index 6cea405151bd..91e8ba6f60fe 100644 --- a/dev-packages/e2e-tests/test-applications/nuxt-3/playwright.config.ts +++ b/dev-packages/e2e-tests/test-applications/nuxt-3/playwright.config.ts @@ -1,19 +1,19 @@ import { fileURLToPath } from 'node:url'; -import type { ConfigOptions } from '@nuxt/test-utils/playwright'; +// import type { ConfigOptions } from '@nuxt/test-utils/playwright'; import { getPlaywrightConfig } from '@sentry-internal/test-utils'; -const nuxtConfigOptions: ConfigOptions = { - nuxt: { - rootDir: fileURLToPath(new URL('.', import.meta.url)), - }, -}; +// const nuxtConfigOptions: ConfigOptions = { +// nuxt: { +// rootDir: fileURLToPath(new URL('.', import.meta.url)), +// }, +// }; /* Make sure to import from '@nuxt/test-utils/playwright' in the tests * Like this: import { expect, test } from '@nuxt/test-utils/playwright' */ const config = getPlaywrightConfig({ startCommand: `pnpm start:import`, - use: { ...nuxtConfigOptions }, + // use: { ...nuxtConfigOptions }, }); export default config; diff --git a/dev-packages/e2e-tests/test-applications/nuxt-3/tests/errors.client.test.ts b/dev-packages/e2e-tests/test-applications/nuxt-3/tests/errors.client.test.ts index a04ebf73f08d..d94f649f78d1 100644 --- a/dev-packages/e2e-tests/test-applications/nuxt-3/tests/errors.client.test.ts +++ b/dev-packages/e2e-tests/test-applications/nuxt-3/tests/errors.client.test.ts @@ -1,4 +1,4 @@ -import { expect, test } from '@nuxt/test-utils/playwright'; +import { expect, test } from '@playwright/test'; import { waitForError } from '@sentry-internal/test-utils'; test.describe('client-side errors', async () => { diff --git a/dev-packages/e2e-tests/test-applications/nuxt-3/tests/tracing.client.test.ts b/dev-packages/e2e-tests/test-applications/nuxt-3/tests/tracing.client.test.ts index f779bbcee69f..abeed374a426 100644 --- a/dev-packages/e2e-tests/test-applications/nuxt-3/tests/tracing.client.test.ts +++ b/dev-packages/e2e-tests/test-applications/nuxt-3/tests/tracing.client.test.ts @@ -1,4 +1,4 @@ -import { expect, test } from '@nuxt/test-utils/playwright'; +import { expect, test } from '@playwright/test'; import { waitForTransaction } from '@sentry-internal/test-utils'; import type { Span } from '@sentry/nuxt'; From ed985423641073a36e4c1e96f6aedd4db51b5a3f Mon Sep 17 00:00:00 2001 From: Lukas Stracke Date: Mon, 10 Mar 2025 16:57:30 +0100 Subject: [PATCH 2/2] other e2e test apps --- .../nuxt-3-dynamic-import/package.json | 1 - .../nuxt-3-dynamic-import/playwright.config.ts | 9 --------- .../tests/errors.client.test.ts | 2 +- .../tests/tracing.client.test.ts | 2 +- .../test-applications/nuxt-3-min/package.json | 1 - .../nuxt-3-min/playwright.config.ts | 12 ------------ .../nuxt-3-min/tests/errors.client.test.ts | 2 +- .../nuxt-3-min/tests/tracing.client.test.ts | 2 +- .../nuxt-3-top-level-import/package.json | 1 - .../nuxt-3-top-level-import/playwright.config.ts | 12 ------------ .../tests/errors.client.test.ts | 2 +- .../tests/tracing.client.test.ts | 2 +- .../test-applications/nuxt-3/playwright.config.ts | 12 ------------ .../e2e-tests/test-applications/nuxt-4/package.json | 1 - .../test-applications/nuxt-4/playwright.config.ts | 12 ------------ 15 files changed, 6 insertions(+), 67 deletions(-) diff --git a/dev-packages/e2e-tests/test-applications/nuxt-3-dynamic-import/package.json b/dev-packages/e2e-tests/test-applications/nuxt-3-dynamic-import/package.json index 8555f0da7a58..3c383fe962e1 100644 --- a/dev-packages/e2e-tests/test-applications/nuxt-3-dynamic-import/package.json +++ b/dev-packages/e2e-tests/test-applications/nuxt-3-dynamic-import/package.json @@ -18,7 +18,6 @@ "nuxt": "^3.14.0" }, "devDependencies": { - "@nuxt/test-utils": "^3.14.1", "@playwright/test": "~1.50.0", "@sentry-internal/test-utils": "link:../../../test-utils" }, diff --git a/dev-packages/e2e-tests/test-applications/nuxt-3-dynamic-import/playwright.config.ts b/dev-packages/e2e-tests/test-applications/nuxt-3-dynamic-import/playwright.config.ts index aa1ff8e9743c..586ca5cf8226 100644 --- a/dev-packages/e2e-tests/test-applications/nuxt-3-dynamic-import/playwright.config.ts +++ b/dev-packages/e2e-tests/test-applications/nuxt-3-dynamic-import/playwright.config.ts @@ -1,19 +1,10 @@ -import { fileURLToPath } from 'node:url'; -import type { ConfigOptions } from '@nuxt/test-utils/playwright'; import { getPlaywrightConfig } from '@sentry-internal/test-utils'; -const nuxtConfigOptions: ConfigOptions = { - nuxt: { - rootDir: fileURLToPath(new URL('.', import.meta.url)), - }, -}; - /* Make sure to import from '@nuxt/test-utils/playwright' in the tests * Like this: import { expect, test } from '@nuxt/test-utils/playwright' */ const config = getPlaywrightConfig({ startCommand: `pnpm start`, - use: { ...nuxtConfigOptions }, }); export default config; diff --git a/dev-packages/e2e-tests/test-applications/nuxt-3-dynamic-import/tests/errors.client.test.ts b/dev-packages/e2e-tests/test-applications/nuxt-3-dynamic-import/tests/errors.client.test.ts index 2fdd4f79cc46..f4ca86413598 100644 --- a/dev-packages/e2e-tests/test-applications/nuxt-3-dynamic-import/tests/errors.client.test.ts +++ b/dev-packages/e2e-tests/test-applications/nuxt-3-dynamic-import/tests/errors.client.test.ts @@ -1,4 +1,4 @@ -import { expect, test } from '@nuxt/test-utils/playwright'; +import { expect, test } from '@playwright/test'; import { waitForError } from '@sentry-internal/test-utils'; test.describe('client-side errors', async () => { diff --git a/dev-packages/e2e-tests/test-applications/nuxt-3-dynamic-import/tests/tracing.client.test.ts b/dev-packages/e2e-tests/test-applications/nuxt-3-dynamic-import/tests/tracing.client.test.ts index e4cc6d7b35b2..f87949e32527 100644 --- a/dev-packages/e2e-tests/test-applications/nuxt-3-dynamic-import/tests/tracing.client.test.ts +++ b/dev-packages/e2e-tests/test-applications/nuxt-3-dynamic-import/tests/tracing.client.test.ts @@ -1,4 +1,4 @@ -import { expect, test } from '@nuxt/test-utils/playwright'; +import { expect, test } from '@playwright/test'; import { waitForTransaction } from '@sentry-internal/test-utils'; import type { Span } from '@sentry/nuxt'; diff --git a/dev-packages/e2e-tests/test-applications/nuxt-3-min/package.json b/dev-packages/e2e-tests/test-applications/nuxt-3-min/package.json index 7fb034434fdf..62133c9a85c3 100644 --- a/dev-packages/e2e-tests/test-applications/nuxt-3-min/package.json +++ b/dev-packages/e2e-tests/test-applications/nuxt-3-min/package.json @@ -20,7 +20,6 @@ "nuxt": "3.7.0" }, "devDependencies": { - "@nuxt/test-utils": "^3.14.1", "@playwright/test": "~1.50.0", "@sentry-internal/test-utils": "link:../../../test-utils" }, diff --git a/dev-packages/e2e-tests/test-applications/nuxt-3-min/playwright.config.ts b/dev-packages/e2e-tests/test-applications/nuxt-3-min/playwright.config.ts index 6cea405151bd..e07fb02e5218 100644 --- a/dev-packages/e2e-tests/test-applications/nuxt-3-min/playwright.config.ts +++ b/dev-packages/e2e-tests/test-applications/nuxt-3-min/playwright.config.ts @@ -1,19 +1,7 @@ -import { fileURLToPath } from 'node:url'; -import type { ConfigOptions } from '@nuxt/test-utils/playwright'; import { getPlaywrightConfig } from '@sentry-internal/test-utils'; -const nuxtConfigOptions: ConfigOptions = { - nuxt: { - rootDir: fileURLToPath(new URL('.', import.meta.url)), - }, -}; - -/* Make sure to import from '@nuxt/test-utils/playwright' in the tests - * Like this: import { expect, test } from '@nuxt/test-utils/playwright' */ - const config = getPlaywrightConfig({ startCommand: `pnpm start:import`, - use: { ...nuxtConfigOptions }, }); export default config; diff --git a/dev-packages/e2e-tests/test-applications/nuxt-3-min/tests/errors.client.test.ts b/dev-packages/e2e-tests/test-applications/nuxt-3-min/tests/errors.client.test.ts index 66f86755218e..0de0c3dd498a 100644 --- a/dev-packages/e2e-tests/test-applications/nuxt-3-min/tests/errors.client.test.ts +++ b/dev-packages/e2e-tests/test-applications/nuxt-3-min/tests/errors.client.test.ts @@ -1,4 +1,4 @@ -import { expect, test } from '@nuxt/test-utils/playwright'; +import { expect, test } from '@playwright/test'; import { waitForError } from '@sentry-internal/test-utils'; test.describe('client-side errors', async () => { diff --git a/dev-packages/e2e-tests/test-applications/nuxt-3-min/tests/tracing.client.test.ts b/dev-packages/e2e-tests/test-applications/nuxt-3-min/tests/tracing.client.test.ts index b726636974c9..1f5a6aee4891 100644 --- a/dev-packages/e2e-tests/test-applications/nuxt-3-min/tests/tracing.client.test.ts +++ b/dev-packages/e2e-tests/test-applications/nuxt-3-min/tests/tracing.client.test.ts @@ -1,4 +1,4 @@ -import { expect, test } from '@nuxt/test-utils/playwright'; +import { expect, test } from '@playwright/test'; import { waitForTransaction } from '@sentry-internal/test-utils'; import type { Span } from '@sentry/nuxt'; diff --git a/dev-packages/e2e-tests/test-applications/nuxt-3-top-level-import/package.json b/dev-packages/e2e-tests/test-applications/nuxt-3-top-level-import/package.json index 1e6590da7a10..0f7411d6a3d6 100644 --- a/dev-packages/e2e-tests/test-applications/nuxt-3-top-level-import/package.json +++ b/dev-packages/e2e-tests/test-applications/nuxt-3-top-level-import/package.json @@ -18,7 +18,6 @@ "nuxt": "^3.14.0" }, "devDependencies": { - "@nuxt/test-utils": "^3.14.1", "@playwright/test": "~1.50.0", "@sentry-internal/test-utils": "link:../../../test-utils" } diff --git a/dev-packages/e2e-tests/test-applications/nuxt-3-top-level-import/playwright.config.ts b/dev-packages/e2e-tests/test-applications/nuxt-3-top-level-import/playwright.config.ts index aa1ff8e9743c..31f2b913b58b 100644 --- a/dev-packages/e2e-tests/test-applications/nuxt-3-top-level-import/playwright.config.ts +++ b/dev-packages/e2e-tests/test-applications/nuxt-3-top-level-import/playwright.config.ts @@ -1,19 +1,7 @@ -import { fileURLToPath } from 'node:url'; -import type { ConfigOptions } from '@nuxt/test-utils/playwright'; import { getPlaywrightConfig } from '@sentry-internal/test-utils'; -const nuxtConfigOptions: ConfigOptions = { - nuxt: { - rootDir: fileURLToPath(new URL('.', import.meta.url)), - }, -}; - -/* Make sure to import from '@nuxt/test-utils/playwright' in the tests - * Like this: import { expect, test } from '@nuxt/test-utils/playwright' */ - const config = getPlaywrightConfig({ startCommand: `pnpm start`, - use: { ...nuxtConfigOptions }, }); export default config; diff --git a/dev-packages/e2e-tests/test-applications/nuxt-3-top-level-import/tests/errors.client.test.ts b/dev-packages/e2e-tests/test-applications/nuxt-3-top-level-import/tests/errors.client.test.ts index 667075693223..445a62e54b2a 100644 --- a/dev-packages/e2e-tests/test-applications/nuxt-3-top-level-import/tests/errors.client.test.ts +++ b/dev-packages/e2e-tests/test-applications/nuxt-3-top-level-import/tests/errors.client.test.ts @@ -1,4 +1,4 @@ -import { expect, test } from '@nuxt/test-utils/playwright'; +import { expect, test } from '@playwright/test'; import { waitForError } from '@sentry-internal/test-utils'; test.describe('client-side errors', async () => { diff --git a/dev-packages/e2e-tests/test-applications/nuxt-3-top-level-import/tests/tracing.client.test.ts b/dev-packages/e2e-tests/test-applications/nuxt-3-top-level-import/tests/tracing.client.test.ts index 44b37a90f7a0..9945cc11da5f 100644 --- a/dev-packages/e2e-tests/test-applications/nuxt-3-top-level-import/tests/tracing.client.test.ts +++ b/dev-packages/e2e-tests/test-applications/nuxt-3-top-level-import/tests/tracing.client.test.ts @@ -1,4 +1,4 @@ -import { expect, test } from '@nuxt/test-utils/playwright'; +import { expect, test } from '@playwright/test'; import { waitForTransaction } from '@sentry-internal/test-utils'; import type { Span } from '@sentry/nuxt'; diff --git a/dev-packages/e2e-tests/test-applications/nuxt-3/playwright.config.ts b/dev-packages/e2e-tests/test-applications/nuxt-3/playwright.config.ts index 91e8ba6f60fe..e07fb02e5218 100644 --- a/dev-packages/e2e-tests/test-applications/nuxt-3/playwright.config.ts +++ b/dev-packages/e2e-tests/test-applications/nuxt-3/playwright.config.ts @@ -1,19 +1,7 @@ -import { fileURLToPath } from 'node:url'; -// import type { ConfigOptions } from '@nuxt/test-utils/playwright'; import { getPlaywrightConfig } from '@sentry-internal/test-utils'; -// const nuxtConfigOptions: ConfigOptions = { -// nuxt: { -// rootDir: fileURLToPath(new URL('.', import.meta.url)), -// }, -// }; - -/* Make sure to import from '@nuxt/test-utils/playwright' in the tests - * Like this: import { expect, test } from '@nuxt/test-utils/playwright' */ - const config = getPlaywrightConfig({ startCommand: `pnpm start:import`, - // use: { ...nuxtConfigOptions }, }); export default config; diff --git a/dev-packages/e2e-tests/test-applications/nuxt-4/package.json b/dev-packages/e2e-tests/test-applications/nuxt-4/package.json index a1cbc9164e9e..104032962c50 100644 --- a/dev-packages/e2e-tests/test-applications/nuxt-4/package.json +++ b/dev-packages/e2e-tests/test-applications/nuxt-4/package.json @@ -20,7 +20,6 @@ "nuxt": "^3.13.2" }, "devDependencies": { - "@nuxt/test-utils": "^3.14.2", "@playwright/test": "~1.50.0", "@sentry-internal/test-utils": "link:../../../test-utils" }, diff --git a/dev-packages/e2e-tests/test-applications/nuxt-4/playwright.config.ts b/dev-packages/e2e-tests/test-applications/nuxt-4/playwright.config.ts index 6cea405151bd..e07fb02e5218 100644 --- a/dev-packages/e2e-tests/test-applications/nuxt-4/playwright.config.ts +++ b/dev-packages/e2e-tests/test-applications/nuxt-4/playwright.config.ts @@ -1,19 +1,7 @@ -import { fileURLToPath } from 'node:url'; -import type { ConfigOptions } from '@nuxt/test-utils/playwright'; import { getPlaywrightConfig } from '@sentry-internal/test-utils'; -const nuxtConfigOptions: ConfigOptions = { - nuxt: { - rootDir: fileURLToPath(new URL('.', import.meta.url)), - }, -}; - -/* Make sure to import from '@nuxt/test-utils/playwright' in the tests - * Like this: import { expect, test } from '@nuxt/test-utils/playwright' */ - const config = getPlaywrightConfig({ startCommand: `pnpm start:import`, - use: { ...nuxtConfigOptions }, }); export default config;