From 21169f877c0a008bcb6fb3d63725f52e189d9e86 Mon Sep 17 00:00:00 2001 From: Onur Temizkan Date: Wed, 27 Nov 2024 19:34:33 +0000 Subject: [PATCH] Update integration tests --- .../suites/integrations/httpclient/axios/test.ts | 9 +++++++++ .../suites/integrations/httpclient/fetch/simple/test.ts | 9 +++++++++ .../integrations/httpclient/fetch/withRequest/test.ts | 9 +++++++++ .../fetch/withRequestAndBodyAndOptions/test.ts | 9 +++++++++ .../httpclient/fetch/withRequestAndOptions/test.ts | 9 +++++++++ .../suites/integrations/httpclient/xhr/test.ts | 9 +++++++++ .../browser-integration-tests/utils/generatePlugin.ts | 1 - 7 files changed, 54 insertions(+), 1 deletion(-) diff --git a/dev-packages/browser-integration-tests/suites/integrations/httpclient/axios/test.ts b/dev-packages/browser-integration-tests/suites/integrations/httpclient/axios/test.ts index 8b4267c217e6..29f564fed15c 100644 --- a/dev-packages/browser-integration-tests/suites/integrations/httpclient/axios/test.ts +++ b/dev-packages/browser-integration-tests/suites/integrations/httpclient/axios/test.ts @@ -40,6 +40,15 @@ sentryTest( type: 'http.client', handled: false, }, + stacktrace: { + frames: expect.arrayContaining([ + expect.objectContaining({ + filename: 'http://sentry-test.io/subject.bundle.js', + function: '?', + in_app: true, + }), + ]), + }, }, ], }, diff --git a/dev-packages/browser-integration-tests/suites/integrations/httpclient/fetch/simple/test.ts b/dev-packages/browser-integration-tests/suites/integrations/httpclient/fetch/simple/test.ts index d490f98426cd..ee40a6bdc054 100644 --- a/dev-packages/browser-integration-tests/suites/integrations/httpclient/fetch/simple/test.ts +++ b/dev-packages/browser-integration-tests/suites/integrations/httpclient/fetch/simple/test.ts @@ -42,6 +42,15 @@ sentryTest( type: 'http.client', handled: false, }, + stacktrace: { + frames: expect.arrayContaining([ + expect.objectContaining({ + filename: 'http://sentry-test.io/subject.bundle.js', + function: '?', + in_app: true, + }), + ]), + }, }, ], }, diff --git a/dev-packages/browser-integration-tests/suites/integrations/httpclient/fetch/withRequest/test.ts b/dev-packages/browser-integration-tests/suites/integrations/httpclient/fetch/withRequest/test.ts index 9fb6add1a2d5..7492a39e039b 100644 --- a/dev-packages/browser-integration-tests/suites/integrations/httpclient/fetch/withRequest/test.ts +++ b/dev-packages/browser-integration-tests/suites/integrations/httpclient/fetch/withRequest/test.ts @@ -38,6 +38,15 @@ sentryTest('works with a Request passed in', async ({ getLocalTestUrl, page }) = type: 'http.client', handled: false, }, + stacktrace: { + frames: expect.arrayContaining([ + expect.objectContaining({ + filename: 'http://sentry-test.io/subject.bundle.js', + function: '?', + in_app: true, + }), + ]), + }, }, ], }, diff --git a/dev-packages/browser-integration-tests/suites/integrations/httpclient/fetch/withRequestAndBodyAndOptions/test.ts b/dev-packages/browser-integration-tests/suites/integrations/httpclient/fetch/withRequestAndBodyAndOptions/test.ts index 485a52ed3fd4..4426bd05733a 100644 --- a/dev-packages/browser-integration-tests/suites/integrations/httpclient/fetch/withRequestAndBodyAndOptions/test.ts +++ b/dev-packages/browser-integration-tests/suites/integrations/httpclient/fetch/withRequestAndBodyAndOptions/test.ts @@ -40,6 +40,15 @@ sentryTest( type: 'http.client', handled: false, }, + stacktrace: { + frames: expect.arrayContaining([ + expect.objectContaining({ + filename: 'http://sentry-test.io/subject.bundle.js', + function: '?', + in_app: true, + }), + ]), + }, }, ], }, diff --git a/dev-packages/browser-integration-tests/suites/integrations/httpclient/fetch/withRequestAndOptions/test.ts b/dev-packages/browser-integration-tests/suites/integrations/httpclient/fetch/withRequestAndOptions/test.ts index d78860f7b1a6..79131aef0558 100644 --- a/dev-packages/browser-integration-tests/suites/integrations/httpclient/fetch/withRequestAndOptions/test.ts +++ b/dev-packages/browser-integration-tests/suites/integrations/httpclient/fetch/withRequestAndOptions/test.ts @@ -38,6 +38,15 @@ sentryTest('works with a Request (without body) & options passed in', async ({ g type: 'http.client', handled: false, }, + stacktrace: { + frames: expect.arrayContaining([ + expect.objectContaining({ + filename: 'http://sentry-test.io/subject.bundle.js', + function: '?', + in_app: true, + }), + ]), + }, }, ], }, diff --git a/dev-packages/browser-integration-tests/suites/integrations/httpclient/xhr/test.ts b/dev-packages/browser-integration-tests/suites/integrations/httpclient/xhr/test.ts index 9953de1c860e..5d1c10d5f9da 100644 --- a/dev-packages/browser-integration-tests/suites/integrations/httpclient/xhr/test.ts +++ b/dev-packages/browser-integration-tests/suites/integrations/httpclient/xhr/test.ts @@ -40,6 +40,15 @@ sentryTest( type: 'http.client', handled: false, }, + stacktrace: { + frames: expect.arrayContaining([ + expect.objectContaining({ + filename: 'http://sentry-test.io/subject.bundle.js', + function: '?', + in_app: true, + }), + ]), + }, }, ], }, diff --git a/dev-packages/browser-integration-tests/utils/generatePlugin.ts b/dev-packages/browser-integration-tests/utils/generatePlugin.ts index 26a086bf2a77..3b6491debd72 100644 --- a/dev-packages/browser-integration-tests/utils/generatePlugin.ts +++ b/dev-packages/browser-integration-tests/utils/generatePlugin.ts @@ -176,7 +176,6 @@ class SentryScenarioGenerationPlugin { } : {}; - // Checking if the current scenario has imported `@sentry/integrations`. compiler.hooks.normalModuleFactory.tap(this._name, factory => { factory.hooks.parser.for('javascript/auto').tap(this._name, parser => { // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access