diff --git a/dev-packages/browser-integration-tests/scripts/detectFlakyTests.ts b/dev-packages/browser-integration-tests/scripts/detectFlakyTests.ts index 2e3951d3d45b..bf653dfad6b7 100644 --- a/dev-packages/browser-integration-tests/scripts/detectFlakyTests.ts +++ b/dev-packages/browser-integration-tests/scripts/detectFlakyTests.ts @@ -100,7 +100,7 @@ ${changedPaths.join('\n')} * Returns how many time one test should run based on the chosen mode and a bunch of heuristics */ function getPerTestRunCount(testPaths: string[]) { - if (process.env.TEST_RUN_COUNT === 'AUTO' && testPaths.length > 0) { + if ((!process.env.TEST_RUN_COUNT || process.env.TEST_RUN_COUNT === 'AUTO') && testPaths.length > 0) { // Run everything up to 100x, assuming that total runtime is less than 60min. // We assume an average runtime of 3s per test, times 4 (for different browsers) = 12s per detected testPaths // We want to keep overall runtime under 30min diff --git a/dev-packages/browser-integration-tests/suites/integrations/ContextLines/inline/test.ts b/dev-packages/browser-integration-tests/suites/integrations/ContextLines/inline/test.ts index 157e4d163067..37767e81e9db 100644 --- a/dev-packages/browser-integration-tests/suites/integrations/ContextLines/inline/test.ts +++ b/dev-packages/browser-integration-tests/suites/integrations/ContextLines/inline/test.ts @@ -5,7 +5,7 @@ import { envelopeRequestParser, waitForErrorRequestOnUrl } from '../../../../uti sentryTest( 'should add source context lines around stack frames from errors in Html inline JS', - async ({ getLocalTestPath, page, browserName }) => { + async ({ getLocalTestUrl, page, browserName }) => { if (browserName === 'webkit') { // The error we're throwing in this test is thrown as "Script error." in Webkit. // We filter "Script error." out by default in `InboundFilters`. @@ -15,9 +15,10 @@ sentryTest( sentryTest.skip(); } - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); const eventReqPromise = waitForErrorRequestOnUrl(page, url); + await page.waitForFunction('window.Sentry'); const clickPromise = page.locator('#inline-error-btn').click(); diff --git a/dev-packages/browser-integration-tests/suites/integrations/ContextLines/noAddedLines/test.ts b/dev-packages/browser-integration-tests/suites/integrations/ContextLines/noAddedLines/test.ts index 522c895d7b2e..8fa8ec16cddd 100644 --- a/dev-packages/browser-integration-tests/suites/integrations/ContextLines/noAddedLines/test.ts +++ b/dev-packages/browser-integration-tests/suites/integrations/ContextLines/noAddedLines/test.ts @@ -3,8 +3,8 @@ import { expect } from '@playwright/test'; import { sentryTest } from '../../../../utils/fixtures'; import { envelopeRequestParser, waitForErrorRequestOnUrl } from '../../../../utils/helpers'; -sentryTest('should not add source context lines to errors from script files', async ({ getLocalTestPath, page }) => { - const url = await getLocalTestPath({ testDir: __dirname }); +sentryTest('should not add source context lines to errors from script files', async ({ getLocalTestUrl, page }) => { + const url = await getLocalTestUrl({ testDir: __dirname }); const eventReqPromise = waitForErrorRequestOnUrl(page, url); diff --git a/dev-packages/browser-integration-tests/suites/integrations/ContextLines/scriptTag/test.ts b/dev-packages/browser-integration-tests/suites/integrations/ContextLines/scriptTag/test.ts index 7f974b9d55c3..86c19a22ccfb 100644 --- a/dev-packages/browser-integration-tests/suites/integrations/ContextLines/scriptTag/test.ts +++ b/dev-packages/browser-integration-tests/suites/integrations/ContextLines/scriptTag/test.ts @@ -5,7 +5,7 @@ import { envelopeRequestParser, waitForErrorRequestOnUrl } from '../../../../uti sentryTest( 'should add source context lines around stack frames from errors in Html script tags', - async ({ getLocalTestPath, page, browserName }) => { + async ({ getLocalTestUrl, page, browserName }) => { if (browserName === 'webkit') { // The error we're throwing in this test is thrown as "Script error." in Webkit. // We filter "Script error." out by default in `InboundFilters`. @@ -15,9 +15,10 @@ sentryTest( sentryTest.skip(); } - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); const eventReqPromise = waitForErrorRequestOnUrl(page, url); + await page.waitForFunction('window.Sentry'); const clickPromise = page.locator('#inline-error-btn').click(); diff --git a/dev-packages/browser-integration-tests/suites/integrations/globalHandlers/fetchStackTrace/test.ts b/dev-packages/browser-integration-tests/suites/integrations/globalHandlers/fetchStackTrace/test.ts index 8d70241ec592..3d6790a36230 100644 --- a/dev-packages/browser-integration-tests/suites/integrations/globalHandlers/fetchStackTrace/test.ts +++ b/dev-packages/browser-integration-tests/suites/integrations/globalHandlers/fetchStackTrace/test.ts @@ -4,8 +4,8 @@ import type { Event } from '@sentry/types'; import { sentryTest } from '../../../../utils/fixtures'; import { getMultipleSentryEnvelopeRequests } from '../../../../utils/helpers'; -sentryTest('should create errors with stack traces for failing fetch calls', async ({ getLocalTestPath, page }) => { - const url = await getLocalTestPath({ testDir: __dirname }); +sentryTest('should create errors with stack traces for failing fetch calls', async ({ getLocalTestUrl, page }) => { + const url = await getLocalTestUrl({ testDir: __dirname }); const envelopes = await getMultipleSentryEnvelopeRequests(page, 3, { url, timeout: 10000 }); const errorEvent = envelopes.find(event => !event.type)!; diff --git a/dev-packages/browser-integration-tests/suites/integrations/httpContext/test.ts b/dev-packages/browser-integration-tests/suites/integrations/httpContext/test.ts index 02a62142e02b..f85aa63473d5 100644 --- a/dev-packages/browser-integration-tests/suites/integrations/httpContext/test.ts +++ b/dev-packages/browser-integration-tests/suites/integrations/httpContext/test.ts @@ -4,8 +4,8 @@ import type { Event } from '@sentry/types'; import { sentryTest } from '../../../utils/fixtures'; import { getFirstSentryEnvelopeRequest } from '../../../utils/helpers'; -sentryTest('httpContextIntegration captures user-agent and referrer', async ({ getLocalTestPath, page }) => { - const url = await getLocalTestPath({ testDir: __dirname }); +sentryTest('httpContextIntegration captures user-agent and referrer', async ({ getLocalTestUrl, page }) => { + const url = await getLocalTestUrl({ testDir: __dirname }); const errorEventPromise = getFirstSentryEnvelopeRequest(page); 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 6318b337c165..8b4267c217e6 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 @@ -6,8 +6,8 @@ import { getFirstSentryEnvelopeRequest } from '../../../../utils/helpers'; sentryTest( 'should assign request and response context from a failed 500 XHR request', - async ({ getLocalTestPath, page }) => { - const url = await getLocalTestPath({ testDir: __dirname }); + async ({ getLocalTestUrl, page }) => { + const url = await getLocalTestUrl({ testDir: __dirname }); await page.route('**/foo', route => { return route.fulfill({ 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 6cf8d7c7187f..d490f98426cd 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 @@ -8,8 +8,8 @@ import { getFirstSentryEnvelopeRequest } from '../../../../../utils/helpers'; // https://github.com/microsoft/playwright/issues/10376 sentryTest( 'should assign request and response context from a failed 500 fetch request', - async ({ getLocalTestPath, page }) => { - const url = await getLocalTestPath({ testDir: __dirname }); + async ({ getLocalTestUrl, page }) => { + const url = await getLocalTestUrl({ testDir: __dirname }); await page.route('**/foo', route => { return route.fulfill({ diff --git a/dev-packages/browser-integration-tests/suites/integrations/httpclient/fetch/withAbortController/test.ts b/dev-packages/browser-integration-tests/suites/integrations/httpclient/fetch/withAbortController/test.ts index 6cc3a0cd32a9..0bf34e61b95a 100644 --- a/dev-packages/browser-integration-tests/suites/integrations/httpclient/fetch/withAbortController/test.ts +++ b/dev-packages/browser-integration-tests/suites/integrations/httpclient/fetch/withAbortController/test.ts @@ -3,12 +3,12 @@ import type { Event as SentryEvent } from '@sentry/types'; import { sentryTest } from '../../../../../utils/fixtures'; import { getFirstSentryEnvelopeRequest, shouldSkipTracingTest } from '../../../../../utils/helpers'; -sentryTest('should handle aborted fetch calls', async ({ getLocalTestPath, page }) => { +sentryTest('should handle aborted fetch calls', async ({ getLocalTestUrl, page }) => { if (shouldSkipTracingTest()) { sentryTest.skip(); } - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); await page.route('**/foo', async () => { // never fulfil this route because we abort the request as part of the test 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 e2dcd308417a..9fb6add1a2d5 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 @@ -4,8 +4,8 @@ import type { Event } from '@sentry/types'; import { sentryTest } from '../../../../../utils/fixtures'; import { getFirstSentryEnvelopeRequest } from '../../../../../utils/helpers'; -sentryTest('works with a Request passed in', async ({ getLocalTestPath, page }) => { - const url = await getLocalTestPath({ testDir: __dirname }); +sentryTest('works with a Request passed in', async ({ getLocalTestUrl, page }) => { + const url = await getLocalTestUrl({ testDir: __dirname }); await page.route('**/foo', route => { return route.fulfill({ 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 98519cd32129..485a52ed3fd4 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 @@ -6,8 +6,8 @@ import { getFirstSentryEnvelopeRequest } from '../../../../../utils/helpers'; sentryTest( 'works with a Request (with body) & options passed in - handling used body', - async ({ getLocalTestPath, page }) => { - const url = await getLocalTestPath({ testDir: __dirname }); + async ({ getLocalTestUrl, page }) => { + const url = await getLocalTestUrl({ testDir: __dirname }); await page.route('**/foo', route => { return route.fulfill({ 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 4d3fe8458bac..d78860f7b1a6 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 @@ -4,8 +4,8 @@ import type { Event } from '@sentry/types'; import { sentryTest } from '../../../../../utils/fixtures'; import { getFirstSentryEnvelopeRequest } from '../../../../../utils/helpers'; -sentryTest('works with a Request (without body) & options passed in', async ({ getLocalTestPath, page }) => { - const url = await getLocalTestPath({ testDir: __dirname }); +sentryTest('works with a Request (without body) & options passed in', async ({ getLocalTestUrl, page }) => { + const url = await getLocalTestUrl({ testDir: __dirname }); await page.route('**/foo', route => { return route.fulfill({ 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 6595fc0a7399..9953de1c860e 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 @@ -6,8 +6,8 @@ import { getFirstSentryEnvelopeRequest } from '../../../../utils/helpers'; sentryTest( 'should assign request and response context from a failed 500 XHR request', - async ({ getLocalTestPath, page }) => { - const url = await getLocalTestPath({ testDir: __dirname }); + async ({ getLocalTestUrl, page }) => { + const url = await getLocalTestUrl({ testDir: __dirname }); await page.route('**/foo', route => { return route.fulfill({ diff --git a/dev-packages/browser-integration-tests/suites/integrations/moduleMetadata/appliesMetadata/test.ts b/dev-packages/browser-integration-tests/suites/integrations/moduleMetadata/appliesMetadata/test.ts index d6414e154a23..8e9401e67be1 100644 --- a/dev-packages/browser-integration-tests/suites/integrations/moduleMetadata/appliesMetadata/test.ts +++ b/dev-packages/browser-integration-tests/suites/integrations/moduleMetadata/appliesMetadata/test.ts @@ -4,13 +4,13 @@ import type { Event } from '@sentry/types'; import { sentryTest } from '../../../../utils/fixtures'; import { getFirstSentryEnvelopeRequest } from '../../../../utils/helpers'; -sentryTest('should provide module_metadata on stack frames in beforeSend', async ({ getLocalTestPath, page }) => { +sentryTest('should provide module_metadata on stack frames in beforeSend', async ({ getLocalTestUrl, page }) => { // moduleMetadataIntegration is not included in any CDN bundles if (process.env.PW_BUNDLE?.startsWith('bundle')) { sentryTest.skip(); } - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); const errorEvent = await getFirstSentryEnvelopeRequest(page, url); expect(errorEvent.extra?.['module_metadata_entries']).toEqual([{ foo: 'bar' }]); diff --git a/dev-packages/browser-integration-tests/suites/integrations/moduleMetadata/appliesMetadataWithRewriteFrames/test.ts b/dev-packages/browser-integration-tests/suites/integrations/moduleMetadata/appliesMetadataWithRewriteFrames/test.ts index 6996ef1ded6d..04e8f24adfaf 100644 --- a/dev-packages/browser-integration-tests/suites/integrations/moduleMetadata/appliesMetadataWithRewriteFrames/test.ts +++ b/dev-packages/browser-integration-tests/suites/integrations/moduleMetadata/appliesMetadataWithRewriteFrames/test.ts @@ -6,13 +6,13 @@ import { getFirstSentryEnvelopeRequest } from '../../../../utils/helpers'; sentryTest( 'should provide module_metadata on stack frames in beforeSend even though an event processor (rewriteFramesIntegration) modified the filename', - async ({ getLocalTestPath, page }) => { + async ({ getLocalTestUrl, page }) => { // moduleMetadataIntegration is not included in any CDN bundles if (process.env.PW_BUNDLE?.startsWith('bundle')) { sentryTest.skip(); } - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); const errorEvent = await getFirstSentryEnvelopeRequest(page, url); expect(errorEvent?.extra?.['module_metadata_entries']).toEqual([{ foo: 'baz' }]); diff --git a/dev-packages/browser-integration-tests/suites/metrics/metricsShim/test.ts b/dev-packages/browser-integration-tests/suites/metrics/metricsShim/test.ts index d95633393eda..e8d0dbcfb274 100644 --- a/dev-packages/browser-integration-tests/suites/metrics/metricsShim/test.ts +++ b/dev-packages/browser-integration-tests/suites/metrics/metricsShim/test.ts @@ -3,7 +3,7 @@ import { expect } from '@playwright/test'; import { sentryTest } from '../../../utils/fixtures'; import { shouldSkipMetricsTest } from '../../../utils/helpers'; -sentryTest('exports shim metrics integration for non-tracing bundles', async ({ getLocalTestPath, page }) => { +sentryTest('exports shim metrics integration for non-tracing bundles', async ({ getLocalTestUrl, page }) => { // Skip in tracing tests if (!shouldSkipMetricsTest()) { sentryTest.skip(); @@ -22,7 +22,7 @@ sentryTest('exports shim metrics integration for non-tracing bundles', async ({ }); }); - const url = await getLocalTestPath({ testDir: __dirname, skipDsnRouteHandler: true }); + const url = await getLocalTestUrl({ testDir: __dirname, skipDsnRouteHandler: true }); await page.goto(url); diff --git a/dev-packages/browser-integration-tests/suites/public-api/addBreadcrumb/empty_obj/test.ts b/dev-packages/browser-integration-tests/suites/public-api/addBreadcrumb/empty_obj/test.ts index 47435f3d57be..32f3e0758de2 100644 --- a/dev-packages/browser-integration-tests/suites/public-api/addBreadcrumb/empty_obj/test.ts +++ b/dev-packages/browser-integration-tests/suites/public-api/addBreadcrumb/empty_obj/test.ts @@ -6,8 +6,8 @@ import { getFirstSentryEnvelopeRequest } from '../../../../utils/helpers'; sentryTest( 'should add an empty breadcrumb initialized with a timestamp, when an empty object is given', - async ({ getLocalTestPath, page }) => { - const url = await getLocalTestPath({ testDir: __dirname }); + async ({ getLocalTestUrl, page }) => { + const url = await getLocalTestUrl({ testDir: __dirname }); const eventData = await getFirstSentryEnvelopeRequest(page, url); diff --git a/dev-packages/browser-integration-tests/suites/public-api/addBreadcrumb/multiple_breadcrumbs/test.ts b/dev-packages/browser-integration-tests/suites/public-api/addBreadcrumb/multiple_breadcrumbs/test.ts index bbaafa997fda..43fd59b5b1dc 100644 --- a/dev-packages/browser-integration-tests/suites/public-api/addBreadcrumb/multiple_breadcrumbs/test.ts +++ b/dev-packages/browser-integration-tests/suites/public-api/addBreadcrumb/multiple_breadcrumbs/test.ts @@ -4,8 +4,8 @@ import type { Event } from '@sentry/types'; import { sentryTest } from '../../../../utils/fixtures'; import { getFirstSentryEnvelopeRequest } from '../../../../utils/helpers'; -sentryTest('should add multiple breadcrumbs', async ({ getLocalTestPath, page }) => { - const url = await getLocalTestPath({ testDir: __dirname }); +sentryTest('should add multiple breadcrumbs', async ({ getLocalTestUrl, page }) => { + const url = await getLocalTestUrl({ testDir: __dirname }); const eventData = await getFirstSentryEnvelopeRequest(page, url); diff --git a/dev-packages/browser-integration-tests/suites/public-api/addBreadcrumb/simple_breadcrumb/test.ts b/dev-packages/browser-integration-tests/suites/public-api/addBreadcrumb/simple_breadcrumb/test.ts index d6a24b8cc167..3eba0e1ecc48 100644 --- a/dev-packages/browser-integration-tests/suites/public-api/addBreadcrumb/simple_breadcrumb/test.ts +++ b/dev-packages/browser-integration-tests/suites/public-api/addBreadcrumb/simple_breadcrumb/test.ts @@ -4,8 +4,8 @@ import type { Event } from '@sentry/types'; import { sentryTest } from '../../../../utils/fixtures'; import { getFirstSentryEnvelopeRequest } from '../../../../utils/helpers'; -sentryTest('should add a simple breadcrumb', async ({ getLocalTestPath, page }) => { - const url = await getLocalTestPath({ testDir: __dirname }); +sentryTest('should add a simple breadcrumb', async ({ getLocalTestUrl, page }) => { + const url = await getLocalTestUrl({ testDir: __dirname }); const eventData = await getFirstSentryEnvelopeRequest(page, url); diff --git a/dev-packages/browser-integration-tests/suites/public-api/addBreadcrumb/undefined_arg/test.ts b/dev-packages/browser-integration-tests/suites/public-api/addBreadcrumb/undefined_arg/test.ts index ec04b9027783..3837262b69a9 100644 --- a/dev-packages/browser-integration-tests/suites/public-api/addBreadcrumb/undefined_arg/test.ts +++ b/dev-packages/browser-integration-tests/suites/public-api/addBreadcrumb/undefined_arg/test.ts @@ -6,8 +6,8 @@ import { getFirstSentryEnvelopeRequest } from '../../../../utils/helpers'; sentryTest( 'should add an empty breadcrumb initialized with a timestamp, when no argument is given', - async ({ getLocalTestPath, page }) => { - const url = await getLocalTestPath({ testDir: __dirname }); + async ({ getLocalTestUrl, page }) => { + const url = await getLocalTestUrl({ testDir: __dirname }); const eventData = await getFirstSentryEnvelopeRequest(page, url); diff --git a/dev-packages/browser-integration-tests/suites/public-api/captureException/classInstance/test.ts b/dev-packages/browser-integration-tests/suites/public-api/captureException/classInstance/test.ts index 3a8865ec3672..0c0a35859dd0 100644 --- a/dev-packages/browser-integration-tests/suites/public-api/captureException/classInstance/test.ts +++ b/dev-packages/browser-integration-tests/suites/public-api/captureException/classInstance/test.ts @@ -4,8 +4,8 @@ import type { Event } from '@sentry/types'; import { sentryTest } from '../../../../utils/fixtures'; import { getFirstSentryEnvelopeRequest } from '../../../../utils/helpers'; -sentryTest('should capture an POJO', async ({ getLocalTestPath, page }) => { - const url = await getLocalTestPath({ testDir: __dirname }); +sentryTest('should capture an POJO', async ({ getLocalTestUrl, page }) => { + const url = await getLocalTestUrl({ testDir: __dirname }); const eventData = await getFirstSentryEnvelopeRequest(page, url); diff --git a/dev-packages/browser-integration-tests/suites/public-api/captureException/emptyObj/test.ts b/dev-packages/browser-integration-tests/suites/public-api/captureException/emptyObj/test.ts index fa6b1dcb1562..712f599f30d5 100644 --- a/dev-packages/browser-integration-tests/suites/public-api/captureException/emptyObj/test.ts +++ b/dev-packages/browser-integration-tests/suites/public-api/captureException/emptyObj/test.ts @@ -4,8 +4,8 @@ import type { Event } from '@sentry/types'; import { sentryTest } from '../../../../utils/fixtures'; import { getFirstSentryEnvelopeRequest } from '../../../../utils/helpers'; -sentryTest('should capture an empty object', async ({ getLocalTestPath, page }) => { - const url = await getLocalTestPath({ testDir: __dirname }); +sentryTest('should capture an empty object', async ({ getLocalTestUrl, page }) => { + const url = await getLocalTestUrl({ testDir: __dirname }); const eventData = await getFirstSentryEnvelopeRequest(page, url); diff --git a/dev-packages/browser-integration-tests/suites/public-api/captureException/event/test.ts b/dev-packages/browser-integration-tests/suites/public-api/captureException/event/test.ts index 65c46a776731..d212a027ec53 100644 --- a/dev-packages/browser-integration-tests/suites/public-api/captureException/event/test.ts +++ b/dev-packages/browser-integration-tests/suites/public-api/captureException/event/test.ts @@ -4,8 +4,8 @@ import type { Event } from '@sentry/types'; import { sentryTest } from '../../../../utils/fixtures'; import { getFirstSentryEnvelopeRequest } from '../../../../utils/helpers'; -sentryTest('should capture an Event', async ({ getLocalTestPath, page }) => { - const url = await getLocalTestPath({ testDir: __dirname }); +sentryTest('should capture an Event', async ({ getLocalTestUrl, page }) => { + const url = await getLocalTestUrl({ testDir: __dirname }); const eventData = await getFirstSentryEnvelopeRequest(page, url); diff --git a/dev-packages/browser-integration-tests/suites/public-api/captureException/eventBreadcrumbs/test.ts b/dev-packages/browser-integration-tests/suites/public-api/captureException/eventBreadcrumbs/test.ts index 831c255cb8f8..4dc6bd0c7311 100644 --- a/dev-packages/browser-integration-tests/suites/public-api/captureException/eventBreadcrumbs/test.ts +++ b/dev-packages/browser-integration-tests/suites/public-api/captureException/eventBreadcrumbs/test.ts @@ -6,8 +6,8 @@ import { getMultipleSentryEnvelopeRequests } from '../../../../utils/helpers'; sentryTest( 'should capture recorded transactions as breadcrumbs for the following event sent', - async ({ getLocalTestPath, page }) => { - const url = await getLocalTestPath({ testDir: __dirname }); + async ({ getLocalTestUrl, page }) => { + const url = await getLocalTestUrl({ testDir: __dirname }); const events = await getMultipleSentryEnvelopeRequests(page, 2, { url }); diff --git a/dev-packages/browser-integration-tests/suites/public-api/captureException/linkedErrors/test.ts b/dev-packages/browser-integration-tests/suites/public-api/captureException/linkedErrors/test.ts index b78ae5e12525..9136f11ceae0 100644 --- a/dev-packages/browser-integration-tests/suites/public-api/captureException/linkedErrors/test.ts +++ b/dev-packages/browser-integration-tests/suites/public-api/captureException/linkedErrors/test.ts @@ -4,8 +4,8 @@ import type { Event } from '@sentry/types'; import { sentryTest } from '../../../../utils/fixtures'; import { getFirstSentryEnvelopeRequest } from '../../../../utils/helpers'; -sentryTest('should capture a linked error with messages', async ({ getLocalTestPath, page }) => { - const url = await getLocalTestPath({ testDir: __dirname }); +sentryTest('should capture a linked error with messages', async ({ getLocalTestUrl, page }) => { + const url = await getLocalTestUrl({ testDir: __dirname }); const eventData = await getFirstSentryEnvelopeRequest(page, url); diff --git a/dev-packages/browser-integration-tests/suites/public-api/captureException/multipleErrorsDifferentStacktrace/test.ts b/dev-packages/browser-integration-tests/suites/public-api/captureException/multipleErrorsDifferentStacktrace/test.ts index 277c518d58f0..103c0c1d1dc5 100644 --- a/dev-packages/browser-integration-tests/suites/public-api/captureException/multipleErrorsDifferentStacktrace/test.ts +++ b/dev-packages/browser-integration-tests/suites/public-api/captureException/multipleErrorsDifferentStacktrace/test.ts @@ -4,8 +4,8 @@ import type { Event } from '@sentry/types'; import { sentryTest } from '../../../../utils/fixtures'; import { getMultipleSentryEnvelopeRequests } from '../../../../utils/helpers'; -sentryTest('should not reject back-to-back errors with different stack traces', async ({ getLocalTestPath, page }) => { - const url = await getLocalTestPath({ testDir: __dirname }); +sentryTest('should not reject back-to-back errors with different stack traces', async ({ getLocalTestUrl, page }) => { + const url = await getLocalTestUrl({ testDir: __dirname }); const eventData = await getMultipleSentryEnvelopeRequests(page, 3, { url }); diff --git a/dev-packages/browser-integration-tests/suites/public-api/captureException/multipleErrorsSameStacktrace/test.ts b/dev-packages/browser-integration-tests/suites/public-api/captureException/multipleErrorsSameStacktrace/test.ts index acd7e12ed351..7ef825b0b147 100644 --- a/dev-packages/browser-integration-tests/suites/public-api/captureException/multipleErrorsSameStacktrace/test.ts +++ b/dev-packages/browser-integration-tests/suites/public-api/captureException/multipleErrorsSameStacktrace/test.ts @@ -4,8 +4,8 @@ import type { Event } from '@sentry/types'; import { sentryTest } from '../../../../utils/fixtures'; import { getMultipleSentryEnvelopeRequests } from '../../../../utils/helpers'; -sentryTest('should reject duplicate, back-to-back errors from captureException', async ({ getLocalTestPath, page }) => { - const url = await getLocalTestPath({ testDir: __dirname }); +sentryTest('should reject duplicate, back-to-back errors from captureException', async ({ getLocalTestUrl, page }) => { + const url = await getLocalTestUrl({ testDir: __dirname }); const eventData = await getMultipleSentryEnvelopeRequests(page, 7, { url }); diff --git a/dev-packages/browser-integration-tests/suites/public-api/captureException/plainObject/test.ts b/dev-packages/browser-integration-tests/suites/public-api/captureException/plainObject/test.ts index e81fe0125906..1f31b1738bb4 100644 --- a/dev-packages/browser-integration-tests/suites/public-api/captureException/plainObject/test.ts +++ b/dev-packages/browser-integration-tests/suites/public-api/captureException/plainObject/test.ts @@ -4,8 +4,8 @@ import type { Event } from '@sentry/types'; import { sentryTest } from '../../../../utils/fixtures'; import { getFirstSentryEnvelopeRequest } from '../../../../utils/helpers'; -sentryTest('should capture an class instance', async ({ getLocalTestPath, page }) => { - const url = await getLocalTestPath({ testDir: __dirname }); +sentryTest('should capture an class instance', async ({ getLocalTestUrl, page }) => { + const url = await getLocalTestUrl({ testDir: __dirname }); const eventData = await getFirstSentryEnvelopeRequest(page, url); diff --git a/dev-packages/browser-integration-tests/suites/public-api/captureException/transactionBreadcrumbs/test.ts b/dev-packages/browser-integration-tests/suites/public-api/captureException/transactionBreadcrumbs/test.ts index c69437183591..4383d92a6f73 100644 --- a/dev-packages/browser-integration-tests/suites/public-api/captureException/transactionBreadcrumbs/test.ts +++ b/dev-packages/browser-integration-tests/suites/public-api/captureException/transactionBreadcrumbs/test.ts @@ -6,8 +6,8 @@ import { getMultipleSentryEnvelopeRequests } from '../../../../utils/helpers'; sentryTest( 'should capture recorded transactions as breadcrumbs for the following event sent', - async ({ getLocalTestPath, page }) => { - const url = await getLocalTestPath({ testDir: __dirname }); + async ({ getLocalTestUrl, page }) => { + const url = await getLocalTestUrl({ testDir: __dirname }); const events = await getMultipleSentryEnvelopeRequests(page, 2, { url }); diff --git a/dev-packages/browser-integration-tests/suites/public-api/captureException/undefinedArg/test.ts b/dev-packages/browser-integration-tests/suites/public-api/captureException/undefinedArg/test.ts index 5bf560e93707..a7e8dfc93116 100644 --- a/dev-packages/browser-integration-tests/suites/public-api/captureException/undefinedArg/test.ts +++ b/dev-packages/browser-integration-tests/suites/public-api/captureException/undefinedArg/test.ts @@ -4,8 +4,8 @@ import type { Event } from '@sentry/types'; import { sentryTest } from '../../../../utils/fixtures'; import { getFirstSentryEnvelopeRequest } from '../../../../utils/helpers'; -sentryTest('should capture an undefined error when no arguments are provided', async ({ getLocalTestPath, page }) => { - const url = await getLocalTestPath({ testDir: __dirname }); +sentryTest('should capture an undefined error when no arguments are provided', async ({ getLocalTestUrl, page }) => { + const url = await getLocalTestUrl({ testDir: __dirname }); const eventData = await getFirstSentryEnvelopeRequest(page, url); diff --git a/dev-packages/browser-integration-tests/suites/public-api/captureMessage/multipleMessageAttachStacktrace/test.ts b/dev-packages/browser-integration-tests/suites/public-api/captureMessage/multipleMessageAttachStacktrace/test.ts index 01845d983feb..a16afd870fd9 100644 --- a/dev-packages/browser-integration-tests/suites/public-api/captureMessage/multipleMessageAttachStacktrace/test.ts +++ b/dev-packages/browser-integration-tests/suites/public-api/captureMessage/multipleMessageAttachStacktrace/test.ts @@ -6,8 +6,8 @@ import { getMultipleSentryEnvelopeRequests } from '../../../../utils/helpers'; sentryTest( 'should reject duplicate, back-to-back messages from captureMessage when it has stacktrace', - async ({ getLocalTestPath, page }) => { - const url = await getLocalTestPath({ testDir: __dirname }); + async ({ getLocalTestUrl, page }) => { + const url = await getLocalTestUrl({ testDir: __dirname }); const eventData = await getMultipleSentryEnvelopeRequests(page, 5, { url }); diff --git a/dev-packages/browser-integration-tests/suites/public-api/captureMessage/parameterized_message/test.ts b/dev-packages/browser-integration-tests/suites/public-api/captureMessage/parameterized_message/test.ts index db84460b85b5..c507f8a7d8c6 100644 --- a/dev-packages/browser-integration-tests/suites/public-api/captureMessage/parameterized_message/test.ts +++ b/dev-packages/browser-integration-tests/suites/public-api/captureMessage/parameterized_message/test.ts @@ -4,8 +4,8 @@ import type { Event } from '@sentry/types'; import { sentryTest } from '../../../../utils/fixtures'; import { getFirstSentryEnvelopeRequest } from '../../../../utils/helpers'; -sentryTest('should capture a parameterized representation of the message', async ({ getLocalTestPath, page }) => { - const url = await getLocalTestPath({ testDir: __dirname }); +sentryTest('should capture a parameterized representation of the message', async ({ getLocalTestUrl, page }) => { + const url = await getLocalTestUrl({ testDir: __dirname }); const eventData = await getFirstSentryEnvelopeRequest(page, url); diff --git a/dev-packages/browser-integration-tests/suites/public-api/captureMessage/simple_message/test.ts b/dev-packages/browser-integration-tests/suites/public-api/captureMessage/simple_message/test.ts index 60cc4a19f089..50df0b1c38df 100644 --- a/dev-packages/browser-integration-tests/suites/public-api/captureMessage/simple_message/test.ts +++ b/dev-packages/browser-integration-tests/suites/public-api/captureMessage/simple_message/test.ts @@ -4,8 +4,8 @@ import type { Event } from '@sentry/types'; import { sentryTest } from '../../../../utils/fixtures'; import { getFirstSentryEnvelopeRequest } from '../../../../utils/helpers'; -sentryTest('should capture a simple message string', async ({ getLocalTestPath, page }) => { - const url = await getLocalTestPath({ testDir: __dirname }); +sentryTest('should capture a simple message string', async ({ getLocalTestUrl, page }) => { + const url = await getLocalTestUrl({ testDir: __dirname }); const eventData = await getFirstSentryEnvelopeRequest(page, url); diff --git a/dev-packages/browser-integration-tests/suites/public-api/captureMessage/with_level/test.ts b/dev-packages/browser-integration-tests/suites/public-api/captureMessage/with_level/test.ts index 1422ed64bf31..96b3a98276df 100644 --- a/dev-packages/browser-integration-tests/suites/public-api/captureMessage/with_level/test.ts +++ b/dev-packages/browser-integration-tests/suites/public-api/captureMessage/with_level/test.ts @@ -4,8 +4,8 @@ import type { Event } from '@sentry/types'; import { sentryTest } from '../../../../utils/fixtures'; import { getMultipleSentryEnvelopeRequests } from '../../../../utils/helpers'; -sentryTest('should capture with different severity levels', async ({ getLocalTestPath, page }) => { - const url = await getLocalTestPath({ testDir: __dirname }); +sentryTest('should capture with different severity levels', async ({ getLocalTestUrl, page }) => { + const url = await getLocalTestUrl({ testDir: __dirname }); const events = await getMultipleSentryEnvelopeRequests(page, 6, { url }); diff --git a/dev-packages/browser-integration-tests/suites/public-api/captureUserFeedback/simple_feedback/test.ts b/dev-packages/browser-integration-tests/suites/public-api/captureUserFeedback/simple_feedback/test.ts index 158fb60d3d93..6c3ffdbc969f 100644 --- a/dev-packages/browser-integration-tests/suites/public-api/captureUserFeedback/simple_feedback/test.ts +++ b/dev-packages/browser-integration-tests/suites/public-api/captureUserFeedback/simple_feedback/test.ts @@ -4,8 +4,8 @@ import type { UserFeedback } from '@sentry/types'; import { sentryTest } from '../../../../utils/fixtures'; import { getFirstSentryEnvelopeRequest } from '../../../../utils/helpers'; -sentryTest('should capture simple user feedback', async ({ getLocalTestPath, page }) => { - const url = await getLocalTestPath({ testDir: __dirname }); +sentryTest('should capture simple user feedback', async ({ getLocalTestUrl, page }) => { + const url = await getLocalTestUrl({ testDir: __dirname }); const eventData = await getFirstSentryEnvelopeRequest(page, url); diff --git a/dev-packages/browser-integration-tests/suites/public-api/captureUserFeedback/withCaptureException/test.ts b/dev-packages/browser-integration-tests/suites/public-api/captureUserFeedback/withCaptureException/test.ts index d81b2c7a3db1..800489456525 100644 --- a/dev-packages/browser-integration-tests/suites/public-api/captureUserFeedback/withCaptureException/test.ts +++ b/dev-packages/browser-integration-tests/suites/public-api/captureUserFeedback/withCaptureException/test.ts @@ -4,8 +4,8 @@ import type { Event, UserFeedback } from '@sentry/types'; import { sentryTest } from '../../../../utils/fixtures'; import { getMultipleSentryEnvelopeRequests } from '../../../../utils/helpers'; -sentryTest('capture user feedback when captureException is called', async ({ getLocalTestPath, page }) => { - const url = await getLocalTestPath({ testDir: __dirname }); +sentryTest('capture user feedback when captureException is called', async ({ getLocalTestUrl, page }) => { + const url = await getLocalTestUrl({ testDir: __dirname }); const data = (await getMultipleSentryEnvelopeRequests(page, 2, { url })) as (Event | UserFeedback)[]; diff --git a/dev-packages/browser-integration-tests/suites/public-api/captureUserFeedback/withCaptureMessage/test.ts b/dev-packages/browser-integration-tests/suites/public-api/captureUserFeedback/withCaptureMessage/test.ts index 808279e2035f..7b0b5ad2f2ed 100644 --- a/dev-packages/browser-integration-tests/suites/public-api/captureUserFeedback/withCaptureMessage/test.ts +++ b/dev-packages/browser-integration-tests/suites/public-api/captureUserFeedback/withCaptureMessage/test.ts @@ -4,8 +4,8 @@ import type { Event, UserFeedback } from '@sentry/types'; import { sentryTest } from '../../../../utils/fixtures'; import { getMultipleSentryEnvelopeRequests } from '../../../../utils/helpers'; -sentryTest('capture user feedback when captureMessage is called', async ({ getLocalTestPath, page }) => { - const url = await getLocalTestPath({ testDir: __dirname }); +sentryTest('capture user feedback when captureMessage is called', async ({ getLocalTestUrl, page }) => { + const url = await getLocalTestUrl({ testDir: __dirname }); const data = (await getMultipleSentryEnvelopeRequests(page, 2, { url })) as (Event | UserFeedback)[]; diff --git a/dev-packages/browser-integration-tests/suites/public-api/denyUrls/test.ts b/dev-packages/browser-integration-tests/suites/public-api/denyUrls/test.ts index c374e8ae766c..c562b0fb9c09 100644 --- a/dev-packages/browser-integration-tests/suites/public-api/denyUrls/test.ts +++ b/dev-packages/browser-integration-tests/suites/public-api/denyUrls/test.ts @@ -4,8 +4,8 @@ import type { Event } from '@sentry/types'; import { sentryTest } from '../../../utils/fixtures'; import { getFirstSentryEnvelopeRequest } from '../../../utils/helpers'; -sentryTest('should allow to ignore specific urls', async ({ getLocalTestPath, page }) => { - const url = await getLocalTestPath({ testDir: __dirname }); +sentryTest('should allow to ignore specific urls', async ({ getLocalTestUrl, page }) => { + const url = await getLocalTestUrl({ testDir: __dirname }); const eventData = await getFirstSentryEnvelopeRequest(page, url); diff --git a/dev-packages/browser-integration-tests/suites/public-api/ignoreErrors/test.ts b/dev-packages/browser-integration-tests/suites/public-api/ignoreErrors/test.ts index 35752ae39232..809e47e66a8b 100644 --- a/dev-packages/browser-integration-tests/suites/public-api/ignoreErrors/test.ts +++ b/dev-packages/browser-integration-tests/suites/public-api/ignoreErrors/test.ts @@ -4,8 +4,8 @@ import type { Event } from '@sentry/types'; import { sentryTest } from '../../../utils/fixtures'; import { getMultipleSentryEnvelopeRequests } from '../../../utils/helpers'; -sentryTest('should allow to ignore specific errors', async ({ getLocalTestPath, page }) => { - const url = await getLocalTestPath({ testDir: __dirname }); +sentryTest('should allow to ignore specific errors', async ({ getLocalTestUrl, page }) => { + const url = await getLocalTestUrl({ testDir: __dirname }); const events = await getMultipleSentryEnvelopeRequests(page, 2, { url }); diff --git a/dev-packages/browser-integration-tests/suites/public-api/init/console/test.ts b/dev-packages/browser-integration-tests/suites/public-api/init/console/test.ts index 5fc32e430caf..c581f3945f4d 100644 --- a/dev-packages/browser-integration-tests/suites/public-api/init/console/test.ts +++ b/dev-packages/browser-integration-tests/suites/public-api/init/console/test.ts @@ -5,8 +5,8 @@ import { expect } from '@playwright/test'; import { sentryTest } from '../../../../utils/fixtures'; // Regression test against https://github.com/getsentry/sentry-javascript/issues/4558 -sentryTest('should not change console output', async ({ getLocalTestPath, page }) => { - const url = await getLocalTestPath({ testDir: __dirname }); +sentryTest('should not change console output', async ({ getLocalTestUrl, page }) => { + const url = await getLocalTestUrl({ testDir: __dirname }); // https://playwright.dev/docs/api/class-page#page-event-console page.on('console', (msg: ConsoleMessage) => { diff --git a/dev-packages/browser-integration-tests/suites/public-api/instrumentation/eventListener/instrumentation-behaviour/test.ts b/dev-packages/browser-integration-tests/suites/public-api/instrumentation/eventListener/instrumentation-behaviour/test.ts index 557211e5b668..2126ba3c3d35 100644 --- a/dev-packages/browser-integration-tests/suites/public-api/instrumentation/eventListener/instrumentation-behaviour/test.ts +++ b/dev-packages/browser-integration-tests/suites/public-api/instrumentation/eventListener/instrumentation-behaviour/test.ts @@ -4,8 +4,8 @@ import { sentryTest } from '../../../../../utils/fixtures'; sentryTest( 'Event listener instrumentation should attach the same event listener only once', - async ({ getLocalTestPath, page }) => { - const url = await getLocalTestPath({ testDir: __dirname }); + async ({ getLocalTestUrl, page }) => { + const url = await getLocalTestUrl({ testDir: __dirname }); await page.goto(url); let functionListenerCalls = 0; diff --git a/dev-packages/browser-integration-tests/suites/public-api/instrumentation/eventListener/named-function/test.ts b/dev-packages/browser-integration-tests/suites/public-api/instrumentation/eventListener/named-function/test.ts index a61e582254ee..9ab0c5030bab 100644 --- a/dev-packages/browser-integration-tests/suites/public-api/instrumentation/eventListener/named-function/test.ts +++ b/dev-packages/browser-integration-tests/suites/public-api/instrumentation/eventListener/named-function/test.ts @@ -4,8 +4,8 @@ import type { Event } from '@sentry/types'; import { sentryTest } from '../../../../../utils/fixtures'; import { getFirstSentryEnvelopeRequest } from '../../../../../utils/helpers'; -sentryTest('should capture built-in handlers fn name in mechanism data', async ({ getLocalTestPath, page }) => { - const url = await getLocalTestPath({ testDir: __dirname }); +sentryTest('should capture built-in handlers fn name in mechanism data', async ({ getLocalTestUrl, page }) => { + const url = await getLocalTestUrl({ testDir: __dirname }); const eventData = await getFirstSentryEnvelopeRequest(page, url); diff --git a/dev-packages/browser-integration-tests/suites/public-api/instrumentation/eventListener/original-callback/test.ts b/dev-packages/browser-integration-tests/suites/public-api/instrumentation/eventListener/original-callback/test.ts index 82866a35105a..964ed6c575f9 100644 --- a/dev-packages/browser-integration-tests/suites/public-api/instrumentation/eventListener/original-callback/test.ts +++ b/dev-packages/browser-integration-tests/suites/public-api/instrumentation/eventListener/original-callback/test.ts @@ -4,8 +4,8 @@ import { sentryTest } from '../../../../../utils/fixtures'; sentryTest( 'should remove the original callback if it was registered before Sentry initialized (w. original method)', - async ({ getLocalTestPath, page }) => { - const url = await getLocalTestPath({ testDir: __dirname }); + async ({ getLocalTestUrl, page }) => { + const url = await getLocalTestUrl({ testDir: __dirname }); await page.goto(url); diff --git a/dev-packages/browser-integration-tests/suites/public-api/instrumentation/eventListener/remove/test.ts b/dev-packages/browser-integration-tests/suites/public-api/instrumentation/eventListener/remove/test.ts index 8451472568a8..d8047a044646 100644 --- a/dev-packages/browser-integration-tests/suites/public-api/instrumentation/eventListener/remove/test.ts +++ b/dev-packages/browser-integration-tests/suites/public-api/instrumentation/eventListener/remove/test.ts @@ -4,8 +4,8 @@ import type { Event } from '@sentry/types'; import { sentryTest } from '../../../../../utils/fixtures'; import { getFirstSentryEnvelopeRequest } from '../../../../../utils/helpers'; -sentryTest('should transparently remove event listeners from wrapped functions', async ({ getLocalTestPath, page }) => { - const url = await getLocalTestPath({ testDir: __dirname }); +sentryTest('should transparently remove event listeners from wrapped functions', async ({ getLocalTestUrl, page }) => { + const url = await getLocalTestUrl({ testDir: __dirname }); const eventData = await getFirstSentryEnvelopeRequest(page, url); diff --git a/dev-packages/browser-integration-tests/suites/public-api/instrumentation/eventListener/this-preservation/test.ts b/dev-packages/browser-integration-tests/suites/public-api/instrumentation/eventListener/this-preservation/test.ts index 462db45c6052..0f71c89e250a 100644 --- a/dev-packages/browser-integration-tests/suites/public-api/instrumentation/eventListener/this-preservation/test.ts +++ b/dev-packages/browser-integration-tests/suites/public-api/instrumentation/eventListener/this-preservation/test.ts @@ -2,8 +2,8 @@ import { expect } from '@playwright/test'; import { sentryTest } from '../../../../../utils/fixtures'; -sentryTest('Event listener instrumentation preserves "this" context', async ({ getLocalTestPath, page }) => { - const url = await getLocalTestPath({ testDir: __dirname }); +sentryTest('Event listener instrumentation preserves "this" context', async ({ getLocalTestUrl, page }) => { + const url = await getLocalTestUrl({ testDir: __dirname }); await page.goto(url); let assertions = 0; diff --git a/dev-packages/browser-integration-tests/suites/public-api/instrumentation/eventListener/thrown-error/test.ts b/dev-packages/browser-integration-tests/suites/public-api/instrumentation/eventListener/thrown-error/test.ts index 1c0bbb66fa12..3a4313ae044e 100644 --- a/dev-packages/browser-integration-tests/suites/public-api/instrumentation/eventListener/thrown-error/test.ts +++ b/dev-packages/browser-integration-tests/suites/public-api/instrumentation/eventListener/thrown-error/test.ts @@ -6,8 +6,8 @@ import { getFirstSentryEnvelopeRequest } from '../../../../../utils/helpers'; sentryTest( 'Event listener instrumentation should capture an error thrown in an event handler', - async ({ getLocalTestPath, page }) => { - const url = await getLocalTestPath({ testDir: __dirname }); + async ({ getLocalTestUrl, page }) => { + const url = await getLocalTestUrl({ testDir: __dirname }); const eventData = await getFirstSentryEnvelopeRequest(page, url); diff --git a/dev-packages/browser-integration-tests/suites/public-api/instrumentation/eventListener/wrapping/test.ts b/dev-packages/browser-integration-tests/suites/public-api/instrumentation/eventListener/wrapping/test.ts index def52f9ce465..14159609b2bf 100644 --- a/dev-packages/browser-integration-tests/suites/public-api/instrumentation/eventListener/wrapping/test.ts +++ b/dev-packages/browser-integration-tests/suites/public-api/instrumentation/eventListener/wrapping/test.ts @@ -4,8 +4,8 @@ import { sentryTest } from '../../../../../utils/fixtures'; sentryTest( 'Event listener instrumentation should not wrap event listeners multiple times', - async ({ getLocalTestPath, page }) => { - const url = await getLocalTestPath({ testDir: __dirname }); + async ({ getLocalTestUrl, page }) => { + const url = await getLocalTestUrl({ testDir: __dirname }); await page.goto(url); const functionListenerStackHeights: number[] = []; diff --git a/dev-packages/browser-integration-tests/suites/public-api/instrumentation/onError/non-string-arg/test.ts b/dev-packages/browser-integration-tests/suites/public-api/instrumentation/onError/non-string-arg/test.ts index 86227532efb1..a9002579e912 100644 --- a/dev-packages/browser-integration-tests/suites/public-api/instrumentation/onError/non-string-arg/test.ts +++ b/dev-packages/browser-integration-tests/suites/public-api/instrumentation/onError/non-string-arg/test.ts @@ -6,13 +6,13 @@ import { getFirstSentryEnvelopeRequest, runScriptInSandbox } from '../../../../. sentryTest( 'should catch onerror calls with non-string first argument gracefully', - async ({ getLocalTestPath, page, browserName }) => { + async ({ getLocalTestUrl, page, browserName }) => { if (browserName === 'webkit') { // This test fails on Webkit as errors thrown from `runScriptInSandbox` are Script Errors and skipped by Sentry sentryTest.skip(); } - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); await page.goto(url); diff --git a/dev-packages/browser-integration-tests/suites/public-api/instrumentation/onError/rethrown/test.ts b/dev-packages/browser-integration-tests/suites/public-api/instrumentation/onError/rethrown/test.ts index 58a35d86a800..53c16ad46e23 100644 --- a/dev-packages/browser-integration-tests/suites/public-api/instrumentation/onError/rethrown/test.ts +++ b/dev-packages/browser-integration-tests/suites/public-api/instrumentation/onError/rethrown/test.ts @@ -6,13 +6,13 @@ import { getMultipleSentryEnvelopeRequests, runScriptInSandbox } from '../../../ sentryTest( 'should NOT catch an exception already caught [but rethrown] via Sentry.captureException', - async ({ getLocalTestPath, page, browserName }) => { + async ({ getLocalTestUrl, page, browserName }) => { if (browserName === 'webkit') { // This test fails on Webkit as errors thrown from `runScriptInSandbox` are Script Errors and skipped by Sentry sentryTest.skip(); } - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); await page.goto(url); diff --git a/dev-packages/browser-integration-tests/suites/public-api/instrumentation/onError/syntax-errors/test.ts b/dev-packages/browser-integration-tests/suites/public-api/instrumentation/onError/syntax-errors/test.ts index 46b68f8ccb24..cd08b56ccee5 100644 --- a/dev-packages/browser-integration-tests/suites/public-api/instrumentation/onError/syntax-errors/test.ts +++ b/dev-packages/browser-integration-tests/suites/public-api/instrumentation/onError/syntax-errors/test.ts @@ -4,13 +4,13 @@ import type { Event } from '@sentry/types'; import { sentryTest } from '../../../../../utils/fixtures'; import { getFirstSentryEnvelopeRequest, runScriptInSandbox } from '../../../../../utils/helpers'; -sentryTest('should catch syntax errors', async ({ getLocalTestPath, page, browserName }) => { +sentryTest('should catch syntax errors', async ({ getLocalTestUrl, page, browserName }) => { if (browserName === 'webkit') { // This test fails on Webkit as errors thrown from `runScriptInSandbox` are Script Errors and skipped by Sentry sentryTest.skip(); } - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); await page.goto(url); diff --git a/dev-packages/browser-integration-tests/suites/public-api/instrumentation/onError/thrown-errors/test.ts b/dev-packages/browser-integration-tests/suites/public-api/instrumentation/onError/thrown-errors/test.ts index 47607a22b289..27dbcc771431 100644 --- a/dev-packages/browser-integration-tests/suites/public-api/instrumentation/onError/thrown-errors/test.ts +++ b/dev-packages/browser-integration-tests/suites/public-api/instrumentation/onError/thrown-errors/test.ts @@ -4,13 +4,13 @@ import type { Event } from '@sentry/types'; import { sentryTest } from '../../../../../utils/fixtures'; import { getFirstSentryEnvelopeRequest, runScriptInSandbox } from '../../../../../utils/helpers'; -sentryTest('should catch thrown errors', async ({ getLocalTestPath, page, browserName }) => { +sentryTest('should catch thrown errors', async ({ getLocalTestUrl, page, browserName }) => { if (browserName === 'webkit') { // This test fails on Webkit as errors thrown from `runScriptInSandbox` are Script Errors and skipped by Sentry sentryTest.skip(); } - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); await page.goto(url); diff --git a/dev-packages/browser-integration-tests/suites/public-api/instrumentation/onError/thrown-objects/test.ts b/dev-packages/browser-integration-tests/suites/public-api/instrumentation/onError/thrown-objects/test.ts index 71159b605b4e..37a70678a2de 100644 --- a/dev-packages/browser-integration-tests/suites/public-api/instrumentation/onError/thrown-objects/test.ts +++ b/dev-packages/browser-integration-tests/suites/public-api/instrumentation/onError/thrown-objects/test.ts @@ -4,13 +4,13 @@ import type { Event } from '@sentry/types'; import { sentryTest } from '../../../../../utils/fixtures'; import { getFirstSentryEnvelopeRequest, runScriptInSandbox } from '../../../../../utils/helpers'; -sentryTest('should catch thrown objects', async ({ getLocalTestPath, page, browserName }) => { +sentryTest('should catch thrown objects', async ({ getLocalTestUrl, page, browserName }) => { if (browserName === 'webkit') { // This test fails on Webkit as errors thrown from `runScriptInSandbox` are Script Errors and skipped by Sentry sentryTest.skip(); } - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); await page.goto(url); diff --git a/dev-packages/browser-integration-tests/suites/public-api/instrumentation/onError/thrown-strings/test.ts b/dev-packages/browser-integration-tests/suites/public-api/instrumentation/onError/thrown-strings/test.ts index ff98e805f9aa..1245feb862e5 100644 --- a/dev-packages/browser-integration-tests/suites/public-api/instrumentation/onError/thrown-strings/test.ts +++ b/dev-packages/browser-integration-tests/suites/public-api/instrumentation/onError/thrown-strings/test.ts @@ -4,13 +4,13 @@ import type { Event } from '@sentry/types'; import { sentryTest } from '../../../../../utils/fixtures'; import { getFirstSentryEnvelopeRequest, runScriptInSandbox } from '../../../../../utils/helpers'; -sentryTest('should catch thrown strings', async ({ getLocalTestPath, page, browserName }) => { +sentryTest('should catch thrown strings', async ({ getLocalTestUrl, page, browserName }) => { if (browserName === 'webkit') { // This test fails on Webkit as errors thrown from `runScriptInSandbox` are Script Errors and skipped by Sentry sentryTest.skip(); } - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); await page.goto(url); diff --git a/dev-packages/browser-integration-tests/suites/public-api/instrumentation/onUnhandledRejection/custom-event/test.ts b/dev-packages/browser-integration-tests/suites/public-api/instrumentation/onUnhandledRejection/custom-event/test.ts index 50f857535acb..0f0bc09ed6d7 100644 --- a/dev-packages/browser-integration-tests/suites/public-api/instrumentation/onUnhandledRejection/custom-event/test.ts +++ b/dev-packages/browser-integration-tests/suites/public-api/instrumentation/onUnhandledRejection/custom-event/test.ts @@ -11,8 +11,8 @@ import { getFirstSentryEnvelopeRequest } from '../../../../../utils/helpers'; // https://github.com/getsentry/sentry-javascript/issues/2380 sentryTest( 'should capture PromiseRejectionEvent cast to CustomEvent with type unhandledrejection', - async ({ getLocalTestPath, page }) => { - const url = await getLocalTestPath({ testDir: __dirname }); + async ({ getLocalTestUrl, page }) => { + const url = await getLocalTestUrl({ testDir: __dirname }); const eventData = await getFirstSentryEnvelopeRequest(page, url); diff --git a/dev-packages/browser-integration-tests/suites/public-api/instrumentation/onUnhandledRejection/event/test.ts b/dev-packages/browser-integration-tests/suites/public-api/instrumentation/onUnhandledRejection/event/test.ts index 8a26aa807062..167cdc48870f 100644 --- a/dev-packages/browser-integration-tests/suites/public-api/instrumentation/onUnhandledRejection/event/test.ts +++ b/dev-packages/browser-integration-tests/suites/public-api/instrumentation/onUnhandledRejection/event/test.ts @@ -6,8 +6,8 @@ import { getFirstSentryEnvelopeRequest } from '../../../../../utils/helpers'; // there's no evidence that this actually happens, but it could, and our code correctly // handles it, so might as well prevent future regression on that score -sentryTest('should capture a random Event with type unhandledrejection', async ({ getLocalTestPath, page }) => { - const url = await getLocalTestPath({ testDir: __dirname }); +sentryTest('should capture a random Event with type unhandledrejection', async ({ getLocalTestUrl, page }) => { + const url = await getLocalTestUrl({ testDir: __dirname }); const eventData = await getFirstSentryEnvelopeRequest(page, url); diff --git a/dev-packages/browser-integration-tests/suites/public-api/instrumentation/onUnhandledRejection/thrown-errors/test.ts b/dev-packages/browser-integration-tests/suites/public-api/instrumentation/onUnhandledRejection/thrown-errors/test.ts index 27babe008d76..2d18376174c7 100644 --- a/dev-packages/browser-integration-tests/suites/public-api/instrumentation/onUnhandledRejection/thrown-errors/test.ts +++ b/dev-packages/browser-integration-tests/suites/public-api/instrumentation/onUnhandledRejection/thrown-errors/test.ts @@ -4,8 +4,8 @@ import type { Event } from '@sentry/types'; import { sentryTest } from '../../../../../utils/fixtures'; import { getFirstSentryEnvelopeRequest } from '../../../../../utils/helpers'; -sentryTest('should catch thrown errors', async ({ getLocalTestPath, page }) => { - const url = await getLocalTestPath({ testDir: __dirname }); +sentryTest('should catch thrown errors', async ({ getLocalTestUrl, page }) => { + const url = await getLocalTestUrl({ testDir: __dirname }); const eventData = await getFirstSentryEnvelopeRequest(page, url); diff --git a/dev-packages/browser-integration-tests/suites/public-api/instrumentation/onUnhandledRejection/thrown-null/test.ts b/dev-packages/browser-integration-tests/suites/public-api/instrumentation/onUnhandledRejection/thrown-null/test.ts index d047f5f024aa..f350ed0de639 100644 --- a/dev-packages/browser-integration-tests/suites/public-api/instrumentation/onUnhandledRejection/thrown-null/test.ts +++ b/dev-packages/browser-integration-tests/suites/public-api/instrumentation/onUnhandledRejection/thrown-null/test.ts @@ -4,8 +4,8 @@ import type { Event } from '@sentry/types'; import { sentryTest } from '../../../../../utils/fixtures'; import { getFirstSentryEnvelopeRequest } from '../../../../../utils/helpers'; -sentryTest('should catch thrown strings', async ({ getLocalTestPath, page }) => { - const url = await getLocalTestPath({ testDir: __dirname }); +sentryTest('should catch thrown strings', async ({ getLocalTestUrl, page }) => { + const url = await getLocalTestUrl({ testDir: __dirname }); const eventData = await getFirstSentryEnvelopeRequest(page, url); diff --git a/dev-packages/browser-integration-tests/suites/public-api/instrumentation/onUnhandledRejection/thrown-number/test.ts b/dev-packages/browser-integration-tests/suites/public-api/instrumentation/onUnhandledRejection/thrown-number/test.ts index 60cbeb9c57f8..7fefb9037427 100644 --- a/dev-packages/browser-integration-tests/suites/public-api/instrumentation/onUnhandledRejection/thrown-number/test.ts +++ b/dev-packages/browser-integration-tests/suites/public-api/instrumentation/onUnhandledRejection/thrown-number/test.ts @@ -4,8 +4,8 @@ import type { Event } from '@sentry/types'; import { sentryTest } from '../../../../../utils/fixtures'; import { getFirstSentryEnvelopeRequest } from '../../../../../utils/helpers'; -sentryTest('should catch thrown strings', async ({ getLocalTestPath, page }) => { - const url = await getLocalTestPath({ testDir: __dirname }); +sentryTest('should catch thrown strings', async ({ getLocalTestUrl, page }) => { + const url = await getLocalTestUrl({ testDir: __dirname }); const eventData = await getFirstSentryEnvelopeRequest(page, url); diff --git a/dev-packages/browser-integration-tests/suites/public-api/instrumentation/onUnhandledRejection/thrown-object-complex/test.ts b/dev-packages/browser-integration-tests/suites/public-api/instrumentation/onUnhandledRejection/thrown-object-complex/test.ts index e8c400045eb5..80a23927d9b5 100644 --- a/dev-packages/browser-integration-tests/suites/public-api/instrumentation/onUnhandledRejection/thrown-object-complex/test.ts +++ b/dev-packages/browser-integration-tests/suites/public-api/instrumentation/onUnhandledRejection/thrown-object-complex/test.ts @@ -4,8 +4,8 @@ import type { Event } from '@sentry/types'; import { sentryTest } from '../../../../../utils/fixtures'; import { getFirstSentryEnvelopeRequest } from '../../../../../utils/helpers'; -sentryTest('should capture unhandledrejection with a complex object', async ({ getLocalTestPath, page }) => { - const url = await getLocalTestPath({ testDir: __dirname }); +sentryTest('should capture unhandledrejection with a complex object', async ({ getLocalTestUrl, page }) => { + const url = await getLocalTestUrl({ testDir: __dirname }); const eventData = await getFirstSentryEnvelopeRequest(page, url); diff --git a/dev-packages/browser-integration-tests/suites/public-api/instrumentation/onUnhandledRejection/thrown-objects/test.ts b/dev-packages/browser-integration-tests/suites/public-api/instrumentation/onUnhandledRejection/thrown-objects/test.ts index a82296cc614c..e4e5fcfa2248 100644 --- a/dev-packages/browser-integration-tests/suites/public-api/instrumentation/onUnhandledRejection/thrown-objects/test.ts +++ b/dev-packages/browser-integration-tests/suites/public-api/instrumentation/onUnhandledRejection/thrown-objects/test.ts @@ -4,8 +4,8 @@ import type { Event } from '@sentry/types'; import { sentryTest } from '../../../../../utils/fixtures'; import { getFirstSentryEnvelopeRequest } from '../../../../../utils/helpers'; -sentryTest('should capture unhandledrejection with an object', async ({ getLocalTestPath, page }) => { - const url = await getLocalTestPath({ testDir: __dirname }); +sentryTest('should capture unhandledrejection with an object', async ({ getLocalTestUrl, page }) => { + const url = await getLocalTestUrl({ testDir: __dirname }); const eventData = await getFirstSentryEnvelopeRequest(page, url); diff --git a/dev-packages/browser-integration-tests/suites/public-api/instrumentation/onUnhandledRejection/thrown-string-large/test.ts b/dev-packages/browser-integration-tests/suites/public-api/instrumentation/onUnhandledRejection/thrown-string-large/test.ts index bb0a5ab255d2..1bec29f18f6d 100644 --- a/dev-packages/browser-integration-tests/suites/public-api/instrumentation/onUnhandledRejection/thrown-string-large/test.ts +++ b/dev-packages/browser-integration-tests/suites/public-api/instrumentation/onUnhandledRejection/thrown-string-large/test.ts @@ -4,8 +4,8 @@ import type { Event } from '@sentry/types'; import { sentryTest } from '../../../../../utils/fixtures'; import { getFirstSentryEnvelopeRequest } from '../../../../../utils/helpers'; -sentryTest('should capture unhandledrejection with a large string', async ({ getLocalTestPath, page }) => { - const url = await getLocalTestPath({ testDir: __dirname }); +sentryTest('should capture unhandledrejection with a large string', async ({ getLocalTestUrl, page }) => { + const url = await getLocalTestUrl({ testDir: __dirname }); const eventData = await getFirstSentryEnvelopeRequest(page, url); diff --git a/dev-packages/browser-integration-tests/suites/public-api/instrumentation/onUnhandledRejection/thrown-strings/test.ts b/dev-packages/browser-integration-tests/suites/public-api/instrumentation/onUnhandledRejection/thrown-strings/test.ts index 74eb2a939444..91faa5536079 100644 --- a/dev-packages/browser-integration-tests/suites/public-api/instrumentation/onUnhandledRejection/thrown-strings/test.ts +++ b/dev-packages/browser-integration-tests/suites/public-api/instrumentation/onUnhandledRejection/thrown-strings/test.ts @@ -4,8 +4,8 @@ import type { Event } from '@sentry/types'; import { sentryTest } from '../../../../../utils/fixtures'; import { getFirstSentryEnvelopeRequest } from '../../../../../utils/helpers'; -sentryTest('should catch thrown strings', async ({ getLocalTestPath, page }) => { - const url = await getLocalTestPath({ testDir: __dirname }); +sentryTest('should catch thrown strings', async ({ getLocalTestUrl, page }) => { + const url = await getLocalTestUrl({ testDir: __dirname }); const eventData = await getFirstSentryEnvelopeRequest(page, url); diff --git a/dev-packages/browser-integration-tests/suites/public-api/instrumentation/onUnhandledRejection/thrown-undefined/test.ts b/dev-packages/browser-integration-tests/suites/public-api/instrumentation/onUnhandledRejection/thrown-undefined/test.ts index f874e04b1802..2195725a6599 100644 --- a/dev-packages/browser-integration-tests/suites/public-api/instrumentation/onUnhandledRejection/thrown-undefined/test.ts +++ b/dev-packages/browser-integration-tests/suites/public-api/instrumentation/onUnhandledRejection/thrown-undefined/test.ts @@ -4,8 +4,8 @@ import type { Event } from '@sentry/types'; import { sentryTest } from '../../../../../utils/fixtures'; import { getFirstSentryEnvelopeRequest } from '../../../../../utils/helpers'; -sentryTest('should catch thrown strings', async ({ getLocalTestPath, page }) => { - const url = await getLocalTestPath({ testDir: __dirname }); +sentryTest('should catch thrown strings', async ({ getLocalTestUrl, page }) => { + const url = await getLocalTestUrl({ testDir: __dirname }); const eventData = await getFirstSentryEnvelopeRequest(page, url); diff --git a/dev-packages/browser-integration-tests/suites/public-api/instrumentation/requestAnimationFrame/callback/test.ts b/dev-packages/browser-integration-tests/suites/public-api/instrumentation/requestAnimationFrame/callback/test.ts index 0840789c759d..d111a0b473d7 100644 --- a/dev-packages/browser-integration-tests/suites/public-api/instrumentation/requestAnimationFrame/callback/test.ts +++ b/dev-packages/browser-integration-tests/suites/public-api/instrumentation/requestAnimationFrame/callback/test.ts @@ -4,8 +4,8 @@ import { sentryTest } from '../../../../../utils/fixtures'; sentryTest( 'wrapped callback should preserve correct context - window (not-bound)', - async ({ getLocalTestPath, page }) => { - const url = await getLocalTestPath({ testDir: __dirname }); + async ({ getLocalTestUrl, page }) => { + const url = await getLocalTestUrl({ testDir: __dirname }); await page.goto(url); @@ -24,8 +24,8 @@ sentryTest( sentryTest( 'wrapped callback should preserve correct context - `bind` bound method', - async ({ getLocalTestPath, page }) => { - const url = await getLocalTestPath({ testDir: __dirname }); + async ({ getLocalTestUrl, page }) => { + const url = await getLocalTestUrl({ testDir: __dirname }); await page.goto(url); diff --git a/dev-packages/browser-integration-tests/suites/public-api/instrumentation/requestAnimationFrame/thrown-errors/test.ts b/dev-packages/browser-integration-tests/suites/public-api/instrumentation/requestAnimationFrame/thrown-errors/test.ts index df437f34c0ef..e39e4c20a27b 100644 --- a/dev-packages/browser-integration-tests/suites/public-api/instrumentation/requestAnimationFrame/thrown-errors/test.ts +++ b/dev-packages/browser-integration-tests/suites/public-api/instrumentation/requestAnimationFrame/thrown-errors/test.ts @@ -4,8 +4,8 @@ import type { Event } from '@sentry/types'; import { sentryTest } from '../../../../../utils/fixtures'; import { getFirstSentryEnvelopeRequest } from '../../../../../utils/helpers'; -sentryTest('should capture exceptions inside callback', async ({ getLocalTestPath, page }) => { - const url = await getLocalTestPath({ testDir: __dirname }); +sentryTest('should capture exceptions inside callback', async ({ getLocalTestUrl, page }) => { + const url = await getLocalTestUrl({ testDir: __dirname }); const eventData = await getFirstSentryEnvelopeRequest(page, url); diff --git a/dev-packages/browser-integration-tests/suites/public-api/instrumentation/setInterval/test.ts b/dev-packages/browser-integration-tests/suites/public-api/instrumentation/setInterval/test.ts index 6da1e21dea1e..cdf8a4be9eb2 100644 --- a/dev-packages/browser-integration-tests/suites/public-api/instrumentation/setInterval/test.ts +++ b/dev-packages/browser-integration-tests/suites/public-api/instrumentation/setInterval/test.ts @@ -4,8 +4,8 @@ import type { Event } from '@sentry/types'; import { sentryTest } from '../../../../utils/fixtures'; import { getFirstSentryEnvelopeRequest } from '../../../../utils/helpers'; -sentryTest('Instrumentation should capture errors in setInterval', async ({ getLocalTestPath, page }) => { - const url = await getLocalTestPath({ testDir: __dirname }); +sentryTest('Instrumentation should capture errors in setInterval', async ({ getLocalTestUrl, page }) => { + const url = await getLocalTestUrl({ testDir: __dirname }); const eventData = await getFirstSentryEnvelopeRequest(page, url); diff --git a/dev-packages/browser-integration-tests/suites/public-api/instrumentation/setTimeout/test.ts b/dev-packages/browser-integration-tests/suites/public-api/instrumentation/setTimeout/test.ts index fce63e657b49..be46196aa754 100644 --- a/dev-packages/browser-integration-tests/suites/public-api/instrumentation/setTimeout/test.ts +++ b/dev-packages/browser-integration-tests/suites/public-api/instrumentation/setTimeout/test.ts @@ -4,8 +4,8 @@ import type { Event } from '@sentry/types'; import { sentryTest } from '../../../../utils/fixtures'; import { getFirstSentryEnvelopeRequest } from '../../../../utils/helpers'; -sentryTest('Instrumentation should capture errors in setTimeout', async ({ getLocalTestPath, page }) => { - const url = await getLocalTestPath({ testDir: __dirname }); +sentryTest('Instrumentation should capture errors in setTimeout', async ({ getLocalTestUrl, page }) => { + const url = await getLocalTestUrl({ testDir: __dirname }); const eventData = await getFirstSentryEnvelopeRequest(page, url); diff --git a/dev-packages/browser-integration-tests/suites/public-api/instrumentation/setTimeoutFrozen/test.ts b/dev-packages/browser-integration-tests/suites/public-api/instrumentation/setTimeoutFrozen/test.ts index 91e82f8b1dcd..1fdee574b3f2 100644 --- a/dev-packages/browser-integration-tests/suites/public-api/instrumentation/setTimeoutFrozen/test.ts +++ b/dev-packages/browser-integration-tests/suites/public-api/instrumentation/setTimeoutFrozen/test.ts @@ -6,11 +6,11 @@ import { getFirstSentryEnvelopeRequest } from '../../../../utils/helpers'; sentryTest( 'Instrumentation does not fail when using frozen callback for setTimeout', - async ({ getLocalTestPath, page }) => { + async ({ getLocalTestUrl, page }) => { const bundleKey = process.env.PW_BUNDLE || ''; const hasDebug = !bundleKey.includes('_min'); - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); const logMessages: string[] = []; diff --git a/dev-packages/browser-integration-tests/suites/public-api/instrumentation/xhr/thrown-error/test.ts b/dev-packages/browser-integration-tests/suites/public-api/instrumentation/xhr/thrown-error/test.ts index 1b213b2fb6bc..0a2114232e48 100644 --- a/dev-packages/browser-integration-tests/suites/public-api/instrumentation/xhr/thrown-error/test.ts +++ b/dev-packages/browser-integration-tests/suites/public-api/instrumentation/xhr/thrown-error/test.ts @@ -6,8 +6,8 @@ import { getFirstSentryEnvelopeRequest } from '../../../../../utils/helpers'; sentryTest( 'should capture exceptions from XMLHttpRequest event handlers (e.g. onreadystatechange)', - async ({ getLocalTestPath, page }) => { - const url = await getLocalTestPath({ testDir: __dirname }); + async ({ getLocalTestUrl, page }) => { + const url = await getLocalTestUrl({ testDir: __dirname }); const eventData = await getFirstSentryEnvelopeRequest(page, url); diff --git a/dev-packages/browser-integration-tests/suites/public-api/setContext/multiple_contexts/test.ts b/dev-packages/browser-integration-tests/suites/public-api/setContext/multiple_contexts/test.ts index 29ab95edb776..8e11f0cfde64 100644 --- a/dev-packages/browser-integration-tests/suites/public-api/setContext/multiple_contexts/test.ts +++ b/dev-packages/browser-integration-tests/suites/public-api/setContext/multiple_contexts/test.ts @@ -4,8 +4,8 @@ import type { Event } from '@sentry/types'; import { sentryTest } from '../../../../utils/fixtures'; import { getFirstSentryEnvelopeRequest } from '../../../../utils/helpers'; -sentryTest('should record multiple contexts', async ({ getLocalTestPath, page }) => { - const url = await getLocalTestPath({ testDir: __dirname }); +sentryTest('should record multiple contexts', async ({ getLocalTestUrl, page }) => { + const url = await getLocalTestUrl({ testDir: __dirname }); const eventData = await getFirstSentryEnvelopeRequest(page, url); diff --git a/dev-packages/browser-integration-tests/suites/public-api/setContext/non_serializable_context/test.ts b/dev-packages/browser-integration-tests/suites/public-api/setContext/non_serializable_context/test.ts index 9b270205f109..a54080159c2b 100644 --- a/dev-packages/browser-integration-tests/suites/public-api/setContext/non_serializable_context/test.ts +++ b/dev-packages/browser-integration-tests/suites/public-api/setContext/non_serializable_context/test.ts @@ -4,8 +4,8 @@ import type { Event } from '@sentry/types'; import { sentryTest } from '../../../../utils/fixtures'; import { getFirstSentryEnvelopeRequest } from '../../../../utils/helpers'; -sentryTest('should normalize non-serializable context', async ({ getLocalTestPath, page }) => { - const url = await getLocalTestPath({ testDir: __dirname }); +sentryTest('should normalize non-serializable context', async ({ getLocalTestUrl, page }) => { + const url = await getLocalTestUrl({ testDir: __dirname }); const eventData = await getFirstSentryEnvelopeRequest(page, url); diff --git a/dev-packages/browser-integration-tests/suites/public-api/setContext/simple_context/test.ts b/dev-packages/browser-integration-tests/suites/public-api/setContext/simple_context/test.ts index 37e91dbf314d..1697d8735ede 100644 --- a/dev-packages/browser-integration-tests/suites/public-api/setContext/simple_context/test.ts +++ b/dev-packages/browser-integration-tests/suites/public-api/setContext/simple_context/test.ts @@ -4,8 +4,8 @@ import type { Event } from '@sentry/types'; import { sentryTest } from '../../../../utils/fixtures'; import { getFirstSentryEnvelopeRequest } from '../../../../utils/helpers'; -sentryTest('should set a simple context', async ({ getLocalTestPath, page }) => { - const url = await getLocalTestPath({ testDir: __dirname }); +sentryTest('should set a simple context', async ({ getLocalTestUrl, page }) => { + const url = await getLocalTestUrl({ testDir: __dirname }); const eventData = await getFirstSentryEnvelopeRequest(page, url); diff --git a/dev-packages/browser-integration-tests/suites/public-api/setExtra/multiple_extras/test.ts b/dev-packages/browser-integration-tests/suites/public-api/setExtra/multiple_extras/test.ts index 17e5fa9790c7..e6d0b0a63f9e 100644 --- a/dev-packages/browser-integration-tests/suites/public-api/setExtra/multiple_extras/test.ts +++ b/dev-packages/browser-integration-tests/suites/public-api/setExtra/multiple_extras/test.ts @@ -4,8 +4,8 @@ import type { Event } from '@sentry/types'; import { sentryTest } from '../../../../utils/fixtures'; import { getFirstSentryEnvelopeRequest } from '../../../../utils/helpers'; -sentryTest('should record multiple extras of different types', async ({ getLocalTestPath, page }) => { - const url = await getLocalTestPath({ testDir: __dirname }); +sentryTest('should record multiple extras of different types', async ({ getLocalTestUrl, page }) => { + const url = await getLocalTestUrl({ testDir: __dirname }); const eventData = await getFirstSentryEnvelopeRequest(page, url); diff --git a/dev-packages/browser-integration-tests/suites/public-api/setExtra/non_serializable_extra/test.ts b/dev-packages/browser-integration-tests/suites/public-api/setExtra/non_serializable_extra/test.ts index 67b2e9cd162c..3a107189fc16 100644 --- a/dev-packages/browser-integration-tests/suites/public-api/setExtra/non_serializable_extra/test.ts +++ b/dev-packages/browser-integration-tests/suites/public-api/setExtra/non_serializable_extra/test.ts @@ -4,8 +4,8 @@ import type { Event } from '@sentry/types'; import { sentryTest } from '../../../../utils/fixtures'; import { getFirstSentryEnvelopeRequest } from '../../../../utils/helpers'; -sentryTest('should normalize non-serializable extra', async ({ getLocalTestPath, page }) => { - const url = await getLocalTestPath({ testDir: __dirname }); +sentryTest('should normalize non-serializable extra', async ({ getLocalTestUrl, page }) => { + const url = await getLocalTestUrl({ testDir: __dirname }); const eventData = await getFirstSentryEnvelopeRequest(page, url); diff --git a/dev-packages/browser-integration-tests/suites/public-api/setExtra/simple_extra/test.ts b/dev-packages/browser-integration-tests/suites/public-api/setExtra/simple_extra/test.ts index 3f77998cd758..8c3557d9f047 100644 --- a/dev-packages/browser-integration-tests/suites/public-api/setExtra/simple_extra/test.ts +++ b/dev-packages/browser-integration-tests/suites/public-api/setExtra/simple_extra/test.ts @@ -4,8 +4,8 @@ import type { Event } from '@sentry/types'; import { sentryTest } from '../../../../utils/fixtures'; import { getFirstSentryEnvelopeRequest } from '../../../../utils/helpers'; -sentryTest('should record a simple extra object', async ({ getLocalTestPath, page }) => { - const url = await getLocalTestPath({ testDir: __dirname }); +sentryTest('should record a simple extra object', async ({ getLocalTestUrl, page }) => { + const url = await getLocalTestUrl({ testDir: __dirname }); const eventData = await getFirstSentryEnvelopeRequest(page, url); diff --git a/dev-packages/browser-integration-tests/suites/public-api/setExtras/consecutive_calls/test.ts b/dev-packages/browser-integration-tests/suites/public-api/setExtras/consecutive_calls/test.ts index 555686058366..64f9101b7057 100644 --- a/dev-packages/browser-integration-tests/suites/public-api/setExtras/consecutive_calls/test.ts +++ b/dev-packages/browser-integration-tests/suites/public-api/setExtras/consecutive_calls/test.ts @@ -4,8 +4,8 @@ import type { Event } from '@sentry/types'; import { sentryTest } from '../../../../utils/fixtures'; import { getFirstSentryEnvelopeRequest } from '../../../../utils/helpers'; -sentryTest('should set extras from multiple consecutive calls', async ({ getLocalTestPath, page }) => { - const url = await getLocalTestPath({ testDir: __dirname }); +sentryTest('should set extras from multiple consecutive calls', async ({ getLocalTestUrl, page }) => { + const url = await getLocalTestUrl({ testDir: __dirname }); const eventData = await getFirstSentryEnvelopeRequest(page, url); diff --git a/dev-packages/browser-integration-tests/suites/public-api/setExtras/multiple_extras/test.ts b/dev-packages/browser-integration-tests/suites/public-api/setExtras/multiple_extras/test.ts index fdea76a5344a..b57f70b80c2b 100644 --- a/dev-packages/browser-integration-tests/suites/public-api/setExtras/multiple_extras/test.ts +++ b/dev-packages/browser-integration-tests/suites/public-api/setExtras/multiple_extras/test.ts @@ -4,8 +4,8 @@ import type { Event } from '@sentry/types'; import { sentryTest } from '../../../../utils/fixtures'; import { getFirstSentryEnvelopeRequest } from '../../../../utils/helpers'; -sentryTest('should record an extras object', async ({ getLocalTestPath, page }) => { - const url = await getLocalTestPath({ testDir: __dirname }); +sentryTest('should record an extras object', async ({ getLocalTestUrl, page }) => { + const url = await getLocalTestUrl({ testDir: __dirname }); const eventData = await getFirstSentryEnvelopeRequest(page, url); diff --git a/dev-packages/browser-integration-tests/suites/public-api/setTag/with_non_primitives/test.ts b/dev-packages/browser-integration-tests/suites/public-api/setTag/with_non_primitives/test.ts index 3eff6ec07858..2cbe0683e434 100644 --- a/dev-packages/browser-integration-tests/suites/public-api/setTag/with_non_primitives/test.ts +++ b/dev-packages/browser-integration-tests/suites/public-api/setTag/with_non_primitives/test.ts @@ -4,8 +4,8 @@ import type { Event } from '@sentry/types'; import { sentryTest } from '../../../../utils/fixtures'; import { getFirstSentryEnvelopeRequest } from '../../../../utils/helpers'; -sentryTest('should not accept non-primitive tags', async ({ getLocalTestPath, page }) => { - const url = await getLocalTestPath({ testDir: __dirname }); +sentryTest('should not accept non-primitive tags', async ({ getLocalTestUrl, page }) => { + const url = await getLocalTestUrl({ testDir: __dirname }); const eventData = await getFirstSentryEnvelopeRequest(page, url); diff --git a/dev-packages/browser-integration-tests/suites/public-api/setTag/with_primitives/test.ts b/dev-packages/browser-integration-tests/suites/public-api/setTag/with_primitives/test.ts index 915c39a51596..3eb7567247c7 100644 --- a/dev-packages/browser-integration-tests/suites/public-api/setTag/with_primitives/test.ts +++ b/dev-packages/browser-integration-tests/suites/public-api/setTag/with_primitives/test.ts @@ -4,8 +4,8 @@ import type { Event } from '@sentry/types'; import { sentryTest } from '../../../../utils/fixtures'; import { getFirstSentryEnvelopeRequest } from '../../../../utils/helpers'; -sentryTest('should set primitive tags', async ({ getLocalTestPath, page }) => { - const url = await getLocalTestPath({ testDir: __dirname }); +sentryTest('should set primitive tags', async ({ getLocalTestUrl, page }) => { + const url = await getLocalTestUrl({ testDir: __dirname }); const eventData = await getFirstSentryEnvelopeRequest(page, url); diff --git a/dev-packages/browser-integration-tests/suites/public-api/setTags/with_non_primitives/test.ts b/dev-packages/browser-integration-tests/suites/public-api/setTags/with_non_primitives/test.ts index 3eff6ec07858..2cbe0683e434 100644 --- a/dev-packages/browser-integration-tests/suites/public-api/setTags/with_non_primitives/test.ts +++ b/dev-packages/browser-integration-tests/suites/public-api/setTags/with_non_primitives/test.ts @@ -4,8 +4,8 @@ import type { Event } from '@sentry/types'; import { sentryTest } from '../../../../utils/fixtures'; import { getFirstSentryEnvelopeRequest } from '../../../../utils/helpers'; -sentryTest('should not accept non-primitive tags', async ({ getLocalTestPath, page }) => { - const url = await getLocalTestPath({ testDir: __dirname }); +sentryTest('should not accept non-primitive tags', async ({ getLocalTestUrl, page }) => { + const url = await getLocalTestUrl({ testDir: __dirname }); const eventData = await getFirstSentryEnvelopeRequest(page, url); diff --git a/dev-packages/browser-integration-tests/suites/public-api/setTags/with_primitives/test.ts b/dev-packages/browser-integration-tests/suites/public-api/setTags/with_primitives/test.ts index 915c39a51596..3eb7567247c7 100644 --- a/dev-packages/browser-integration-tests/suites/public-api/setTags/with_primitives/test.ts +++ b/dev-packages/browser-integration-tests/suites/public-api/setTags/with_primitives/test.ts @@ -4,8 +4,8 @@ import type { Event } from '@sentry/types'; import { sentryTest } from '../../../../utils/fixtures'; import { getFirstSentryEnvelopeRequest } from '../../../../utils/helpers'; -sentryTest('should set primitive tags', async ({ getLocalTestPath, page }) => { - const url = await getLocalTestPath({ testDir: __dirname }); +sentryTest('should set primitive tags', async ({ getLocalTestUrl, page }) => { + const url = await getLocalTestUrl({ testDir: __dirname }); const eventData = await getFirstSentryEnvelopeRequest(page, url); diff --git a/dev-packages/browser-integration-tests/suites/public-api/setUser/unset_user/test.ts b/dev-packages/browser-integration-tests/suites/public-api/setUser/unset_user/test.ts index 193a10b8677d..dbf5943c7814 100644 --- a/dev-packages/browser-integration-tests/suites/public-api/setUser/unset_user/test.ts +++ b/dev-packages/browser-integration-tests/suites/public-api/setUser/unset_user/test.ts @@ -4,8 +4,8 @@ import type { Event } from '@sentry/types'; import { sentryTest } from '../../../../utils/fixtures'; import { getMultipleSentryEnvelopeRequests } from '../../../../utils/helpers'; -sentryTest('should unset user', async ({ getLocalTestPath, page }) => { - const url = await getLocalTestPath({ testDir: __dirname }); +sentryTest('should unset user', async ({ getLocalTestUrl, page }) => { + const url = await getLocalTestUrl({ testDir: __dirname }); const eventData = await getMultipleSentryEnvelopeRequests(page, 3, { url }); diff --git a/dev-packages/browser-integration-tests/suites/public-api/setUser/update_user/test.ts b/dev-packages/browser-integration-tests/suites/public-api/setUser/update_user/test.ts index f673280d5c0b..915265a9a030 100644 --- a/dev-packages/browser-integration-tests/suites/public-api/setUser/update_user/test.ts +++ b/dev-packages/browser-integration-tests/suites/public-api/setUser/update_user/test.ts @@ -4,8 +4,8 @@ import type { Event } from '@sentry/types'; import { sentryTest } from '../../../../utils/fixtures'; import { getMultipleSentryEnvelopeRequests } from '../../../../utils/helpers'; -sentryTest('should update user', async ({ getLocalTestPath, page }) => { - const url = await getLocalTestPath({ testDir: __dirname }); +sentryTest('should update user', async ({ getLocalTestUrl, page }) => { + const url = await getLocalTestUrl({ testDir: __dirname }); const eventData = await getMultipleSentryEnvelopeRequests(page, 2, { url }); diff --git a/dev-packages/browser-integration-tests/suites/public-api/showReportDialog/inject-script/test.ts b/dev-packages/browser-integration-tests/suites/public-api/showReportDialog/inject-script/test.ts index e0db0d21cf53..17a7fd27ad18 100644 --- a/dev-packages/browser-integration-tests/suites/public-api/showReportDialog/inject-script/test.ts +++ b/dev-packages/browser-integration-tests/suites/public-api/showReportDialog/inject-script/test.ts @@ -2,8 +2,8 @@ import { expect } from '@playwright/test'; import { sentryTest } from '../../../../utils/fixtures'; -sentryTest('should inject dialog script into with correct attributes', async ({ getLocalTestPath, page }) => { - const url = await getLocalTestPath({ testDir: __dirname }); +sentryTest('should inject dialog script into with correct attributes', async ({ getLocalTestUrl, page }) => { + const url = await getLocalTestUrl({ testDir: __dirname }); const dialogScriptSelector = 'head > script[src^="https://dsn.ingest.sentry.io/api/embed/error-page"]'; diff --git a/dev-packages/browser-integration-tests/suites/public-api/startSpan/attributes/test.ts b/dev-packages/browser-integration-tests/suites/public-api/startSpan/attributes/test.ts index a5e3e651467a..056fa71c0ebe 100644 --- a/dev-packages/browser-integration-tests/suites/public-api/startSpan/attributes/test.ts +++ b/dev-packages/browser-integration-tests/suites/public-api/startSpan/attributes/test.ts @@ -7,12 +7,12 @@ import { waitForTransactionRequestOnUrl, } from '../../../../utils/helpers'; -sentryTest('sends an empty string attribute', async ({ getLocalTestPath, page }) => { +sentryTest('sends an empty string attribute', async ({ getLocalTestUrl, page }) => { if (shouldSkipTracingTest()) { sentryTest.skip(); } - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); const req = await waitForTransactionRequestOnUrl(page, url); const transaction = envelopeRequestParser(req); diff --git a/dev-packages/browser-integration-tests/suites/public-api/startSpan/basic/test.ts b/dev-packages/browser-integration-tests/suites/public-api/startSpan/basic/test.ts index 3b64a1230a5b..e4b14c17097a 100644 --- a/dev-packages/browser-integration-tests/suites/public-api/startSpan/basic/test.ts +++ b/dev-packages/browser-integration-tests/suites/public-api/startSpan/basic/test.ts @@ -14,12 +14,12 @@ import { sentryTest( 'sends a transaction in an envelope with manual origin and custom source', - async ({ getLocalTestPath, page }) => { + async ({ getLocalTestUrl, page }) => { if (shouldSkipTracingTest()) { sentryTest.skip(); } - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); const req = await waitForTransactionRequestOnUrl(page, url); const transaction = envelopeRequestParser(req); @@ -37,12 +37,12 @@ sentryTest( }, ); -sentryTest('should report finished spans as children of the root transaction', async ({ getLocalTestPath, page }) => { +sentryTest('should report finished spans as children of the root transaction', async ({ getLocalTestUrl, page }) => { if (shouldSkipTracingTest()) { sentryTest.skip(); } - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); const req = await waitForTransactionRequestOnUrl(page, url); const transaction = envelopeRequestParser(req); diff --git a/dev-packages/browser-integration-tests/suites/public-api/startSpan/circular_data/test.ts b/dev-packages/browser-integration-tests/suites/public-api/startSpan/circular_data/test.ts index b6e88e821cbb..bb125b5f5448 100644 --- a/dev-packages/browser-integration-tests/suites/public-api/startSpan/circular_data/test.ts +++ b/dev-packages/browser-integration-tests/suites/public-api/startSpan/circular_data/test.ts @@ -4,12 +4,12 @@ import type { Event } from '@sentry/types'; import { sentryTest } from '../../../../utils/fixtures'; import { getFirstSentryEnvelopeRequest, shouldSkipTracingTest } from '../../../../utils/helpers'; -sentryTest('should be able to handle circular data', async ({ getLocalTestPath, page }) => { +sentryTest('should be able to handle circular data', async ({ getLocalTestUrl, page }) => { if (shouldSkipTracingTest()) { sentryTest.skip(); } - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); const eventData = await getFirstSentryEnvelopeRequest(page, url); expect(eventData.type).toBe('transaction'); diff --git a/dev-packages/browser-integration-tests/suites/public-api/startSpan/error-async-reject/test.ts b/dev-packages/browser-integration-tests/suites/public-api/startSpan/error-async-reject/test.ts index e328d4869b24..62beb28adcbe 100644 --- a/dev-packages/browser-integration-tests/suites/public-api/startSpan/error-async-reject/test.ts +++ b/dev-packages/browser-integration-tests/suites/public-api/startSpan/error-async-reject/test.ts @@ -6,12 +6,12 @@ import { getMultipleSentryEnvelopeRequests, shouldSkipTracingTest } from '../../ sentryTest( 'should capture a promise rejection within an async startSpan callback', - async ({ getLocalTestPath, page }) => { + async ({ getLocalTestUrl, page }) => { if (shouldSkipTracingTest()) { sentryTest.skip(); } - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); const envelopePromise = getMultipleSentryEnvelopeRequests(page, 2); await page.goto(url); diff --git a/dev-packages/browser-integration-tests/suites/public-api/startSpan/error-async-throw-not-awaited/test.ts b/dev-packages/browser-integration-tests/suites/public-api/startSpan/error-async-throw-not-awaited/test.ts index 5ef6f22419d1..0bfb51c8863d 100644 --- a/dev-packages/browser-integration-tests/suites/public-api/startSpan/error-async-throw-not-awaited/test.ts +++ b/dev-packages/browser-integration-tests/suites/public-api/startSpan/error-async-throw-not-awaited/test.ts @@ -6,13 +6,13 @@ import { getMultipleSentryEnvelopeRequests, shouldSkipTracingTest } from '../../ sentryTest( "should capture a thrown error within an async startSpan callback that's not awaited properly", - async ({ getLocalTestPath, page }) => { + async ({ getLocalTestUrl, page }) => { if (shouldSkipTracingTest()) { sentryTest.skip(); } const envelopePromise = getMultipleSentryEnvelopeRequests(page, 2); - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); await page.goto(url); const clickPromise = page.getByText('Button 1').click(); diff --git a/dev-packages/browser-integration-tests/suites/public-api/startSpan/error-async-throw/test.ts b/dev-packages/browser-integration-tests/suites/public-api/startSpan/error-async-throw/test.ts index 15ee3b9bd4de..9d966312973f 100644 --- a/dev-packages/browser-integration-tests/suites/public-api/startSpan/error-async-throw/test.ts +++ b/dev-packages/browser-integration-tests/suites/public-api/startSpan/error-async-throw/test.ts @@ -4,13 +4,13 @@ import type { Event } from '@sentry/types'; import { sentryTest } from '../../../../utils/fixtures'; import { getMultipleSentryEnvelopeRequests, shouldSkipTracingTest } from '../../../../utils/helpers'; -sentryTest('should capture a thrown error within an async startSpan callback', async ({ getLocalTestPath, page }) => { +sentryTest('should capture a thrown error within an async startSpan callback', async ({ getLocalTestUrl, page }) => { if (shouldSkipTracingTest()) { sentryTest.skip(); } const envelopePromise = getMultipleSentryEnvelopeRequests(page, 2); - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); await page.goto(url); const clickPromise = page.getByText('Button 1').click(); diff --git a/dev-packages/browser-integration-tests/suites/public-api/startSpan/error-sync/test.ts b/dev-packages/browser-integration-tests/suites/public-api/startSpan/error-sync/test.ts index 4c4388dab435..1894cac93ec9 100644 --- a/dev-packages/browser-integration-tests/suites/public-api/startSpan/error-sync/test.ts +++ b/dev-packages/browser-integration-tests/suites/public-api/startSpan/error-sync/test.ts @@ -10,7 +10,7 @@ import { sentryTest( 'should capture an error within a sync startSpan callback', - async ({ getLocalTestPath, page, browserName }) => { + async ({ getLocalTestUrl, page, browserName }) => { if (browserName === 'webkit') { // This test fails on Webkit as errors thrown from `runScriptInSandbox` are Script Errors and skipped by Sentry sentryTest.skip(); @@ -20,7 +20,7 @@ sentryTest( sentryTest.skip(); } - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); await page.goto(url); diff --git a/dev-packages/browser-integration-tests/suites/public-api/startSpan/setMeasurement/test.ts b/dev-packages/browser-integration-tests/suites/public-api/startSpan/setMeasurement/test.ts index fe45323474f0..535d2dd7fc70 100644 --- a/dev-packages/browser-integration-tests/suites/public-api/startSpan/setMeasurement/test.ts +++ b/dev-packages/browser-integration-tests/suites/public-api/startSpan/setMeasurement/test.ts @@ -4,12 +4,12 @@ import type { Event } from '@sentry/types'; import { sentryTest } from '../../../../utils/fixtures'; import { getFirstSentryEnvelopeRequest, shouldSkipTracingTest } from '../../../../utils/helpers'; -sentryTest('should attach measurement to transaction', async ({ getLocalTestPath, page }) => { +sentryTest('should attach measurement to transaction', async ({ getLocalTestUrl, page }) => { if (shouldSkipTracingTest()) { sentryTest.skip(); } - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); const event = await getFirstSentryEnvelopeRequest(page, url); expect(event.measurements?.['metric.foo'].value).toBe(42); diff --git a/dev-packages/browser-integration-tests/suites/public-api/startSpan/standalone-mixed-transaction/test.ts b/dev-packages/browser-integration-tests/suites/public-api/startSpan/standalone-mixed-transaction/test.ts index 7c93f923164b..7f3d21d22602 100644 --- a/dev-packages/browser-integration-tests/suites/public-api/startSpan/standalone-mixed-transaction/test.ts +++ b/dev-packages/browser-integration-tests/suites/public-api/startSpan/standalone-mixed-transaction/test.ts @@ -10,12 +10,12 @@ import { sentryTest( 'sends a transaction and a span envelope if a standalone span is created as a child of an ongoing span tree', - async ({ getLocalTestPath, page }) => { + async ({ getLocalTestUrl, page }) => { if (shouldSkipTracingTest()) { sentryTest.skip(); } - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); const envelopes = await getMultipleSentryEnvelopeRequests( page, 2, diff --git a/dev-packages/browser-integration-tests/suites/public-api/startSpan/standalone-sdk-disabled/test.ts b/dev-packages/browser-integration-tests/suites/public-api/startSpan/standalone-sdk-disabled/test.ts index c8d05c056b20..c83ba3bc61cd 100644 --- a/dev-packages/browser-integration-tests/suites/public-api/startSpan/standalone-sdk-disabled/test.ts +++ b/dev-packages/browser-integration-tests/suites/public-api/startSpan/standalone-sdk-disabled/test.ts @@ -3,12 +3,12 @@ import { expect } from '@playwright/test'; import { sentryTest } from '../../../../utils/fixtures'; import { shouldSkipTracingTest } from '../../../../utils/helpers'; -sentryTest("doesn't send a standalone span envelope if SDK is disabled", async ({ getLocalTestPath, page }) => { +sentryTest("doesn't send a standalone span envelope if SDK is disabled", async ({ getLocalTestUrl, page }) => { if (shouldSkipTracingTest()) { sentryTest.skip(); } - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); await page.goto(url); // @ts-expect-error this exists in the test init/subject diff --git a/dev-packages/browser-integration-tests/suites/public-api/startSpan/standalone/test.ts b/dev-packages/browser-integration-tests/suites/public-api/startSpan/standalone/test.ts index 256f047b5f9e..d871ead881a9 100644 --- a/dev-packages/browser-integration-tests/suites/public-api/startSpan/standalone/test.ts +++ b/dev-packages/browser-integration-tests/suites/public-api/startSpan/standalone/test.ts @@ -8,12 +8,12 @@ import { shouldSkipTracingTest, } from '../../../../utils/helpers'; -sentryTest('sends a segment span envelope', async ({ getLocalTestPath, page }) => { +sentryTest('sends a segment span envelope', async ({ getLocalTestUrl, page }) => { if (shouldSkipTracingTest()) { sentryTest.skip(); } - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); const spanEnvelope = await getFirstSentryEnvelopeRequest(page, url, properFullEnvelopeRequestParser); const headers = spanEnvelope[0]; diff --git a/dev-packages/browser-integration-tests/suites/public-api/withScope/nested_scopes/test.ts b/dev-packages/browser-integration-tests/suites/public-api/withScope/nested_scopes/test.ts index 415a173bc64f..07708d3f6df9 100644 --- a/dev-packages/browser-integration-tests/suites/public-api/withScope/nested_scopes/test.ts +++ b/dev-packages/browser-integration-tests/suites/public-api/withScope/nested_scopes/test.ts @@ -4,8 +4,8 @@ import type { Event } from '@sentry/types'; import { sentryTest } from '../../../../utils/fixtures'; import { getMultipleSentryEnvelopeRequests } from '../../../../utils/helpers'; -sentryTest('should allow nested scoping', async ({ getLocalTestPath, page }) => { - const url = await getLocalTestPath({ testDir: __dirname }); +sentryTest('should allow nested scoping', async ({ getLocalTestUrl, page }) => { + const url = await getLocalTestUrl({ testDir: __dirname }); const eventData = await getMultipleSentryEnvelopeRequests(page, 5, { url }); diff --git a/dev-packages/browser-integration-tests/suites/public-api/withScope/throwError/test.ts b/dev-packages/browser-integration-tests/suites/public-api/withScope/throwError/test.ts index cb21bebb8241..589b1e5c6f45 100644 --- a/dev-packages/browser-integration-tests/suites/public-api/withScope/throwError/test.ts +++ b/dev-packages/browser-integration-tests/suites/public-api/withScope/throwError/test.ts @@ -15,8 +15,8 @@ import { getFirstSentryEnvelopeRequest } from '../../../../utils/helpers'; */ sentryTest( 'withScope scope is NOT applied to thrown error caught by global handler', - async ({ getLocalTestPath, page }) => { - const url = await getLocalTestPath({ testDir: __dirname }); + async ({ getLocalTestUrl, page }) => { + const url = await getLocalTestUrl({ testDir: __dirname }); const eventData = await getFirstSentryEnvelopeRequest(page, url); diff --git a/dev-packages/browser-integration-tests/suites/replay/bufferModeManual/test.ts b/dev-packages/browser-integration-tests/suites/replay/bufferModeManual/test.ts index 8d6d87e40d36..b3578c98f1b0 100644 --- a/dev-packages/browser-integration-tests/suites/replay/bufferModeManual/test.ts +++ b/dev-packages/browser-integration-tests/suites/replay/bufferModeManual/test.ts @@ -15,7 +15,7 @@ import { sentryTest( '[buffer-mode] manually start buffer mode and capture buffer', - async ({ getLocalTestPath, page, browserName }) => { + async ({ getLocalTestUrl, page, browserName }) => { // This was sometimes flaky on webkit, so skipping for now if (shouldSkipReplayTest() || browserName === 'webkit') { sentryTest.skip(); @@ -45,7 +45,7 @@ sentryTest( }); }); - const url = await getLocalTestPath({ testDir: __dirname, skipDsnRouteHandler: true }); + const url = await getLocalTestUrl({ testDir: __dirname, skipDsnRouteHandler: true }); await page.goto(url); await page.locator('#go-background').click(); @@ -161,7 +161,7 @@ sentryTest( sentryTest( '[buffer-mode] manually start buffer mode and capture buffer, but do not continue as session', - async ({ getLocalTestPath, page, browserName }) => { + async ({ getLocalTestUrl, page, browserName }) => { // This was sometimes flaky on webkit, so skipping for now if (shouldSkipReplayTest() || browserName === 'webkit') { sentryTest.skip(); @@ -190,7 +190,7 @@ sentryTest( }); }); - const url = await getLocalTestPath({ testDir: __dirname, skipDsnRouteHandler: true }); + const url = await getLocalTestUrl({ testDir: __dirname, skipDsnRouteHandler: true }); await page.goto(url); await page.locator('#go-background').click(); @@ -394,7 +394,7 @@ sentryTest( // error happens. sentryTest( '[buffer-mode] can sample on each error event', - async ({ getLocalTestPath, page, browserName, enableConsole }) => { + async ({ getLocalTestUrl, page, browserName, enableConsole }) => { if (shouldSkipReplayTest() || browserName === 'webkit') { sentryTest.skip(); } @@ -424,7 +424,7 @@ sentryTest( }); }); - const url = await getLocalTestPath({ testDir: __dirname, skipDsnRouteHandler: true }); + const url = await getLocalTestUrl({ testDir: __dirname, skipDsnRouteHandler: true }); await page.goto(url); // Start buffering and assert that it is enabled diff --git a/dev-packages/browser-integration-tests/suites/replay/bufferModeReload/test.ts b/dev-packages/browser-integration-tests/suites/replay/bufferModeReload/test.ts index 89c4f4d4f369..c26692196e2b 100644 --- a/dev-packages/browser-integration-tests/suites/replay/bufferModeReload/test.ts +++ b/dev-packages/browser-integration-tests/suites/replay/bufferModeReload/test.ts @@ -8,14 +8,14 @@ import { waitForReplayRunning, } from '../../../utils/replayHelpers'; -sentryTest('continues buffer session in session mode after error & reload', async ({ getLocalTestPath, page }) => { +sentryTest('continues buffer session in session mode after error & reload', async ({ getLocalTestUrl, page }) => { if (shouldSkipReplayTest()) { sentryTest.skip(); } const reqPromise1 = waitForReplayRequest(page, 0); - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); await page.goto(url); diff --git a/dev-packages/browser-integration-tests/suites/replay/captureComponentName/test.ts b/dev-packages/browser-integration-tests/suites/replay/captureComponentName/test.ts index 29c400f4288d..da97924804dc 100644 --- a/dev-packages/browser-integration-tests/suites/replay/captureComponentName/test.ts +++ b/dev-packages/browser-integration-tests/suites/replay/captureComponentName/test.ts @@ -3,14 +3,14 @@ import { expect } from '@playwright/test'; import { sentryTest } from '../../../utils/fixtures'; import { getCustomRecordingEvents, shouldSkipReplayTest, waitForReplayRequest } from '../../../utils/replayHelpers'; -sentryTest('captures component name attribute when available', async ({ forceFlushReplay, getLocalTestPath, page }) => { +sentryTest('captures component name attribute when available', async ({ forceFlushReplay, getLocalTestUrl, page }) => { if (shouldSkipReplayTest()) { sentryTest.skip(); } const reqPromise0 = waitForReplayRequest(page, 0); - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); await page.goto(url); await reqPromise0; @@ -80,14 +80,14 @@ sentryTest('captures component name attribute when available', async ({ forceFlu ]); }); -sentryTest('sets element name to component name attribute', async ({ forceFlushReplay, getLocalTestPath, page }) => { +sentryTest('sets element name to component name attribute', async ({ forceFlushReplay, getLocalTestUrl, page }) => { if (shouldSkipReplayTest()) { sentryTest.skip(); } const reqPromise0 = waitForReplayRequest(page, 0); - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); await page.goto(url); await reqPromise0; diff --git a/dev-packages/browser-integration-tests/suites/replay/captureConsoleLog/test.ts b/dev-packages/browser-integration-tests/suites/replay/captureConsoleLog/test.ts index b55b23c10f04..88693c7bdae1 100644 --- a/dev-packages/browser-integration-tests/suites/replay/captureConsoleLog/test.ts +++ b/dev-packages/browser-integration-tests/suites/replay/captureConsoleLog/test.ts @@ -3,14 +3,14 @@ import { expect } from '@playwright/test'; import { sentryTest } from '../../../utils/fixtures'; import { getCustomRecordingEvents, shouldSkipReplayTest, waitForReplayRequest } from '../../../utils/replayHelpers'; -sentryTest('should capture console messages in replay', async ({ getLocalTestPath, page, forceFlushReplay }) => { +sentryTest('should capture console messages in replay', async ({ getLocalTestUrl, page, forceFlushReplay }) => { if (shouldSkipReplayTest()) { sentryTest.skip(); } const reqPromise0 = waitForReplayRequest(page, 0); - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); await Promise.all([page.goto(url), reqPromise0]); @@ -46,14 +46,14 @@ sentryTest('should capture console messages in replay', async ({ getLocalTestPat ); }); -sentryTest('should capture very large console logs', async ({ getLocalTestPath, page, forceFlushReplay }) => { +sentryTest('should capture very large console logs', async ({ getLocalTestUrl, page, forceFlushReplay }) => { if (shouldSkipReplayTest()) { sentryTest.skip(); } const reqPromise0 = waitForReplayRequest(page, 0); - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); await Promise.all([page.goto(url), reqPromise0]); diff --git a/dev-packages/browser-integration-tests/suites/replay/captureReplayOffline/test.ts b/dev-packages/browser-integration-tests/suites/replay/captureReplayOffline/test.ts index f22abf0e3451..b8b30184b754 100644 --- a/dev-packages/browser-integration-tests/suites/replay/captureReplayOffline/test.ts +++ b/dev-packages/browser-integration-tests/suites/replay/captureReplayOffline/test.ts @@ -3,7 +3,7 @@ import { expect } from '@playwright/test'; import { sentryTest } from '../../../utils/fixtures'; import { getReplayEvent, shouldSkipReplayTest, waitForReplayRequest } from '../../../utils/replayHelpers'; -sentryTest('should capture replays offline', async ({ getLocalTestPath, page }) => { +sentryTest('should capture replays offline', async ({ getLocalTestUrl, page }) => { // makeBrowserOfflineTransport is not included in any CDN bundles if (shouldSkipReplayTest() || (process.env.PW_BUNDLE && process.env.PW_BUNDLE.startsWith('bundle'))) { sentryTest.skip(); @@ -12,7 +12,7 @@ sentryTest('should capture replays offline', async ({ getLocalTestPath, page }) const reqPromise0 = waitForReplayRequest(page, 0); const reqPromise1 = waitForReplayRequest(page, 1); - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); // This would be the obvious way to test offline support but it doesn't appear to work! // await context.setOffline(true); diff --git a/dev-packages/browser-integration-tests/suites/replay/compressionDisabled/test.ts b/dev-packages/browser-integration-tests/suites/replay/compressionDisabled/test.ts index a719bcd1d844..01c006f5643d 100644 --- a/dev-packages/browser-integration-tests/suites/replay/compressionDisabled/test.ts +++ b/dev-packages/browser-integration-tests/suites/replay/compressionDisabled/test.ts @@ -12,14 +12,14 @@ import { sentryTest( 'replay recording should allow to disable compression', - async ({ getLocalTestPath, page, forceFlushReplay }) => { + async ({ getLocalTestUrl, page, forceFlushReplay }) => { if (shouldSkipReplayTest()) { sentryTest.skip(); } const reqPromise0 = waitForReplayRequest(page, 0); - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); await page.goto(url); await forceFlushReplay(); diff --git a/dev-packages/browser-integration-tests/suites/replay/compressionEnabled/test.ts b/dev-packages/browser-integration-tests/suites/replay/compressionEnabled/test.ts index 753fe57a0c01..353a5cbb2227 100644 --- a/dev-packages/browser-integration-tests/suites/replay/compressionEnabled/test.ts +++ b/dev-packages/browser-integration-tests/suites/replay/compressionEnabled/test.ts @@ -10,14 +10,14 @@ import { waitForReplayRequest, } from '../../../utils/replayHelpers'; -sentryTest('replay recording should be compressed by default', async ({ getLocalTestPath, page, forceFlushReplay }) => { +sentryTest('replay recording should be compressed by default', async ({ getLocalTestUrl, page, forceFlushReplay }) => { if (shouldSkipReplayTest()) { sentryTest.skip(); } const reqPromise0 = waitForReplayRequest(page, 0); - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); await page.goto(url); await forceFlushReplay(); diff --git a/dev-packages/browser-integration-tests/suites/replay/customEvents/test.ts b/dev-packages/browser-integration-tests/suites/replay/customEvents/test.ts index 5c93870d0937..49449ca46209 100644 --- a/dev-packages/browser-integration-tests/suites/replay/customEvents/test.ts +++ b/dev-packages/browser-integration-tests/suites/replay/customEvents/test.ts @@ -23,7 +23,7 @@ import { sentryTest( 'replay recording should contain default performance spans', - async ({ getLocalTestPath, page, browserName }) => { + async ({ getLocalTestUrl, page, browserName }) => { // We only test this against the NPM package and replay bundles // and only on chromium as most performance entries are only available in chromium if (shouldSkipReplayTest() || browserName !== 'chromium') { @@ -33,7 +33,7 @@ sentryTest( const reqPromise0 = waitForReplayRequest(page, 0); const reqPromise1 = waitForReplayRequest(page, 1); - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); await page.goto(url); const replayEvent0 = getReplayEvent(await reqPromise0); @@ -76,7 +76,7 @@ sentryTest( sentryTest( 'replay recording should contain a click breadcrumb when a button is clicked', - async ({ forceFlushReplay, getLocalTestPath, page, browserName }) => { + async ({ forceFlushReplay, getLocalTestUrl, page, browserName }) => { // TODO(replay): This is flakey on webkit where clicks are flakey if (shouldSkipReplayTest() || browserName === 'webkit') { sentryTest.skip(); @@ -87,7 +87,7 @@ sentryTest( const reqPromise2 = waitForReplayRequest(page, 2); const reqPromise3 = waitForReplayRequest(page, 3); - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); await page.goto(url); await reqPromise0; @@ -173,7 +173,7 @@ sentryTest( sentryTest( 'replay recording should contain an "options" breadcrumb for Replay SDK configuration', - async ({ forceFlushReplay, getLocalTestPath, page, browserName }) => { + async ({ forceFlushReplay, getLocalTestUrl, page, browserName }) => { // TODO(replay): This is flakey on webkit where clicks are flakey if (shouldSkipReplayTest() || browserName === 'webkit') { sentryTest.skip(); @@ -182,7 +182,7 @@ sentryTest( const reqPromise0 = waitForReplayRequest(page, 0); const reqPromise1 = waitForReplayRequest(page, 1); - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); await page.goto(url); await forceFlushReplay(); diff --git a/dev-packages/browser-integration-tests/suites/replay/dsc/test.ts b/dev-packages/browser-integration-tests/suites/replay/dsc/test.ts index 62961caef062..e95653f3cadc 100644 --- a/dev-packages/browser-integration-tests/suites/replay/dsc/test.ts +++ b/dev-packages/browser-integration-tests/suites/replay/dsc/test.ts @@ -18,13 +18,13 @@ type TestWindow = Window & { sentryTest( 'should add replay_id to dsc of transactions when in session mode', - async ({ getLocalTestPath, page, browserName }) => { + async ({ getLocalTestUrl, page, browserName }) => { // This is flaky on webkit, so skipping there... if (shouldSkipReplayTest() || shouldSkipTracingTest() || browserName === 'webkit') { sentryTest.skip(); } - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); await page.goto(url); const transactionReq = waitForTransactionRequest(page); @@ -68,13 +68,13 @@ sentryTest( sentryTest( 'should not add replay_id to dsc of transactions when in buffer mode', - async ({ getLocalTestPath, page, browserName }) => { + async ({ getLocalTestUrl, page, browserName }) => { // This is flaky on webkit, so skipping there... if (shouldSkipReplayTest() || shouldSkipTracingTest() || browserName === 'webkit') { sentryTest.skip(); } - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); await page.goto(url); const transactionReq = waitForTransactionRequest(page); @@ -114,13 +114,13 @@ sentryTest( sentryTest( 'should add replay_id to dsc of transactions when switching from buffer to session mode', - async ({ getLocalTestPath, page, browserName }) => { + async ({ getLocalTestUrl, page, browserName }) => { // This is flaky on webkit, so skipping there... if (shouldSkipReplayTest() || shouldSkipTracingTest() || browserName === 'webkit') { sentryTest.skip(); } - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); await page.goto(url); const transactionReq = waitForTransactionRequest(page); @@ -167,13 +167,13 @@ sentryTest( sentryTest( 'should not add replay_id to dsc of transactions if replay is not enabled', - async ({ getLocalTestPath, page, browserName }) => { + async ({ getLocalTestUrl, page, browserName }) => { // This is flaky on webkit, so skipping there... if (shouldSkipReplayTest() || shouldSkipTracingTest() || browserName === 'webkit') { sentryTest.skip(); } - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); await page.goto(url); const transactionReq = waitForTransactionRequest(page); @@ -206,14 +206,14 @@ sentryTest( }, ); -sentryTest('should add replay_id to error DSC while replay is active', async ({ getLocalTestPath, page }) => { +sentryTest('should add replay_id to error DSC while replay is active', async ({ getLocalTestUrl, page }) => { if (shouldSkipReplayTest()) { sentryTest.skip(); } const hasTracing = !shouldSkipTracingTest(); - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); await page.goto(url); const error1Req = waitForErrorRequest(page, event => event.exception?.values?.[0].value === 'This is error #1'); diff --git a/dev-packages/browser-integration-tests/suites/replay/errorResponse/test.ts b/dev-packages/browser-integration-tests/suites/replay/errorResponse/test.ts index 048ca898d892..0811ecac90f3 100644 --- a/dev-packages/browser-integration-tests/suites/replay/errorResponse/test.ts +++ b/dev-packages/browser-integration-tests/suites/replay/errorResponse/test.ts @@ -8,7 +8,7 @@ import { waitForReplayRequest, } from '../../../utils/replayHelpers'; -sentryTest('should stop recording after receiving an error response', async ({ getLocalTestPath, page }) => { +sentryTest('should stop recording after receiving an error response', async ({ getLocalTestUrl, page }) => { if (shouldSkipReplayTest()) { sentryTest.skip(); } @@ -22,7 +22,7 @@ sentryTest('should stop recording after receiving an error response', async ({ g }); }); - const url = await getLocalTestPath({ testDir: __dirname, skipDsnRouteHandler: true }); + const url = await getLocalTestUrl({ testDir: __dirname, skipDsnRouteHandler: true }); await Promise.all([page.goto(url), waitForReplayRequest(page)]); await page.locator('button').click(); diff --git a/dev-packages/browser-integration-tests/suites/replay/errors/beforeErrorSampling/test.ts b/dev-packages/browser-integration-tests/suites/replay/errors/beforeErrorSampling/test.ts index 71cea051ce94..8c459d31b534 100644 --- a/dev-packages/browser-integration-tests/suites/replay/errors/beforeErrorSampling/test.ts +++ b/dev-packages/browser-integration-tests/suites/replay/errors/beforeErrorSampling/test.ts @@ -5,13 +5,13 @@ import { getReplaySnapshot, shouldSkipReplayTest, waitForReplayRunning } from '. sentryTest( '[error-mode] should not flush if error event is ignored in beforeErrorSampling', - async ({ getLocalTestPath, page, browserName, forceFlushReplay }) => { + async ({ getLocalTestUrl, page, browserName, forceFlushReplay }) => { // Skipping this in webkit because it is flakey there if (shouldSkipReplayTest() || browserName === 'webkit') { sentryTest.skip(); } - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); await page.goto(url); await waitForReplayRunning(page); diff --git a/dev-packages/browser-integration-tests/suites/replay/errors/droppedError/test.ts b/dev-packages/browser-integration-tests/suites/replay/errors/droppedError/test.ts index 2ae046bf6c58..58e0ffde9ee4 100644 --- a/dev-packages/browser-integration-tests/suites/replay/errors/droppedError/test.ts +++ b/dev-packages/browser-integration-tests/suites/replay/errors/droppedError/test.ts @@ -6,7 +6,7 @@ import { getReplaySnapshot, isReplayEvent, shouldSkipReplayTest } from '../../.. sentryTest( '[error-mode] should not start recording if an error occurred when the error was dropped', - async ({ getLocalTestPath, page, forceFlushReplay }) => { + async ({ getLocalTestUrl, page, forceFlushReplay }) => { if (shouldSkipReplayTest()) { sentryTest.skip(); } @@ -28,7 +28,7 @@ sentryTest( }); }); - const url = await getLocalTestPath({ testDir: __dirname, skipDsnRouteHandler: true }); + const url = await getLocalTestUrl({ testDir: __dirname, skipDsnRouteHandler: true }); await page.goto(url); await forceFlushReplay(); diff --git a/dev-packages/browser-integration-tests/suites/replay/errors/errorMode/test.ts b/dev-packages/browser-integration-tests/suites/replay/errors/errorMode/test.ts index 8eeb544d06ef..fe47856b276c 100644 --- a/dev-packages/browser-integration-tests/suites/replay/errors/errorMode/test.ts +++ b/dev-packages/browser-integration-tests/suites/replay/errors/errorMode/test.ts @@ -17,7 +17,7 @@ import { sentryTest( '[error-mode] should start recording and switch to session mode once an error is thrown', - async ({ getLocalTestPath, page, browserName }) => { + async ({ getLocalTestUrl, page, browserName }) => { // This was sometimes flaky on webkit, so skipping for now if (shouldSkipReplayTest() || browserName === 'webkit') { sentryTest.skip(); @@ -48,7 +48,7 @@ sentryTest( }); }); - const url = await getLocalTestPath({ testDir: __dirname, skipDsnRouteHandler: true }); + const url = await getLocalTestUrl({ testDir: __dirname, skipDsnRouteHandler: true }); await Promise.all([ page.goto(url), @@ -93,7 +93,7 @@ sentryTest( expect(content0.fullSnapshots).toHaveLength(1); // We don't know how many incremental snapshots we'll have (also browser-dependent), // but we know that we have at least 5 - expect(content0.incrementalSnapshots.length).toBeGreaterThan(5); + expect(content0.incrementalSnapshots.length).toBeGreaterThanOrEqual(5); // We want to make sure that the event that triggered the error was recorded. expect(content0.breadcrumbs).toEqual( expect.arrayContaining([ diff --git a/dev-packages/browser-integration-tests/suites/replay/errors/errorNotSent/test.ts b/dev-packages/browser-integration-tests/suites/replay/errors/errorNotSent/test.ts index 123ec1609a04..b43c00593e5a 100644 --- a/dev-packages/browser-integration-tests/suites/replay/errors/errorNotSent/test.ts +++ b/dev-packages/browser-integration-tests/suites/replay/errors/errorNotSent/test.ts @@ -5,7 +5,7 @@ import { getReplaySnapshot, shouldSkipReplayTest } from '../../../../utils/repla sentryTest( '[error-mode] should handle errors that result in API error response', - async ({ getLocalTestPath, page, forceFlushReplay }) => { + async ({ getLocalTestUrl, page, forceFlushReplay }) => { if (shouldSkipReplayTest()) { sentryTest.skip(); } @@ -21,7 +21,7 @@ sentryTest( }); }); - const url = await getLocalTestPath({ testDir: __dirname, skipDsnRouteHandler: true }); + const url = await getLocalTestUrl({ testDir: __dirname, skipDsnRouteHandler: true }); await page.goto(url); await forceFlushReplay(); diff --git a/dev-packages/browser-integration-tests/suites/replay/errors/errorsInSession/test.ts b/dev-packages/browser-integration-tests/suites/replay/errors/errorsInSession/test.ts index bc9453f58135..1b2af02ca2fb 100644 --- a/dev-packages/browser-integration-tests/suites/replay/errors/errorsInSession/test.ts +++ b/dev-packages/browser-integration-tests/suites/replay/errors/errorsInSession/test.ts @@ -12,7 +12,7 @@ import { sentryTest( '[session-mode] replay event should contain an error id of an error that occurred during session recording', - async ({ getLocalTestPath, page, browserName, forceFlushReplay }) => { + async ({ getLocalTestUrl, page, browserName, forceFlushReplay }) => { // Skipping this in webkit because it is flakey there if (shouldSkipReplayTest() || browserName === 'webkit') { sentryTest.skip(); @@ -37,7 +37,7 @@ sentryTest( }); }); - const url = await getLocalTestPath({ testDir: __dirname, skipDsnRouteHandler: true }); + const url = await getLocalTestUrl({ testDir: __dirname, skipDsnRouteHandler: true }); await page.goto(url); const req0 = await reqPromise0; @@ -85,7 +85,7 @@ sentryTest( sentryTest( '[session-mode] replay event should not contain an error id of a dropped error while recording', - async ({ getLocalTestPath, page, forceFlushReplay, browserName }) => { + async ({ getLocalTestUrl, page, forceFlushReplay, browserName }) => { // Skipping this in webkit because it is flakey there if (shouldSkipReplayTest() || browserName === 'webkit') { sentryTest.skip(); @@ -94,7 +94,7 @@ sentryTest( const reqPromise0 = waitForReplayRequest(page, 0); const reqPromise1 = waitForReplayRequest(page, 1); - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); await page.goto(url); await reqPromise0; diff --git a/dev-packages/browser-integration-tests/suites/replay/eventBufferError/test.ts b/dev-packages/browser-integration-tests/suites/replay/eventBufferError/test.ts index 0502cf8fdcc7..e9aeaef406c8 100644 --- a/dev-packages/browser-integration-tests/suites/replay/eventBufferError/test.ts +++ b/dev-packages/browser-integration-tests/suites/replay/eventBufferError/test.ts @@ -14,12 +14,12 @@ import { sentryTest( 'should stop recording when running into eventBuffer error', - async ({ getLocalTestPath, page, forceFlushReplay }) => { + async ({ getLocalTestUrl, page, forceFlushReplay }) => { if (shouldSkipReplayTest()) { sentryTest.skip(); } - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); await page.goto(url); await waitForReplayRequest(page); diff --git a/dev-packages/browser-integration-tests/suites/replay/exceptions/test.ts b/dev-packages/browser-integration-tests/suites/replay/exceptions/test.ts index 203550d55759..972ce990657f 100644 --- a/dev-packages/browser-integration-tests/suites/replay/exceptions/test.ts +++ b/dev-packages/browser-integration-tests/suites/replay/exceptions/test.ts @@ -3,12 +3,12 @@ import { expect } from '@playwright/test'; import { sentryTest } from '../../../utils/fixtures'; import { shouldSkipReplayTest } from '../../../utils/replayHelpers'; -sentryTest('exceptions within rrweb and re-thrown and annotated', async ({ getLocalTestPath, page, browserName }) => { +sentryTest('exceptions within rrweb and re-thrown and annotated', async ({ getLocalTestUrl, page, browserName }) => { if (shouldSkipReplayTest() || browserName !== 'chromium') { sentryTest.skip(); } - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); await page.goto(url); diff --git a/dev-packages/browser-integration-tests/suites/replay/fileInput/test.ts b/dev-packages/browser-integration-tests/suites/replay/fileInput/test.ts index 153ec956fa4b..0f41dade44f4 100644 --- a/dev-packages/browser-integration-tests/suites/replay/fileInput/test.ts +++ b/dev-packages/browser-integration-tests/suites/replay/fileInput/test.ts @@ -18,7 +18,7 @@ function isInputMutation( sentryTest( 'should not capture file input mutations', - async ({ forceFlushReplay, getLocalTestPath, page, browserName }) => { + async ({ forceFlushReplay, getLocalTestUrl, page, browserName }) => { // This seems to be flaky on webkit, so skipping there if (shouldSkipReplayTest() || browserName === 'webkit') { sentryTest.skip(); @@ -26,7 +26,7 @@ sentryTest( const reqPromise0 = waitForReplayRequest(page, 0); - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); await page.goto(url); diff --git a/dev-packages/browser-integration-tests/suites/replay/flushing/test.ts b/dev-packages/browser-integration-tests/suites/replay/flushing/test.ts index 52d72fb9a58a..959663a86fa0 100644 --- a/dev-packages/browser-integration-tests/suites/replay/flushing/test.ts +++ b/dev-packages/browser-integration-tests/suites/replay/flushing/test.ts @@ -12,7 +12,7 @@ import { getReplayEvent, shouldSkipReplayTest, waitForReplayRequest } from '../. * assert on the flush timestamps. Therefore we only assert that events were eventually * sent (i.e. flushed). */ -sentryTest('replay events are flushed after max flush delay was reached', async ({ getLocalTestPath, page }) => { +sentryTest('replay events are flushed after max flush delay was reached', async ({ getLocalTestUrl, page }) => { if (shouldSkipReplayTest()) { sentryTest.skip(); } @@ -21,7 +21,7 @@ sentryTest('replay events are flushed after max flush delay was reached', async const reqPromise1 = waitForReplayRequest(page, 1); const reqPromise2 = waitForReplayRequest(page, 2); - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); await page.goto(url); const replayEvent0 = getReplayEvent(await reqPromise0); diff --git a/dev-packages/browser-integration-tests/suites/replay/keyboardEvents/test.ts b/dev-packages/browser-integration-tests/suites/replay/keyboardEvents/test.ts index d23bfafea394..d06af4302d30 100644 --- a/dev-packages/browser-integration-tests/suites/replay/keyboardEvents/test.ts +++ b/dev-packages/browser-integration-tests/suites/replay/keyboardEvents/test.ts @@ -3,14 +3,14 @@ import { expect } from '@playwright/test'; import { sentryTest } from '../../../utils/fixtures'; import { getCustomRecordingEvents, shouldSkipReplayTest, waitForReplayRequest } from '../../../utils/replayHelpers'; -sentryTest('captures keyboard events', async ({ forceFlushReplay, getLocalTestPath, page }) => { +sentryTest('captures keyboard events', async ({ forceFlushReplay, getLocalTestUrl, page }) => { if (shouldSkipReplayTest()) { sentryTest.skip(); } const reqPromise0 = waitForReplayRequest(page, 0); - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); await page.goto(url); await reqPromise0; diff --git a/dev-packages/browser-integration-tests/suites/replay/largeMutations/defaultOptions/test.ts b/dev-packages/browser-integration-tests/suites/replay/largeMutations/defaultOptions/test.ts index 07f5362f4f7b..f15b154aeb1a 100644 --- a/dev-packages/browser-integration-tests/suites/replay/largeMutations/defaultOptions/test.ts +++ b/dev-packages/browser-integration-tests/suites/replay/largeMutations/defaultOptions/test.ts @@ -5,12 +5,12 @@ import { getReplayRecordingContent, shouldSkipReplayTest, waitForReplayRequest } sentryTest( 'handles large mutations with default options', - async ({ getLocalTestPath, page, forceFlushReplay, browserName }) => { + async ({ getLocalTestUrl, page, forceFlushReplay, browserName }) => { if (shouldSkipReplayTest() || browserName === 'webkit') { sentryTest.skip(); } - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); // We have to click in order to ensure the LCP is generated, leading to consistent results async function gotoPageAndClick() { diff --git a/dev-packages/browser-integration-tests/suites/replay/largeMutations/mutationLimit/test.ts b/dev-packages/browser-integration-tests/suites/replay/largeMutations/mutationLimit/test.ts index d86617396cf6..d31ce907f836 100644 --- a/dev-packages/browser-integration-tests/suites/replay/largeMutations/mutationLimit/test.ts +++ b/dev-packages/browser-integration-tests/suites/replay/largeMutations/mutationLimit/test.ts @@ -10,12 +10,12 @@ import { sentryTest( 'handles large mutations by stopping replay when `mutationLimit` configured', - async ({ getLocalTestPath, page, forceFlushReplay, browserName }) => { + async ({ getLocalTestUrl, page, forceFlushReplay, browserName }) => { if (shouldSkipReplayTest() || browserName === 'webkit') { sentryTest.skip(); } - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); // We have to click in order to ensure the LCP is generated, leading to consistent results async function gotoPageAndClick() { diff --git a/dev-packages/browser-integration-tests/suites/replay/logger/test.ts b/dev-packages/browser-integration-tests/suites/replay/logger/test.ts index e194c80f05c4..684709819e85 100644 --- a/dev-packages/browser-integration-tests/suites/replay/logger/test.ts +++ b/dev-packages/browser-integration-tests/suites/replay/logger/test.ts @@ -3,7 +3,7 @@ import { expect } from '@playwright/test'; import { sentryTest } from '../../../utils/fixtures'; import { shouldSkipReplayTest, waitForReplayRequest } from '../../../utils/replayHelpers'; -sentryTest('should output logger messages', async ({ getLocalTestPath, page }) => { +sentryTest('should output logger messages', async ({ getLocalTestUrl, page }) => { // In minified bundles we do not have logger messages, so we skip the test if (shouldSkipReplayTest() || (process.env.PW_BUNDLE || '').includes('_min')) { sentryTest.skip(); @@ -17,7 +17,7 @@ sentryTest('should output logger messages', async ({ getLocalTestPath, page }) = const reqPromise0 = waitForReplayRequest(page, 0); - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); await Promise.all([page.goto(url), reqPromise0]); diff --git a/dev-packages/browser-integration-tests/suites/replay/maxReplayDuration/test.ts b/dev-packages/browser-integration-tests/suites/replay/maxReplayDuration/test.ts index 538cc5f3aa20..dcfb69f2d7a2 100644 --- a/dev-packages/browser-integration-tests/suites/replay/maxReplayDuration/test.ts +++ b/dev-packages/browser-integration-tests/suites/replay/maxReplayDuration/test.ts @@ -6,7 +6,7 @@ import { getReplayEvent, shouldSkipReplayTest, waitForReplayRequest } from '../. const MAX_REPLAY_DURATION = 2000; -sentryTest('keeps track of max duration across reloads', async ({ getLocalTestPath, page }) => { +sentryTest('keeps track of max duration across reloads', async ({ getLocalTestUrl, page }) => { if (shouldSkipReplayTest()) { sentryTest.skip(); } @@ -14,7 +14,7 @@ sentryTest('keeps track of max duration across reloads', async ({ getLocalTestPa const reqPromise0 = waitForReplayRequest(page, 0); const reqPromise1 = waitForReplayRequest(page, 1); - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); await page.goto(url); diff --git a/dev-packages/browser-integration-tests/suites/replay/minReplayDuration/test.ts b/dev-packages/browser-integration-tests/suites/replay/minReplayDuration/test.ts index 967de1ecfe0f..6578c5d90183 100644 --- a/dev-packages/browser-integration-tests/suites/replay/minReplayDuration/test.ts +++ b/dev-packages/browser-integration-tests/suites/replay/minReplayDuration/test.ts @@ -6,7 +6,7 @@ import { getReplayEvent, shouldSkipReplayTest, waitForReplayRequest } from '../. const MIN_DURATION = 2000; -sentryTest('doest not send replay before min. duration', async ({ getLocalTestPath, page }) => { +sentryTest('doest not send replay before min. duration', async ({ getLocalTestUrl, page }) => { if (shouldSkipReplayTest()) { sentryTest.skip(); } @@ -17,7 +17,7 @@ sentryTest('doest not send replay before min. duration', async ({ getLocalTestPa return true; }); - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); await page.goto(url); diff --git a/dev-packages/browser-integration-tests/suites/replay/privacyBlock/test.ts b/dev-packages/browser-integration-tests/suites/replay/privacyBlock/test.ts index a6f40d884e8b..2c464c4575b4 100644 --- a/dev-packages/browser-integration-tests/suites/replay/privacyBlock/test.ts +++ b/dev-packages/browser-integration-tests/suites/replay/privacyBlock/test.ts @@ -8,14 +8,14 @@ import { waitForReplayRequest, } from '../../../utils/replayHelpers'; -sentryTest('should allow to manually block elements', async ({ getLocalTestPath, page }) => { +sentryTest('should allow to manually block elements', async ({ getLocalTestUrl, page }) => { if (shouldSkipReplayTest()) { sentryTest.skip(); } const reqPromise0 = waitForReplayRequest(page, 0); - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); await page.goto(url); const snapshots = getFullRecordingSnapshots(await reqPromise0); diff --git a/dev-packages/browser-integration-tests/suites/replay/privacyDefault/test.ts b/dev-packages/browser-integration-tests/suites/replay/privacyDefault/test.ts index 75ba5d2831c6..6fa046d6b103 100644 --- a/dev-packages/browser-integration-tests/suites/replay/privacyDefault/test.ts +++ b/dev-packages/browser-integration-tests/suites/replay/privacyDefault/test.ts @@ -8,14 +8,14 @@ import { waitForReplayRequest, } from '../../../utils/replayHelpers'; -sentryTest('should have the correct default privacy settings', async ({ getLocalTestPath, page }) => { +sentryTest('should have the correct default privacy settings', async ({ getLocalTestUrl, page }) => { if (shouldSkipReplayTest()) { sentryTest.skip(); } const reqPromise0 = waitForReplayRequest(page, 0); - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); await page.goto(url); diff --git a/dev-packages/browser-integration-tests/suites/replay/privacyInput/test.ts b/dev-packages/browser-integration-tests/suites/replay/privacyInput/test.ts index 19dddd68ec0c..4ebe4fee009b 100644 --- a/dev-packages/browser-integration-tests/suites/replay/privacyInput/test.ts +++ b/dev-packages/browser-integration-tests/suites/replay/privacyInput/test.ts @@ -19,7 +19,7 @@ function isInputMutation( sentryTest( 'should mask input initial value and its changes', - async ({ browserName, forceFlushReplay, getLocalTestPath, page }) => { + async ({ browserName, forceFlushReplay, getLocalTestUrl, page }) => { // TODO(replay): This is flakey on webkit (~1%) where we do not always get the latest mutation. if (shouldSkipReplayTest() || browserName === 'webkit') { sentryTest.skip(); @@ -54,7 +54,7 @@ sentryTest( return inputMutationSegmentIds.length === 2 && inputMutationSegmentIds[1] < event.segment_id; }); - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); await page.goto(url); @@ -84,7 +84,7 @@ sentryTest( sentryTest( 'should mask textarea initial value and its changes', - async ({ browserName, forceFlushReplay, getLocalTestPath, page }) => { + async ({ browserName, forceFlushReplay, getLocalTestUrl, page }) => { // TODO(replay): This is flakey on webkit (~1%) where we do not always get the latest mutation. if (shouldSkipReplayTest() || browserName === 'webkit') { sentryTest.skip(); @@ -131,7 +131,7 @@ sentryTest( return check; }); - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); await page.goto(url); const fullSnapshot = getFullRecordingSnapshots(await reqPromise0); diff --git a/dev-packages/browser-integration-tests/suites/replay/privacyInputMaskAll/test.ts b/dev-packages/browser-integration-tests/suites/replay/privacyInputMaskAll/test.ts index 7d64cd839d22..f5d36f6f5017 100644 --- a/dev-packages/browser-integration-tests/suites/replay/privacyInputMaskAll/test.ts +++ b/dev-packages/browser-integration-tests/suites/replay/privacyInputMaskAll/test.ts @@ -19,7 +19,7 @@ function isInputMutation( sentryTest( 'should mask input initial value and its changes from `maskAllInputs` and allow unmasked selector', - async ({ browserName, forceFlushReplay, getLocalTestPath, page }) => { + async ({ browserName, forceFlushReplay, getLocalTestUrl, page }) => { // TODO(replay): This is flakey on webkit (~1%) where we do not always get the latest mutation. if (shouldSkipReplayTest() || browserName === 'webkit') { sentryTest.skip(); @@ -46,7 +46,7 @@ sentryTest( ); }); - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); await page.goto(url); @@ -75,7 +75,7 @@ sentryTest( sentryTest( 'should mask textarea initial value and its changes from `maskAllInputs` and allow unmasked selector', - async ({ browserName, forceFlushReplay, getLocalTestPath, page }) => { + async ({ browserName, forceFlushReplay, getLocalTestUrl, page }) => { // TODO(replay): This is flakey on webkit (~1%) where we do not always get the latest mutation. if (shouldSkipReplayTest() || browserName === 'webkit') { sentryTest.skip(); @@ -102,7 +102,7 @@ sentryTest( ); }); - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); await page.goto(url); diff --git a/dev-packages/browser-integration-tests/suites/replay/replayIntegrationShim/test.ts b/dev-packages/browser-integration-tests/suites/replay/replayIntegrationShim/test.ts index 7eb84f7da310..a5f10c18d83f 100644 --- a/dev-packages/browser-integration-tests/suites/replay/replayIntegrationShim/test.ts +++ b/dev-packages/browser-integration-tests/suites/replay/replayIntegrationShim/test.ts @@ -4,7 +4,7 @@ import { sentryTest } from '../../../utils/fixtures'; sentryTest( 'exports a shim replayIntegration integration for non-replay bundles', - async ({ getLocalTestPath, page, forceFlushReplay }) => { + async ({ getLocalTestUrl, page, forceFlushReplay }) => { const bundle = process.env.PW_BUNDLE; if (!bundle || !bundle.startsWith('bundle_') || bundle.includes('replay')) { @@ -24,7 +24,7 @@ sentryTest( }); }); - const url = await getLocalTestPath({ testDir: __dirname, skipDsnRouteHandler: true }); + const url = await getLocalTestUrl({ testDir: __dirname, skipDsnRouteHandler: true }); await page.goto(url); await forceFlushReplay(); diff --git a/dev-packages/browser-integration-tests/suites/replay/replayShim/test.ts b/dev-packages/browser-integration-tests/suites/replay/replayShim/test.ts index 8d3b7bab9aa0..7df2ab111f3f 100644 --- a/dev-packages/browser-integration-tests/suites/replay/replayShim/test.ts +++ b/dev-packages/browser-integration-tests/suites/replay/replayShim/test.ts @@ -4,7 +4,7 @@ import { sentryTest } from '../../../utils/fixtures'; sentryTest( 'exports a shim Replay integration for non-replay bundles', - async ({ getLocalTestPath, page, forceFlushReplay }) => { + async ({ getLocalTestUrl, page, forceFlushReplay }) => { const bundle = process.env.PW_BUNDLE; if (!bundle || !bundle.startsWith('bundle_') || bundle.includes('replay')) { @@ -24,7 +24,7 @@ sentryTest( }); }); - const url = await getLocalTestPath({ testDir: __dirname, skipDsnRouteHandler: true }); + const url = await getLocalTestUrl({ testDir: __dirname, skipDsnRouteHandler: true }); await page.goto(url); await forceFlushReplay(); diff --git a/dev-packages/browser-integration-tests/suites/replay/requests/test.ts b/dev-packages/browser-integration-tests/suites/replay/requests/test.ts index eedfb5ae5fb2..efb344382b69 100644 --- a/dev-packages/browser-integration-tests/suites/replay/requests/test.ts +++ b/dev-packages/browser-integration-tests/suites/replay/requests/test.ts @@ -4,7 +4,7 @@ import { sentryTest } from '../../../utils/fixtures'; import { expectedFetchPerformanceSpan, expectedXHRPerformanceSpan } from '../../../utils/replayEventTemplates'; import { getReplayRecordingContent, shouldSkipReplayTest, waitForReplayRequest } from '../../../utils/replayHelpers'; -sentryTest('replay recording should contain fetch request span', async ({ getLocalTestPath, page, browserName }) => { +sentryTest('replay recording should contain fetch request span', async ({ getLocalTestUrl, page, browserName }) => { // Possibly related: https://github.com/microsoft/playwright/issues/11390 if (shouldSkipReplayTest() || browserName === 'webkit') { sentryTest.skip(); @@ -21,7 +21,7 @@ sentryTest('replay recording should contain fetch request span', async ({ getLoc const reqPromise0 = waitForReplayRequest(page, 0); const reqPromise1 = waitForReplayRequest(page, 1); - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); const [req0] = await Promise.all([reqPromise0, page.goto(url), page.locator('#go-background').click()]); @@ -35,7 +35,7 @@ sentryTest('replay recording should contain fetch request span', async ({ getLoc expect(performanceSpans).toContainEqual(expectedFetchPerformanceSpan); }); -sentryTest('replay recording should contain XHR request span', async ({ getLocalTestPath, page, browserName }) => { +sentryTest('replay recording should contain XHR request span', async ({ getLocalTestUrl, page, browserName }) => { if (shouldSkipReplayTest() || browserName === 'webkit') { sentryTest.skip(); } @@ -51,7 +51,7 @@ sentryTest('replay recording should contain XHR request span', async ({ getLocal const reqPromise0 = waitForReplayRequest(page, 0); const reqPromise1 = waitForReplayRequest(page, 1); - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); const [req0] = await Promise.all([reqPromise0, page.goto(url), page.locator('#go-background').click()]); diff --git a/dev-packages/browser-integration-tests/suites/replay/sampling/test.ts b/dev-packages/browser-integration-tests/suites/replay/sampling/test.ts index cc68be486749..be9fd3150cda 100644 --- a/dev-packages/browser-integration-tests/suites/replay/sampling/test.ts +++ b/dev-packages/browser-integration-tests/suites/replay/sampling/test.ts @@ -3,7 +3,7 @@ import { expect } from '@playwright/test'; import { sentryTest } from '../../../utils/fixtures'; import { getReplaySnapshot, shouldSkipReplayTest } from '../../../utils/replayHelpers'; -sentryTest('should not send replays if both sample rates are 0', async ({ getLocalTestPath, page }) => { +sentryTest('should not send replays if both sample rates are 0', async ({ getLocalTestUrl, page }) => { if (shouldSkipReplayTest()) { sentryTest.skip(); } @@ -19,7 +19,7 @@ sentryTest('should not send replays if both sample rates are 0', async ({ getLoc }); }); - const url = await getLocalTestPath({ testDir: __dirname, skipDsnRouteHandler: true }); + const url = await getLocalTestUrl({ testDir: __dirname, skipDsnRouteHandler: true }); await page.goto(url); await page.locator('button').click(); diff --git a/dev-packages/browser-integration-tests/suites/replay/sessionExpiry/test.ts b/dev-packages/browser-integration-tests/suites/replay/sessionExpiry/test.ts index 49a95345fc43..79c7758ec099 100644 --- a/dev-packages/browser-integration-tests/suites/replay/sessionExpiry/test.ts +++ b/dev-packages/browser-integration-tests/suites/replay/sessionExpiry/test.ts @@ -14,7 +14,7 @@ import { // Session should expire after 2s - keep in sync with init.js const SESSION_TIMEOUT = 2000; -sentryTest('handles an expired session', async ({ browserName, forceFlushReplay, getLocalTestPath, page }) => { +sentryTest('handles an expired session', async ({ browserName, forceFlushReplay, getLocalTestUrl, page }) => { if (shouldSkipReplayTest() || browserName === 'webkit') { sentryTest.skip(); } @@ -22,7 +22,7 @@ sentryTest('handles an expired session', async ({ browserName, forceFlushReplay, const reqPromise0 = waitForReplayRequest(page, 0); const reqPromise1 = waitForReplayRequest(page, 1); - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); await page.goto(url); const req0 = await reqPromise0; diff --git a/dev-packages/browser-integration-tests/suites/replay/sessionInactive/test.ts b/dev-packages/browser-integration-tests/suites/replay/sessionInactive/test.ts index 0ac765c3a969..2f346c05962f 100644 --- a/dev-packages/browser-integration-tests/suites/replay/sessionInactive/test.ts +++ b/dev-packages/browser-integration-tests/suites/replay/sessionInactive/test.ts @@ -14,7 +14,7 @@ import { // Session should be paused after 2s - keep in sync with init.js const SESSION_PAUSED = 2000; -sentryTest('handles an inactive session', async ({ getLocalTestPath, page, browserName }) => { +sentryTest('handles an inactive session', async ({ getLocalTestUrl, page, browserName }) => { // webkit is a bit flakey here, the ids are sometimes off by , so seems like there is a race condition with checkout? if (shouldSkipReplayTest() || browserName === 'webkit') { @@ -23,7 +23,7 @@ sentryTest('handles an inactive session', async ({ getLocalTestPath, page, brows const reqPromise0 = waitForReplayRequest(page, 0); - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); await page.goto(url); const req0 = await reqPromise0; diff --git a/dev-packages/browser-integration-tests/suites/replay/sessionMaxAge/test.ts b/dev-packages/browser-integration-tests/suites/replay/sessionMaxAge/test.ts index d658f407009c..92c917562ec4 100644 --- a/dev-packages/browser-integration-tests/suites/replay/sessionMaxAge/test.ts +++ b/dev-packages/browser-integration-tests/suites/replay/sessionMaxAge/test.ts @@ -18,7 +18,7 @@ const MAX_REPLAY_DURATION = 4000; The main difference between this and sessionExpiry test, is that here we wait for the overall time (4s) in multiple steps (2s, 2s) instead of waiting for the whole time at once (4s). */ -sentryTest('handles session that exceeds max age', async ({ forceFlushReplay, getLocalTestPath, page }) => { +sentryTest('handles session that exceeds max age', async ({ forceFlushReplay, getLocalTestUrl, page }) => { if (shouldSkipReplayTest()) { sentryTest.skip(); } @@ -26,7 +26,7 @@ sentryTest('handles session that exceeds max age', async ({ forceFlushReplay, ge const reqPromise0 = waitForReplayRequest(page, 0); const reqPromise1 = waitForReplayRequest(page, 1); - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); await page.goto(url); diff --git a/dev-packages/browser-integration-tests/suites/replay/unicode/compressed/test.ts b/dev-packages/browser-integration-tests/suites/replay/unicode/compressed/test.ts index fd8250fe86ad..3e362b38d49a 100644 --- a/dev-packages/browser-integration-tests/suites/replay/unicode/compressed/test.ts +++ b/dev-packages/browser-integration-tests/suites/replay/unicode/compressed/test.ts @@ -8,14 +8,14 @@ import { waitForReplayRequest, } from '../../../../utils/replayHelpers'; -sentryTest('replay should handle unicode characters', async ({ getLocalTestPath, page }) => { +sentryTest('replay should handle unicode characters', async ({ getLocalTestUrl, page }) => { if (shouldSkipReplayTest()) { sentryTest.skip(); } const reqPromise0 = waitForReplayRequest(page, 0); - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); await page.goto(url); const snapshots = getFullRecordingSnapshots(await reqPromise0); diff --git a/dev-packages/browser-integration-tests/suites/replay/unicode/uncompressed/test.ts b/dev-packages/browser-integration-tests/suites/replay/unicode/uncompressed/test.ts index 782d44702c34..679f83362ed2 100644 --- a/dev-packages/browser-integration-tests/suites/replay/unicode/uncompressed/test.ts +++ b/dev-packages/browser-integration-tests/suites/replay/unicode/uncompressed/test.ts @@ -8,14 +8,14 @@ import { waitForReplayRequest, } from '../../../../utils/replayHelpers'; -sentryTest('replay should handle unicode characters', async ({ getLocalTestPath, page }) => { +sentryTest('replay should handle unicode characters', async ({ getLocalTestUrl, page }) => { if (shouldSkipReplayTest()) { sentryTest.skip(); } const reqPromise0 = waitForReplayRequest(page, 0); - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); await page.goto(url); const snapshots = getFullRecordingSnapshots(await reqPromise0); diff --git a/dev-packages/browser-integration-tests/suites/sessions/initial-scope/test.ts b/dev-packages/browser-integration-tests/suites/sessions/initial-scope/test.ts index e140cf14ebea..985977a3f0a5 100644 --- a/dev-packages/browser-integration-tests/suites/sessions/initial-scope/test.ts +++ b/dev-packages/browser-integration-tests/suites/sessions/initial-scope/test.ts @@ -5,8 +5,8 @@ import type { SessionContext } from '@sentry/types'; import { sentryTest } from '../../../utils/fixtures'; import { getFirstSentryEnvelopeRequest } from '../../../utils/helpers'; -sentryTest('should start a new session on pageload.', async ({ getLocalTestPath, page }) => { - const url = await getLocalTestPath({ testDir: __dirname }); +sentryTest('should start a new session on pageload.', async ({ getLocalTestUrl, page }) => { + const url = await getLocalTestUrl({ testDir: __dirname }); const session = await getFirstSentryEnvelopeRequest(page, url); expect(session).toBeDefined(); diff --git a/dev-packages/browser-integration-tests/suites/sessions/start-session/test.ts b/dev-packages/browser-integration-tests/suites/sessions/start-session/test.ts index 6dffb1f85902..8a8243d81257 100644 --- a/dev-packages/browser-integration-tests/suites/sessions/start-session/test.ts +++ b/dev-packages/browser-integration-tests/suites/sessions/start-session/test.ts @@ -5,8 +5,8 @@ import type { SessionContext } from '@sentry/types'; import { sentryTest } from '../../../utils/fixtures'; import { getFirstSentryEnvelopeRequest } from '../../../utils/helpers'; -sentryTest('should start a new session on pageload.', async ({ getLocalTestPath, page }) => { - const url = await getLocalTestPath({ testDir: __dirname }); +sentryTest('should start a new session on pageload.', async ({ getLocalTestUrl, page }) => { + const url = await getLocalTestUrl({ testDir: __dirname }); const session = await getFirstSentryEnvelopeRequest(page, url); expect(session).toBeDefined(); diff --git a/dev-packages/browser-integration-tests/suites/sessions/update-session/test.ts b/dev-packages/browser-integration-tests/suites/sessions/update-session/test.ts index 422d716db9e6..966b133dded1 100644 --- a/dev-packages/browser-integration-tests/suites/sessions/update-session/test.ts +++ b/dev-packages/browser-integration-tests/suites/sessions/update-session/test.ts @@ -4,8 +4,8 @@ import type { SessionContext } from '@sentry/types'; import { sentryTest } from '../../../utils/fixtures'; import { getFirstSentryEnvelopeRequest } from '../../../utils/helpers'; -sentryTest('should update session when an error is thrown.', async ({ getLocalTestPath, page }) => { - const url = await getLocalTestPath({ testDir: __dirname }); +sentryTest('should update session when an error is thrown.', async ({ getLocalTestUrl, page }) => { + const url = await getLocalTestUrl({ testDir: __dirname }); const pageloadSession = await getFirstSentryEnvelopeRequest(page, url); const updatedSession = ( await Promise.all([page.locator('#throw-error').click(), getFirstSentryEnvelopeRequest(page)]) @@ -21,8 +21,8 @@ sentryTest('should update session when an error is thrown.', async ({ getLocalTe expect(pageloadSession.sid).toBe(updatedSession.sid); }); -sentryTest('should update session when an exception is captured.', async ({ getLocalTestPath, page }) => { - const url = await getLocalTestPath({ testDir: __dirname }); +sentryTest('should update session when an exception is captured.', async ({ getLocalTestUrl, page }) => { + const url = await getLocalTestUrl({ testDir: __dirname }); const pageloadSession = await getFirstSentryEnvelopeRequest(page, url); const updatedSession = ( diff --git a/dev-packages/browser-integration-tests/suites/sessions/v7-hub-start-session/test.ts b/dev-packages/browser-integration-tests/suites/sessions/v7-hub-start-session/test.ts index 6dffb1f85902..8a8243d81257 100644 --- a/dev-packages/browser-integration-tests/suites/sessions/v7-hub-start-session/test.ts +++ b/dev-packages/browser-integration-tests/suites/sessions/v7-hub-start-session/test.ts @@ -5,8 +5,8 @@ import type { SessionContext } from '@sentry/types'; import { sentryTest } from '../../../utils/fixtures'; import { getFirstSentryEnvelopeRequest } from '../../../utils/helpers'; -sentryTest('should start a new session on pageload.', async ({ getLocalTestPath, page }) => { - const url = await getLocalTestPath({ testDir: __dirname }); +sentryTest('should start a new session on pageload.', async ({ getLocalTestUrl, page }) => { + const url = await getLocalTestUrl({ testDir: __dirname }); const session = await getFirstSentryEnvelopeRequest(page, url); expect(session).toBeDefined(); diff --git a/dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/async-spans/test.ts b/dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/async-spans/test.ts index b79483149fd1..c9ffb2580615 100644 --- a/dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/async-spans/test.ts +++ b/dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/async-spans/test.ts @@ -11,12 +11,12 @@ type WindowWithSpan = Window & { sentryTest( 'async spans with different durations lead to unexpected behavior in browser (no "asynchronous context tracking")', - async ({ getLocalTestPath, page }) => { + async ({ getLocalTestUrl, page }) => { if (shouldSkipTracingTest()) { sentryTest.skip(); } - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); await page.goto(url); const envelope = await getFirstSentryEnvelopeRequest(page); diff --git a/dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/backgroundtab-custom/test.ts b/dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/backgroundtab-custom/test.ts index 1e56b405f579..2997f614aa26 100644 --- a/dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/backgroundtab-custom/test.ts +++ b/dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/backgroundtab-custom/test.ts @@ -4,12 +4,12 @@ import type { SpanJSON } from '@sentry/types'; import { sentryTest } from '../../../../utils/fixtures'; import { shouldSkipTracingTest } from '../../../../utils/helpers'; -sentryTest('should finish a custom transaction when the page goes background', async ({ getLocalTestPath, page }) => { +sentryTest('should finish a custom transaction when the page goes background', async ({ getLocalTestUrl, page }) => { if (shouldSkipTracingTest()) { sentryTest.skip(); } - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); await page.goto(url); await page.locator('#start-span').click(); diff --git a/dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/backgroundtab-pageload/test.ts b/dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/backgroundtab-pageload/test.ts index 1feda2e850e5..0dcd11ee0159 100644 --- a/dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/backgroundtab-pageload/test.ts +++ b/dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/backgroundtab-pageload/test.ts @@ -4,11 +4,11 @@ import type { Event } from '@sentry/types'; import { sentryTest } from '../../../../utils/fixtures'; import { getFirstSentryEnvelopeRequest, shouldSkipTracingTest } from '../../../../utils/helpers'; -sentryTest('should finish pageload transaction when the page goes background', async ({ getLocalTestPath, page }) => { +sentryTest('should finish pageload transaction when the page goes background', async ({ getLocalTestUrl, page }) => { if (shouldSkipTracingTest()) { sentryTest.skip(); } - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); await page.goto(url); await page.locator('#go-background').click(); diff --git a/dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/error/test.ts b/dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/error/test.ts index 7eaab8b2872e..3dbc9a90307c 100644 --- a/dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/error/test.ts +++ b/dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/error/test.ts @@ -9,7 +9,7 @@ import { sentryTest( 'should put the pageload transaction name onto an error event caught during pageload', - async ({ getLocalTestPath, page, browserName }) => { + async ({ getLocalTestUrl, page, browserName }) => { if (browserName === 'webkit') { // This test fails on Webkit as errors thrown from `runScriptInSandbox` are Script Errors and skipped by Sentry sentryTest.skip(); @@ -19,7 +19,7 @@ sentryTest( sentryTest.skip(); } - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); await page.goto(url); diff --git a/dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/http-timings/test.ts b/dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/http-timings/test.ts index a8e7f9eec335..8d6e9124a86e 100644 --- a/dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/http-timings/test.ts +++ b/dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/http-timings/test.ts @@ -4,7 +4,7 @@ import type { Event } from '@sentry/types'; import { sentryTest } from '../../../../utils/fixtures'; import { getMultipleSentryEnvelopeRequests, shouldSkipTracingTest } from '../../../../utils/helpers'; -sentryTest('should create fetch spans with http timing @firefox', async ({ browserName, getLocalTestPath, page }) => { +sentryTest('should create fetch spans with http timing @firefox', async ({ browserName, getLocalTestUrl, page }) => { const supportedBrowsers = ['chromium', 'firefox']; if (shouldSkipTracingTest() || !supportedBrowsers.includes(browserName)) { @@ -21,7 +21,7 @@ sentryTest('should create fetch spans with http timing @firefox', async ({ brows }); }); - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); const envelopes = await getMultipleSentryEnvelopeRequests(page, 2, { url, timeout: 10000 }); const tracingEvent = envelopes[envelopes.length - 1]; // last envelope contains tracing data on all browsers diff --git a/dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/interactions/test.ts b/dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/interactions/test.ts index 4ebea3457af6..0bf03d3576ff 100644 --- a/dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/interactions/test.ts +++ b/dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/interactions/test.ts @@ -8,13 +8,13 @@ import { shouldSkipTracingTest, } from '../../../../utils/helpers'; -sentryTest('should capture interaction transaction. @firefox', async ({ browserName, getLocalTestPath, page }) => { +sentryTest('should capture interaction transaction. @firefox', async ({ browserName, getLocalTestUrl, page }) => { const supportedBrowsers = ['chromium', 'firefox']; if (shouldSkipTracingTest() || !supportedBrowsers.includes(browserName)) { sentryTest.skip(); } - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); await page.goto(url); await getFirstSentryEnvelopeRequest(page); @@ -49,14 +49,14 @@ sentryTest('should capture interaction transaction. @firefox', async ({ browserN sentryTest( 'should create only one transaction per interaction @firefox', - async ({ browserName, getLocalTestPath, page }) => { + async ({ browserName, getLocalTestUrl, page }) => { const supportedBrowsers = ['chromium', 'firefox']; if (shouldSkipTracingTest() || !supportedBrowsers.includes(browserName)) { sentryTest.skip(); } - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); await page.goto(url); await getFirstSentryEnvelopeRequest(page); @@ -73,14 +73,14 @@ sentryTest( sentryTest( 'should use the component name for a clicked element when it is available', - async ({ browserName, getLocalTestPath, page }) => { + async ({ browserName, getLocalTestUrl, page }) => { const supportedBrowsers = ['chromium', 'firefox']; if (shouldSkipTracingTest() || !supportedBrowsers.includes(browserName)) { sentryTest.skip(); } - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); await page.goto(url); await getFirstSentryEnvelopeRequest(page); @@ -103,14 +103,14 @@ sentryTest( sentryTest( 'should use the element name for a clicked element when no component name', - async ({ browserName, getLocalTestPath, page }) => { + async ({ browserName, getLocalTestUrl, page }) => { const supportedBrowsers = ['chromium', 'firefox']; if (shouldSkipTracingTest() || !supportedBrowsers.includes(browserName)) { sentryTest.skip(); } - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); await page.goto(url); await getFirstSentryEnvelopeRequest(page); diff --git a/dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/long-animation-frame-before-navigation/test.ts b/dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/long-animation-frame-before-navigation/test.ts index e6fb88232d63..a4804d0ff309 100644 --- a/dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/long-animation-frame-before-navigation/test.ts +++ b/dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/long-animation-frame-before-navigation/test.ts @@ -6,13 +6,13 @@ import { getFirstSentryEnvelopeRequest, shouldSkipTracingTest } from '../../../. sentryTest( "doesn't capture long animation frame that starts before a navigation.", - async ({ browserName, getLocalTestPath, page }) => { + async ({ browserName, getLocalTestUrl, page }) => { // Long animation frames only work on chrome if (shouldSkipTracingTest() || browserName !== 'chromium') { sentryTest.skip(); } - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); await page.goto(url); diff --git a/dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/long-animation-frame-disabled/test.ts b/dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/long-animation-frame-disabled/test.ts index 2527d5a67302..a0a263762186 100644 --- a/dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/long-animation-frame-disabled/test.ts +++ b/dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/long-animation-frame-disabled/test.ts @@ -7,7 +7,7 @@ import { getFirstSentryEnvelopeRequest, shouldSkipTracingTest } from '../../../. sentryTest( 'should not capture long animation frame when flag is disabled.', - async ({ browserName, getLocalTestPath, page }) => { + async ({ browserName, getLocalTestUrl, page }) => { // Long animation frames only work on chrome if (shouldSkipTracingTest() || browserName !== 'chromium') { sentryTest.skip(); @@ -17,7 +17,7 @@ sentryTest( route.fulfill({ path: `${__dirname}/assets/script.js` }), ); - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); const eventData = await getFirstSentryEnvelopeRequest(page, url); const uiSpans = eventData.spans?.filter(({ op }) => op?.startsWith('ui')); diff --git a/dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/long-animation-frame-enabled/test.ts b/dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/long-animation-frame-enabled/test.ts index 850e75dbed1f..b2729a70f4cf 100644 --- a/dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/long-animation-frame-enabled/test.ts +++ b/dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/long-animation-frame-enabled/test.ts @@ -8,7 +8,7 @@ import { getFirstSentryEnvelopeRequest, shouldSkipTracingTest } from '../../../. sentryTest( 'should capture long animation frame for top-level script.', - async ({ browserName, getLocalTestPath, page }) => { + async ({ browserName, getLocalTestUrl, page }) => { // Long animation frames only work on chrome if (shouldSkipTracingTest() || browserName !== 'chromium') { sentryTest.skip(); @@ -18,7 +18,7 @@ sentryTest( route.fulfill({ path: `${__dirname}/assets/script.js` }), ); - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); const promise = getFirstSentryEnvelopeRequest(page); @@ -30,9 +30,11 @@ sentryTest( const uiSpans = eventData.spans?.filter(({ op }) => op?.startsWith('ui.long-animation-frame')); - expect(uiSpans?.length).toEqual(1); + expect(uiSpans?.length).toBeGreaterThanOrEqual(1); - const [topLevelUISpan] = uiSpans || []; + const topLevelUISpan = (uiSpans || []).find( + span => span.data?.['browser.script.invoker'] === 'https://example.com/path/to/script.js', + )!; expect(topLevelUISpan).toEqual( expect.objectContaining({ op: 'ui.long-animation-frame', @@ -59,7 +61,7 @@ sentryTest( sentryTest( 'should capture long animation frame for event listener.', - async ({ browserName, getLocalTestPath, page }) => { + async ({ browserName, getLocalTestUrl, page }) => { // Long animation frames only work on chrome if (shouldSkipTracingTest() || browserName !== 'chromium') { sentryTest.skip(); @@ -69,7 +71,7 @@ sentryTest( route.fulfill({ path: `${__dirname}/assets/script.js` }), ); - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); const promise = getFirstSentryEnvelopeRequest(page); @@ -84,10 +86,11 @@ sentryTest( const uiSpans = eventData.spans?.filter(({ op }) => op?.startsWith('ui.long-animation-frame')); - expect(uiSpans?.length).toEqual(2); + expect(uiSpans?.length).toBeGreaterThanOrEqual(2); - // ignore the first ui span (top-level long animation frame) - const [, eventListenerUISpan] = uiSpans || []; + const eventListenerUISpan = (uiSpans || []).find( + span => span.data?.['browser.script.invoker'] === 'BUTTON#clickme.onclick', + )!; expect(eventListenerUISpan).toEqual( expect.objectContaining({ diff --git a/dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/long-animation-frame-non-chromium/test.ts b/dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/long-animation-frame-non-chromium/test.ts index 65fb6664ac82..56d0456e9a2a 100644 --- a/dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/long-animation-frame-non-chromium/test.ts +++ b/dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/long-animation-frame-non-chromium/test.ts @@ -7,7 +7,7 @@ import { getFirstSentryEnvelopeRequest, shouldSkipTracingTest } from '../../../. sentryTest( 'should not capture long animation frame or long task when browser is non-chromium', - async ({ browserName, getLocalTestPath, page }) => { + async ({ browserName, getLocalTestUrl, page }) => { // Only test non-chromium browsers if (shouldSkipTracingTest() || browserName === 'chromium') { sentryTest.skip(); @@ -17,7 +17,7 @@ sentryTest( route.fulfill({ path: `${__dirname}/assets/script.js` }), ); - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); const eventData = await getFirstSentryEnvelopeRequest(page, url); const uiSpans = eventData.spans?.filter(({ op }) => op?.startsWith('ui')); diff --git a/dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/long-tasks-and-animation-frame-enabled/test.ts b/dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/long-tasks-and-animation-frame-enabled/test.ts index 1949e44bd398..a3ad1e98a069 100644 --- a/dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/long-tasks-and-animation-frame-enabled/test.ts +++ b/dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/long-tasks-and-animation-frame-enabled/test.ts @@ -8,7 +8,7 @@ import { getFirstSentryEnvelopeRequest, shouldSkipTracingTest } from '../../../. sentryTest( 'should capture long animation frame for top-level script.', - async ({ browserName, getLocalTestPath, page }) => { + async ({ browserName, getLocalTestUrl, page }) => { // Long animation frames only work on chrome if (shouldSkipTracingTest() || browserName !== 'chromium') { sentryTest.skip(); @@ -20,7 +20,7 @@ sentryTest( route.fulfill({ path: `${__dirname}/assets/script.js` }), ); - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); const promise = getFirstSentryEnvelopeRequest(page); @@ -32,9 +32,11 @@ sentryTest( const uiSpans = eventData.spans?.filter(({ op }) => op?.startsWith('ui.long-animation-frame')); - expect(uiSpans?.length).toEqual(1); + expect(uiSpans?.length).toBeGreaterThanOrEqual(1); - const [topLevelUISpan] = uiSpans || []; + const topLevelUISpan = (uiSpans || []).find( + span => span.data?.['browser.script.invoker'] === 'https://example.com/path/to/script.js', + )!; expect(topLevelUISpan).toEqual( expect.objectContaining({ op: 'ui.long-animation-frame', @@ -61,7 +63,7 @@ sentryTest( sentryTest( 'should capture long animation frame for event listener.', - async ({ browserName, getLocalTestPath, page }) => { + async ({ browserName, getLocalTestUrl, page }) => { // Long animation frames only work on chrome if (shouldSkipTracingTest() || browserName !== 'chromium') { sentryTest.skip(); @@ -71,7 +73,7 @@ sentryTest( route.fulfill({ path: `${__dirname}/assets/script.js` }), ); - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); const promise = getFirstSentryEnvelopeRequest(page); @@ -86,10 +88,11 @@ sentryTest( const uiSpans = eventData.spans?.filter(({ op }) => op?.startsWith('ui.long-animation-frame')); - expect(uiSpans?.length).toEqual(2); + expect(uiSpans?.length).toBeGreaterThanOrEqual(2); - // ignore the first ui span (top-level long animation frame) - const [, eventListenerUISpan] = uiSpans || []; + const eventListenerUISpan = (uiSpans || []).find( + span => span.data?.['browser.script.invoker'] === 'BUTTON#clickme.onclick', + )!; expect(eventListenerUISpan).toEqual( expect.objectContaining({ diff --git a/dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/long-tasks-before-navigation/test.ts b/dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/long-tasks-before-navigation/test.ts index d7504eba840c..a2ac2817b853 100644 --- a/dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/long-tasks-before-navigation/test.ts +++ b/dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/long-tasks-before-navigation/test.ts @@ -6,12 +6,12 @@ import { getFirstSentryEnvelopeRequest, shouldSkipTracingTest } from '../../../. sentryTest( "doesn't capture long task spans starting before a navigation in the navigation transaction", - async ({ browserName, getLocalTestPath, page }) => { + async ({ browserName, getLocalTestUrl, page }) => { // Long tasks only work on chrome if (shouldSkipTracingTest() || browserName !== 'chromium') { sentryTest.skip(); } - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); await page.goto(url); diff --git a/dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/long-tasks-disabled/test.ts b/dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/long-tasks-disabled/test.ts index 6dab208d1c4e..47d212e44119 100644 --- a/dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/long-tasks-disabled/test.ts +++ b/dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/long-tasks-disabled/test.ts @@ -5,7 +5,7 @@ import type { Event } from '@sentry/types'; import { sentryTest } from '../../../../utils/fixtures'; import { getFirstSentryEnvelopeRequest, shouldSkipTracingTest } from '../../../../utils/helpers'; -sentryTest('should not capture long task when flag is disabled.', async ({ browserName, getLocalTestPath, page }) => { +sentryTest('should not capture long task when flag is disabled.', async ({ browserName, getLocalTestUrl, page }) => { // Long tasks only work on chrome if (shouldSkipTracingTest() || browserName !== 'chromium') { sentryTest.skip(); @@ -13,7 +13,7 @@ sentryTest('should not capture long task when flag is disabled.', async ({ brows await page.route('**/path/to/script.js', (route: Route) => route.fulfill({ path: `${__dirname}/assets/script.js` })); - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); const eventData = await getFirstSentryEnvelopeRequest(page, url); const uiSpans = eventData.spans?.filter(({ op }) => op?.startsWith('ui')); diff --git a/dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/long-tasks-enabled/test.ts b/dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/long-tasks-enabled/test.ts index 6189758c0340..e0c655836561 100644 --- a/dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/long-tasks-enabled/test.ts +++ b/dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/long-tasks-enabled/test.ts @@ -5,7 +5,7 @@ import type { Event } from '@sentry/types'; import { sentryTest } from '../../../../utils/fixtures'; import { getFirstSentryEnvelopeRequest, shouldSkipTracingTest } from '../../../../utils/helpers'; -sentryTest('should capture long task.', async ({ browserName, getLocalTestPath, page }) => { +sentryTest('should capture long task.', async ({ browserName, getLocalTestUrl, page }) => { // Long tasks only work on chrome if (shouldSkipTracingTest() || browserName !== 'chromium') { sentryTest.skip(); @@ -13,7 +13,7 @@ sentryTest('should capture long task.', async ({ browserName, getLocalTestPath, await page.route('**/path/to/script.js', (route: Route) => route.fulfill({ path: `${__dirname}/assets/script.js` })); - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); const eventData = await getFirstSentryEnvelopeRequest(page, url); const uiSpans = eventData.spans?.filter(({ op }) => op?.startsWith('ui')); diff --git a/dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/long-tasks-no-animation-frame/test.ts b/dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/long-tasks-no-animation-frame/test.ts index 6189758c0340..e0c655836561 100644 --- a/dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/long-tasks-no-animation-frame/test.ts +++ b/dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/long-tasks-no-animation-frame/test.ts @@ -5,7 +5,7 @@ import type { Event } from '@sentry/types'; import { sentryTest } from '../../../../utils/fixtures'; import { getFirstSentryEnvelopeRequest, shouldSkipTracingTest } from '../../../../utils/helpers'; -sentryTest('should capture long task.', async ({ browserName, getLocalTestPath, page }) => { +sentryTest('should capture long task.', async ({ browserName, getLocalTestUrl, page }) => { // Long tasks only work on chrome if (shouldSkipTracingTest() || browserName !== 'chromium') { sentryTest.skip(); @@ -13,7 +13,7 @@ sentryTest('should capture long task.', async ({ browserName, getLocalTestPath, await page.route('**/path/to/script.js', (route: Route) => route.fulfill({ path: `${__dirname}/assets/script.js` })); - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); const eventData = await getFirstSentryEnvelopeRequest(page, url); const uiSpans = eventData.spans?.filter(({ op }) => op?.startsWith('ui')); diff --git a/dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/meta/test.ts b/dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/meta/test.ts index ae89fd383cbb..b33ea0cc444c 100644 --- a/dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/meta/test.ts +++ b/dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/meta/test.ts @@ -8,35 +8,32 @@ import { shouldSkipTracingTest, } from '../../../../utils/helpers'; -sentryTest( - 'should create a pageload transaction based on `sentry-trace` ', - async ({ getLocalTestPath, page }) => { - if (shouldSkipTracingTest()) { - sentryTest.skip(); - } +sentryTest('should create a pageload transaction based on `sentry-trace` ', async ({ getLocalTestUrl, page }) => { + if (shouldSkipTracingTest()) { + sentryTest.skip(); + } - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); - const eventData = await getFirstSentryEnvelopeRequest(page, url); + const eventData = await getFirstSentryEnvelopeRequest(page, url); - expect(eventData.contexts?.trace).toMatchObject({ - op: 'pageload', - parent_span_id: '1121201211212012', - trace_id: '12312012123120121231201212312012', - }); + expect(eventData.contexts?.trace).toMatchObject({ + op: 'pageload', + parent_span_id: '1121201211212012', + trace_id: '12312012123120121231201212312012', + }); - expect(eventData.spans?.length).toBeGreaterThan(0); - }, -); + expect(eventData.spans?.length).toBeGreaterThan(0); +}); sentryTest( 'should pick up `baggage` tag, propagate the content in transaction and not add own data', - async ({ getLocalTestPath, page }) => { + async ({ getLocalTestUrl, page }) => { if (shouldSkipTracingTest()) { sentryTest.skip(); } - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); const envHeader = await getFirstSentryEnvelopeRequest(page, url, envelopeHeaderRequestParser); @@ -52,12 +49,12 @@ sentryTest( sentryTest( "should create a navigation that's not influenced by `sentry-trace` ", - async ({ getLocalTestPath, page }) => { + async ({ getLocalTestUrl, page }) => { if (shouldSkipTracingTest()) { sentryTest.skip(); } - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); const pageloadRequest = await getFirstSentryEnvelopeRequest(page, url); const navigationRequest = await getFirstSentryEnvelopeRequest(page, `${url}#foo`); diff --git a/dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/navigation/test.ts b/dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/navigation/test.ts index 5a46a65a4392..59939b0a6973 100644 --- a/dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/navigation/test.ts +++ b/dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/navigation/test.ts @@ -4,12 +4,12 @@ import type { Event } from '@sentry/types'; import { sentryTest } from '../../../../utils/fixtures'; import { getFirstSentryEnvelopeRequest, shouldSkipTracingTest } from '../../../../utils/helpers'; -sentryTest('should create a navigation transaction on page navigation', async ({ getLocalTestPath, page }) => { +sentryTest('should create a navigation transaction on page navigation', async ({ getLocalTestUrl, page }) => { if (shouldSkipTracingTest()) { sentryTest.skip(); } - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); const pageloadRequest = await getFirstSentryEnvelopeRequest(page, url); const navigationRequest = await getFirstSentryEnvelopeRequest(page, `${url}#foo`); diff --git a/dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/pageload-update-txn-name/test.ts b/dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/pageload-update-txn-name/test.ts index ff47f1a2d238..14a95ed9e29e 100644 --- a/dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/pageload-update-txn-name/test.ts +++ b/dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/pageload-update-txn-name/test.ts @@ -10,12 +10,12 @@ import { import { sentryTest } from '../../../../utils/fixtures'; import { getFirstSentryEnvelopeRequest, shouldSkipTracingTest } from '../../../../utils/helpers'; -sentryTest('sets the source to custom when updating the transaction name', async ({ getLocalTestPath, page }) => { +sentryTest('sets the source to custom when updating the transaction name', async ({ getLocalTestUrl, page }) => { if (shouldSkipTracingTest()) { sentryTest.skip(); } - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); const eventData = await getFirstSentryEnvelopeRequest(page, url); diff --git a/dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/pageload/test.ts b/dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/pageload/test.ts index 70f719d8dbbf..6f855168ebce 100644 --- a/dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/pageload/test.ts +++ b/dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/pageload/test.ts @@ -10,12 +10,12 @@ import { import { sentryTest } from '../../../../utils/fixtures'; import { getFirstSentryEnvelopeRequest, shouldSkipTracingTest } from '../../../../utils/helpers'; -sentryTest('creates a pageload transaction with url as source', async ({ getLocalTestPath, page }) => { +sentryTest('creates a pageload transaction with url as source', async ({ getLocalTestUrl, page }) => { if (shouldSkipTracingTest()) { sentryTest.skip(); } - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); const eventData = await getFirstSentryEnvelopeRequest(page, url); const timeOrigin = await page.evaluate('window._testBaseTimestamp'); diff --git a/dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/pageloadDelayed/test.ts b/dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/pageloadDelayed/test.ts index 882c08d23c5e..e0adc33e6271 100644 --- a/dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/pageloadDelayed/test.ts +++ b/dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/pageloadDelayed/test.ts @@ -4,12 +4,12 @@ import type { Event } from '@sentry/types'; import { sentryTest } from '../../../../utils/fixtures'; import { getFirstSentryEnvelopeRequest, shouldSkipTracingTest } from '../../../../utils/helpers'; -sentryTest('should create a pageload transaction when initialized delayed', async ({ getLocalTestPath, page }) => { +sentryTest('should create a pageload transaction when initialized delayed', async ({ getLocalTestUrl, page }) => { if (shouldSkipTracingTest()) { sentryTest.skip(); } - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); const eventData = await getFirstSentryEnvelopeRequest(page, url); const timeOrigin = await page.evaluate('window._testBaseTimestamp'); diff --git a/dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/tracePropagationTargets/customTargets/test.ts b/dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/tracePropagationTargets/customTargets/test.ts index fb6e9e540c46..499b81e966d1 100644 --- a/dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/tracePropagationTargets/customTargets/test.ts +++ b/dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/tracePropagationTargets/customTargets/test.ts @@ -5,12 +5,12 @@ import { shouldSkipTracingTest } from '../../../../../utils/helpers'; sentryTest( 'should attach `sentry-trace` and `baggage` header to request matching tracePropagationTargets', - async ({ getLocalTestPath, page }) => { + async ({ getLocalTestUrl, page }) => { if (shouldSkipTracingTest()) { sentryTest.skip(); } - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); const requests = ( await Promise.all([ diff --git a/dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/tracePropagationTargets/defaultTargetsNoMatch/test.ts b/dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/tracePropagationTargets/defaultTargetsNoMatch/test.ts index 0f7323d484e7..a56c99ece38b 100644 --- a/dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/tracePropagationTargets/defaultTargetsNoMatch/test.ts +++ b/dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/tracePropagationTargets/defaultTargetsNoMatch/test.ts @@ -5,12 +5,12 @@ import { shouldSkipTracingTest } from '../../../../../utils/helpers'; sentryTest( 'should not attach `sentry-trace` and `baggage` header to cross-origin requests when no tracePropagationTargets are defined', - async ({ getLocalTestPath, page }) => { + async ({ getLocalTestUrl, page }) => { if (shouldSkipTracingTest()) { sentryTest.skip(); } - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); const requests = ( await Promise.all([ diff --git a/dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegrationShim/init.js b/dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegrationShim/init.js index d7cfd52aedcc..3595ea724749 100644 --- a/dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegrationShim/init.js +++ b/dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegrationShim/init.js @@ -7,6 +7,3 @@ Sentry.init({ sampleRate: 1, integrations: [Sentry.browserTracingIntegration()], }); - -// This should not fail -Sentry.addTracingExtensions(); diff --git a/dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegrationShim/test.ts b/dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegrationShim/test.ts index b55a5fef4d98..4d98663933bd 100644 --- a/dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegrationShim/test.ts +++ b/dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegrationShim/test.ts @@ -5,7 +5,7 @@ import { shouldSkipTracingTest } from '../../../utils/helpers'; sentryTest( 'exports a shim browserTracingIntegration() integration for non-tracing bundles', - async ({ getLocalTestPath, page }) => { + async ({ getLocalTestUrl, page }) => { // Skip in tracing tests if (!shouldSkipTracingTest()) { sentryTest.skip(); @@ -24,7 +24,11 @@ sentryTest( }); }); - const url = await getLocalTestPath({ testDir: __dirname, skipDsnRouteHandler: true }); + const url = await getLocalTestUrl({ + testDir: __dirname, + skipDsnRouteHandler: true, + handleLazyLoadedFeedback: true, + }); await page.goto(url); diff --git a/dev-packages/browser-integration-tests/suites/tracing/envelope-header-transaction-name/test.ts b/dev-packages/browser-integration-tests/suites/tracing/envelope-header-transaction-name/test.ts index 6126a6728ca5..f2f4b10ede46 100644 --- a/dev-packages/browser-integration-tests/suites/tracing/envelope-header-transaction-name/test.ts +++ b/dev-packages/browser-integration-tests/suites/tracing/envelope-header-transaction-name/test.ts @@ -10,12 +10,12 @@ import { sentryTest( 'should only include transaction name if source is better than an unparameterized URL', - async ({ getLocalTestPath, page }) => { + async ({ getLocalTestUrl, page }) => { if (shouldSkipTracingTest()) { sentryTest.skip(); } - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); const envHeader = await getFirstSentryEnvelopeRequest(page, url, envelopeHeaderRequestParser); diff --git a/dev-packages/browser-integration-tests/suites/tracing/envelope-header/test.ts b/dev-packages/browser-integration-tests/suites/tracing/envelope-header/test.ts index 6df352af5fc0..fdfbac823166 100644 --- a/dev-packages/browser-integration-tests/suites/tracing/envelope-header/test.ts +++ b/dev-packages/browser-integration-tests/suites/tracing/envelope-header/test.ts @@ -10,12 +10,12 @@ import { sentryTest( 'should send dynamic sampling context data in trace envelope header of a transaction envelope', - async ({ getLocalTestPath, page }) => { + async ({ getLocalTestUrl, page }) => { if (shouldSkipTracingTest()) { sentryTest.skip(); } - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); const envHeader = await getFirstSentryEnvelopeRequest(page, url, envelopeHeaderRequestParser); diff --git a/dev-packages/browser-integration-tests/suites/tracing/metrics/connection-rtt/test.ts b/dev-packages/browser-integration-tests/suites/tracing/metrics/connection-rtt/test.ts index 4dbb8f186d42..145c718dd151 100644 --- a/dev-packages/browser-integration-tests/suites/tracing/metrics/connection-rtt/test.ts +++ b/dev-packages/browser-integration-tests/suites/tracing/metrics/connection-rtt/test.ts @@ -23,8 +23,8 @@ async function createSessionWithLatency(page: Page, latency: number) { return session; } -sentryTest('should capture a `connection.rtt` metric.', async ({ getLocalTestPath, page }) => { - const url = await getLocalTestPath({ testDir: __dirname }); +sentryTest('should capture a `connection.rtt` metric.', async ({ getLocalTestUrl, page }) => { + const url = await getLocalTestUrl({ testDir: __dirname }); const eventData = await getFirstSentryEnvelopeRequest(page, url); expect(eventData.measurements).toBeDefined(); @@ -33,10 +33,10 @@ sentryTest('should capture a `connection.rtt` metric.', async ({ getLocalTestPat sentryTest( 'should capture a `connection.rtt` metric with emulated value 200ms on Chromium.', - async ({ getLocalTestPath, page }) => { + async ({ getLocalTestUrl, page }) => { const session = await createSessionWithLatency(page, 200); - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); const eventData = await getFirstSentryEnvelopeRequest(page, url); await session.detach(); @@ -48,10 +48,10 @@ sentryTest( sentryTest( 'should capture a `connection.rtt` metric with emulated value 100ms on Chromium.', - async ({ getLocalTestPath, page }) => { + async ({ getLocalTestUrl, page }) => { const session = await createSessionWithLatency(page, 100); - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); const eventData = await getFirstSentryEnvelopeRequest(page, url); await session.detach(); @@ -63,10 +63,10 @@ sentryTest( sentryTest( 'should capture a `connection.rtt` metric with emulated value 50ms on Chromium.', - async ({ getLocalTestPath, page }) => { + async ({ getLocalTestUrl, page }) => { const session = await createSessionWithLatency(page, 50); - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); const eventData = await getFirstSentryEnvelopeRequest(page, url); await session.detach(); diff --git a/dev-packages/browser-integration-tests/suites/tracing/metrics/handlers-lcp/test.ts b/dev-packages/browser-integration-tests/suites/tracing/metrics/handlers-lcp/test.ts index 75f09e12e53d..78b48dc5a7f5 100644 --- a/dev-packages/browser-integration-tests/suites/tracing/metrics/handlers-lcp/test.ts +++ b/dev-packages/browser-integration-tests/suites/tracing/metrics/handlers-lcp/test.ts @@ -9,7 +9,7 @@ const bundle = process.env.PW_BUNDLE || ''; sentryTest( 'should capture metrics for LCP instrumentation handlers', - async ({ browserName, getLocalTestPath, page }) => { + async ({ browserName, getLocalTestUrl, page }) => { // This uses a utility that is not exported in CDN bundles if (shouldSkipTracingTest() || browserName !== 'chromium' || bundle.startsWith('bundle')) { sentryTest.skip(); @@ -19,7 +19,7 @@ sentryTest( route.fulfill({ path: `${__dirname}/assets/sentry-logo-600x179.png` }), ); - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); const [eventData] = await Promise.all([ getFirstSentryEnvelopeRequest(page), diff --git a/dev-packages/browser-integration-tests/suites/tracing/metrics/pageload-browser-spans/test.ts b/dev-packages/browser-integration-tests/suites/tracing/metrics/pageload-browser-spans/test.ts index 90660de34ded..3fb942f4aa67 100644 --- a/dev-packages/browser-integration-tests/suites/tracing/metrics/pageload-browser-spans/test.ts +++ b/dev-packages/browser-integration-tests/suites/tracing/metrics/pageload-browser-spans/test.ts @@ -4,12 +4,12 @@ import type { Event } from '@sentry/types'; import { sentryTest } from '../../../../utils/fixtures'; import { getFirstSentryEnvelopeRequest, shouldSkipTracingTest } from '../../../../utils/helpers'; -sentryTest('should add browser-related spans to pageload transaction', async ({ getLocalTestPath, page }) => { +sentryTest('should add browser-related spans to pageload transaction', async ({ getLocalTestUrl, page }) => { if (shouldSkipTracingTest()) { sentryTest.skip(); } - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); const eventData = await getFirstSentryEnvelopeRequest(page, url); const browserSpans = eventData.spans?.filter(({ op }) => op?.startsWith('browser')); diff --git a/dev-packages/browser-integration-tests/suites/tracing/metrics/pageload-measure-spans/test.ts b/dev-packages/browser-integration-tests/suites/tracing/metrics/pageload-measure-spans/test.ts index c53993cba21d..7f2e2fae9021 100644 --- a/dev-packages/browser-integration-tests/suites/tracing/metrics/pageload-measure-spans/test.ts +++ b/dev-packages/browser-integration-tests/suites/tracing/metrics/pageload-measure-spans/test.ts @@ -5,12 +5,12 @@ import { sentryTest } from '../../../../utils/fixtures'; import { getFirstSentryEnvelopeRequest, shouldSkipTracingTest } from '../../../../utils/helpers'; // Validation test for https://github.com/getsentry/sentry-javascript/issues/12281 -sentryTest('should add browser-related spans to pageload transaction', async ({ getLocalTestPath, page }) => { +sentryTest('should add browser-related spans to pageload transaction', async ({ getLocalTestUrl, page }) => { if (shouldSkipTracingTest()) { sentryTest.skip(); } - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); const eventData = await getFirstSentryEnvelopeRequest(page, url); const browserSpans = eventData.spans?.filter(({ op }) => op?.startsWith('browser')); diff --git a/dev-packages/browser-integration-tests/suites/tracing/metrics/web-vitals-cls-standalone-spans/test.ts b/dev-packages/browser-integration-tests/suites/tracing/metrics/web-vitals-cls-standalone-spans/test.ts index 6defe804e665..b27d747df649 100644 --- a/dev-packages/browser-integration-tests/suites/tracing/metrics/web-vitals-cls-standalone-spans/test.ts +++ b/dev-packages/browser-integration-tests/suites/tracing/metrics/web-vitals-cls-standalone-spans/test.ts @@ -41,7 +41,7 @@ function hidePage(page: Page): Promise { }); } -sentryTest('captures a "GOOD" CLS vital with its source as a standalone span', async ({ getLocalTestPath, page }) => { +sentryTest('captures a "GOOD" CLS vital with its source as a standalone span', async ({ getLocalTestUrl, page }) => { const spanEnvelopePromise = getMultipleSentryEnvelopeRequests( page, 1, @@ -49,7 +49,7 @@ sentryTest('captures a "GOOD" CLS vital with its source as a standalone span', a properFullEnvelopeRequestParser, ); - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); await page.goto(`${url}#0.05`); await waitForLayoutShift(page); @@ -105,7 +105,7 @@ sentryTest('captures a "GOOD" CLS vital with its source as a standalone span', a }); }); -sentryTest('captures a "MEH" CLS vital with its source as a standalone span', async ({ getLocalTestPath, page }) => { +sentryTest('captures a "MEH" CLS vital with its source as a standalone span', async ({ getLocalTestUrl, page }) => { const spanEnvelopePromise = getMultipleSentryEnvelopeRequests( page, 1, @@ -113,7 +113,7 @@ sentryTest('captures a "MEH" CLS vital with its source as a standalone span', as properFullEnvelopeRequestParser, ); - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); await page.goto(`${url}#0.21`); await waitForLayoutShift(page); @@ -172,7 +172,7 @@ sentryTest('captures a "MEH" CLS vital with its source as a standalone span', as }); }); -sentryTest('captures a "POOR" CLS vital with its source as a standalone span.', async ({ getLocalTestPath, page }) => { +sentryTest('captures a "POOR" CLS vital with its source as a standalone span.', async ({ getLocalTestUrl, page }) => { const spanEnvelopePromise = getMultipleSentryEnvelopeRequests( page, 1, @@ -180,7 +180,7 @@ sentryTest('captures a "POOR" CLS vital with its source as a standalone span.', properFullEnvelopeRequestParser, ); - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); await page.goto(`${url}#0.35`); await waitForLayoutShift(page); @@ -239,7 +239,7 @@ sentryTest('captures a "POOR" CLS vital with its source as a standalone span.', sentryTest( 'captures a 0 CLS vital as a standalone span if no layout shift occurred', - async ({ getLocalTestPath, page }) => { + async ({ getLocalTestUrl, page }) => { const spanEnvelopePromise = getMultipleSentryEnvelopeRequests( page, 1, @@ -247,7 +247,7 @@ sentryTest( properFullEnvelopeRequestParser, ); - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); await page.goto(url); await page.waitForTimeout(1000); @@ -302,8 +302,8 @@ sentryTest( sentryTest( 'captures CLS increases after the pageload span ended, when page is hidden', - async ({ getLocalTestPath, page }) => { - const url = await getLocalTestPath({ testDir: __dirname }); + async ({ getLocalTestUrl, page }) => { + const url = await getLocalTestUrl({ testDir: __dirname }); const eventData = await getFirstSentryEnvelopeRequest(page, url); @@ -339,8 +339,8 @@ sentryTest( }, ); -sentryTest('sends CLS of the initial page when soft-navigating to a new page', async ({ getLocalTestPath, page }) => { - const url = await getLocalTestPath({ testDir: __dirname }); +sentryTest('sends CLS of the initial page when soft-navigating to a new page', async ({ getLocalTestUrl, page }) => { + const url = await getLocalTestUrl({ testDir: __dirname }); const eventData = await getFirstSentryEnvelopeRequest(page, url); @@ -366,8 +366,8 @@ sentryTest('sends CLS of the initial page when soft-navigating to a new page', a expect(spanEnvelopeItem.data?.['sentry.pageload.span_id']).toMatch(/[a-f0-9]{16}/); }); -sentryTest("doesn't send further CLS after the first navigation", async ({ getLocalTestPath, page }) => { - const url = await getLocalTestPath({ testDir: __dirname }); +sentryTest("doesn't send further CLS after the first navigation", async ({ getLocalTestUrl, page }) => { + const url = await getLocalTestUrl({ testDir: __dirname }); const eventData = await getFirstSentryEnvelopeRequest(page, url); @@ -410,8 +410,8 @@ sentryTest("doesn't send further CLS after the first navigation", async ({ getLo await navigationTxnPromise; }); -sentryTest("doesn't send further CLS after the first page hide", async ({ getLocalTestPath, page }) => { - const url = await getLocalTestPath({ testDir: __dirname }); +sentryTest("doesn't send further CLS after the first page hide", async ({ getLocalTestUrl, page }) => { + const url = await getLocalTestUrl({ testDir: __dirname }); const eventData = await getFirstSentryEnvelopeRequest(page, url); @@ -454,8 +454,8 @@ sentryTest("doesn't send further CLS after the first page hide", async ({ getLoc await navigationTxnPromise; }); -sentryTest('CLS span timestamps are set correctly', async ({ getLocalTestPath, page }) => { - const url = await getLocalTestPath({ testDir: __dirname }); +sentryTest('CLS span timestamps are set correctly', async ({ getLocalTestUrl, page }) => { + const url = await getLocalTestUrl({ testDir: __dirname }); const eventData = await getFirstSentryEnvelopeRequest(page, url); diff --git a/dev-packages/browser-integration-tests/suites/tracing/metrics/web-vitals-cls/test.ts b/dev-packages/browser-integration-tests/suites/tracing/metrics/web-vitals-cls/test.ts index 00fc906aa60e..64ccba5d9b35 100644 --- a/dev-packages/browser-integration-tests/suites/tracing/metrics/web-vitals-cls/test.ts +++ b/dev-packages/browser-integration-tests/suites/tracing/metrics/web-vitals-cls/test.ts @@ -12,8 +12,8 @@ sentryTest.beforeEach(async ({ browserName, page }) => { await page.setViewportSize({ width: 800, height: 1200 }); }); -sentryTest('should capture a "GOOD" CLS vital with its source(s).', async ({ getLocalTestPath, page }) => { - const url = await getLocalTestPath({ testDir: __dirname }); +sentryTest('should capture a "GOOD" CLS vital with its source(s).', async ({ getLocalTestUrl, page }) => { + const url = await getLocalTestUrl({ testDir: __dirname }); const eventData = await getFirstSentryEnvelopeRequest(page, `${url}#0.05`); expect(eventData.measurements).toBeDefined(); @@ -26,8 +26,8 @@ sentryTest('should capture a "GOOD" CLS vital with its source(s).', async ({ get expect(eventData.contexts?.trace?.data?.['cls.source.1']).toBe('body > div#content > p#partial'); }); -sentryTest('should capture a "MEH" CLS vital with its source(s).', async ({ getLocalTestPath, page }) => { - const url = await getLocalTestPath({ testDir: __dirname }); +sentryTest('should capture a "MEH" CLS vital with its source(s).', async ({ getLocalTestUrl, page }) => { + const url = await getLocalTestUrl({ testDir: __dirname }); const eventData = await getFirstSentryEnvelopeRequest(page, `${url}#0.21`); expect(eventData.measurements).toBeDefined(); @@ -40,8 +40,8 @@ sentryTest('should capture a "MEH" CLS vital with its source(s).', async ({ getL expect(eventData.contexts?.trace?.data?.['cls.source.1']).toBe('body > div#content > p'); }); -sentryTest('should capture a "POOR" CLS vital with its source(s).', async ({ getLocalTestPath, page }) => { - const url = await getLocalTestPath({ testDir: __dirname }); +sentryTest('should capture a "POOR" CLS vital with its source(s).', async ({ getLocalTestUrl, page }) => { + const url = await getLocalTestUrl({ testDir: __dirname }); const eventData = await getFirstSentryEnvelopeRequest(page, `${url}#0.35`); expect(eventData.measurements).toBeDefined(); diff --git a/dev-packages/browser-integration-tests/suites/tracing/metrics/web-vitals-fid/test.ts b/dev-packages/browser-integration-tests/suites/tracing/metrics/web-vitals-fid/test.ts index e70247230b15..469660563a4e 100644 --- a/dev-packages/browser-integration-tests/suites/tracing/metrics/web-vitals-fid/test.ts +++ b/dev-packages/browser-integration-tests/suites/tracing/metrics/web-vitals-fid/test.ts @@ -4,13 +4,13 @@ import type { Event } from '@sentry/types'; import { sentryTest } from '../../../../utils/fixtures'; import { getFirstSentryEnvelopeRequest, shouldSkipTracingTest } from '../../../../utils/helpers'; -sentryTest('should capture a FID vital.', async ({ browserName, getLocalTestPath, page }) => { +sentryTest('should capture a FID vital.', async ({ browserName, getLocalTestUrl, page }) => { // FID measurement is not generated on webkit if (shouldSkipTracingTest() || browserName === 'webkit') { sentryTest.skip(); } - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); await page.goto(url); // To trigger FID diff --git a/dev-packages/browser-integration-tests/suites/tracing/metrics/web-vitals-fp-fcp/test.ts b/dev-packages/browser-integration-tests/suites/tracing/metrics/web-vitals-fp-fcp/test.ts index 70a9fd689e6e..bcdf9e232329 100644 --- a/dev-packages/browser-integration-tests/suites/tracing/metrics/web-vitals-fp-fcp/test.ts +++ b/dev-packages/browser-integration-tests/suites/tracing/metrics/web-vitals-fp-fcp/test.ts @@ -4,13 +4,13 @@ import type { Event } from '@sentry/types'; import { sentryTest } from '../../../../utils/fixtures'; import { getFirstSentryEnvelopeRequest, shouldSkipTracingTest } from '../../../../utils/helpers'; -sentryTest('should capture FP vital.', async ({ browserName, getLocalTestPath, page }) => { +sentryTest('should capture FP vital.', async ({ browserName, getLocalTestUrl, page }) => { // FP is not generated on webkit or firefox if (shouldSkipTracingTest() || browserName !== 'chromium') { sentryTest.skip(); } - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); const eventData = await getFirstSentryEnvelopeRequest(page, url); expect(eventData.measurements).toBeDefined(); @@ -23,12 +23,12 @@ sentryTest('should capture FP vital.', async ({ browserName, getLocalTestPath, p expect(fpSpan?.parent_span_id).toBe(eventData.contexts?.trace?.span_id); }); -sentryTest('should capture FCP vital.', async ({ getLocalTestPath, page }) => { +sentryTest('should capture FCP vital.', async ({ getLocalTestUrl, page }) => { if (shouldSkipTracingTest()) { sentryTest.skip(); } - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); const eventData = await getFirstSentryEnvelopeRequest(page, url); expect(eventData.measurements).toBeDefined(); diff --git a/dev-packages/browser-integration-tests/suites/tracing/metrics/web-vitals-inp-late/test.ts b/dev-packages/browser-integration-tests/suites/tracing/metrics/web-vitals-inp-late/test.ts index 1fee219c8e5b..438c9c5f6ecd 100644 --- a/dev-packages/browser-integration-tests/suites/tracing/metrics/web-vitals-inp-late/test.ts +++ b/dev-packages/browser-integration-tests/suites/tracing/metrics/web-vitals-inp-late/test.ts @@ -9,14 +9,14 @@ import { shouldSkipTracingTest, } from '../../../../utils/helpers'; -sentryTest('should capture an INP click event span after pageload', async ({ browserName, getLocalTestPath, page }) => { +sentryTest('should capture an INP click event span after pageload', async ({ browserName, getLocalTestUrl, page }) => { const supportedBrowsers = ['chromium']; if (shouldSkipTracingTest() || !supportedBrowsers.includes(browserName)) { sentryTest.skip(); } - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); await page.goto(url); await getFirstSentryEnvelopeRequest(page); // wait for page load diff --git a/dev-packages/browser-integration-tests/suites/tracing/metrics/web-vitals-inp-parametrized-late/test.ts b/dev-packages/browser-integration-tests/suites/tracing/metrics/web-vitals-inp-parametrized-late/test.ts index 18be7b654140..c68903f23e71 100644 --- a/dev-packages/browser-integration-tests/suites/tracing/metrics/web-vitals-inp-parametrized-late/test.ts +++ b/dev-packages/browser-integration-tests/suites/tracing/metrics/web-vitals-inp-parametrized-late/test.ts @@ -11,14 +11,14 @@ import { sentryTest( 'should capture an INP click event span after pageload for a parametrized transaction', - async ({ browserName, getLocalTestPath, page }) => { + async ({ browserName, getLocalTestUrl, page }) => { const supportedBrowsers = ['chromium']; if (shouldSkipTracingTest() || !supportedBrowsers.includes(browserName)) { sentryTest.skip(); } - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); await page.goto(url); await getFirstSentryEnvelopeRequest(page); // wait for page load diff --git a/dev-packages/browser-integration-tests/suites/tracing/metrics/web-vitals-inp-parametrized/test.ts b/dev-packages/browser-integration-tests/suites/tracing/metrics/web-vitals-inp-parametrized/test.ts index bf5021250b42..4f3c262d780d 100644 --- a/dev-packages/browser-integration-tests/suites/tracing/metrics/web-vitals-inp-parametrized/test.ts +++ b/dev-packages/browser-integration-tests/suites/tracing/metrics/web-vitals-inp-parametrized/test.ts @@ -10,14 +10,14 @@ import { sentryTest( 'should capture an INP click event span during pageload for a parametrized transaction', - async ({ browserName, getLocalTestPath, page }) => { + async ({ browserName, getLocalTestUrl, page }) => { const supportedBrowsers = ['chromium']; if (shouldSkipTracingTest() || !supportedBrowsers.includes(browserName)) { sentryTest.skip(); } - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); await page.goto(url); diff --git a/dev-packages/browser-integration-tests/suites/tracing/metrics/web-vitals-inp/test.ts b/dev-packages/browser-integration-tests/suites/tracing/metrics/web-vitals-inp/test.ts index e42028f9dff1..ab2146185b72 100644 --- a/dev-packages/browser-integration-tests/suites/tracing/metrics/web-vitals-inp/test.ts +++ b/dev-packages/browser-integration-tests/suites/tracing/metrics/web-vitals-inp/test.ts @@ -9,99 +9,96 @@ import { shouldSkipTracingTest, } from '../../../../utils/helpers'; -sentryTest( - 'should capture an INP click event span during pageload', - async ({ browserName, getLocalTestPath, page }) => { - const supportedBrowsers = ['chromium']; +sentryTest('should capture an INP click event span during pageload', async ({ browserName, getLocalTestUrl, page }) => { + const supportedBrowsers = ['chromium']; - if (shouldSkipTracingTest() || !supportedBrowsers.includes(browserName)) { - sentryTest.skip(); - } + if (shouldSkipTracingTest() || !supportedBrowsers.includes(browserName)) { + sentryTest.skip(); + } - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); - await page.goto(url); + await page.goto(url); - const spanEnvelopePromise = getMultipleSentryEnvelopeRequests( - page, - 1, - { envelopeType: 'span' }, - properFullEnvelopeRequestParser, - ); + const spanEnvelopePromise = getMultipleSentryEnvelopeRequests( + page, + 1, + { envelopeType: 'span' }, + properFullEnvelopeRequestParser, + ); - await page.locator('[data-test-id=normal-button]').click(); - await page.locator('.clicked[data-test-id=normal-button]').isVisible(); + await page.locator('[data-test-id=normal-button]').click(); + await page.locator('.clicked[data-test-id=normal-button]').isVisible(); - await page.waitForTimeout(500); + await page.waitForTimeout(500); - // Page hide to trigger INP - await page.evaluate(() => { - window.dispatchEvent(new Event('pagehide')); - }); + // Page hide to trigger INP + await page.evaluate(() => { + window.dispatchEvent(new Event('pagehide')); + }); - // Get the INP span envelope - const spanEnvelope = (await spanEnvelopePromise)[0]; - - const spanEnvelopeHeaders = spanEnvelope[0]; - const spanEnvelopeItem = spanEnvelope[1][0][1]; - - const traceId = spanEnvelopeHeaders.trace!.trace_id; - expect(traceId).toMatch(/[a-f0-9]{32}/); - - expect(spanEnvelopeHeaders).toEqual({ - sent_at: expect.any(String), - trace: { - environment: 'production', - public_key: 'public', - sample_rate: '1', - sampled: 'true', - trace_id: traceId, - // no transaction, because span source is URL - }, - }); + // Get the INP span envelope + const spanEnvelope = (await spanEnvelopePromise)[0]; - const inpValue = spanEnvelopeItem.measurements?.inp.value; - expect(inpValue).toBeGreaterThan(0); + const spanEnvelopeHeaders = spanEnvelope[0]; + const spanEnvelopeItem = spanEnvelope[1][0][1]; - expect(spanEnvelopeItem).toEqual({ - data: { - 'sentry.exclusive_time': inpValue, - 'sentry.op': 'ui.interaction.click', - 'sentry.origin': 'auto.http.browser.inp', - transaction: 'test-url', - 'user_agent.original': expect.stringContaining('Chrome'), - }, - measurements: { - inp: { - unit: 'millisecond', - value: inpValue, - }, - }, - description: 'body > NormalButton', - exclusive_time: inpValue, - op: 'ui.interaction.click', - origin: 'auto.http.browser.inp', - segment_id: expect.not.stringMatching(spanEnvelopeItem.span_id!), - // Parent is the pageload span - parent_span_id: expect.stringMatching(/[a-f0-9]{16}/), - span_id: expect.stringMatching(/[a-f0-9]{16}/), - start_timestamp: expect.any(Number), - timestamp: expect.any(Number), + const traceId = spanEnvelopeHeaders.trace!.trace_id; + expect(traceId).toMatch(/[a-f0-9]{32}/); + + expect(spanEnvelopeHeaders).toEqual({ + sent_at: expect.any(String), + trace: { + environment: 'production', + public_key: 'public', + sample_rate: '1', + sampled: 'true', trace_id: traceId, - }); - }, -); + // no transaction, because span source is URL + }, + }); + + const inpValue = spanEnvelopeItem.measurements?.inp.value; + expect(inpValue).toBeGreaterThan(0); + + expect(spanEnvelopeItem).toEqual({ + data: { + 'sentry.exclusive_time': inpValue, + 'sentry.op': 'ui.interaction.click', + 'sentry.origin': 'auto.http.browser.inp', + transaction: 'test-url', + 'user_agent.original': expect.stringContaining('Chrome'), + }, + measurements: { + inp: { + unit: 'millisecond', + value: inpValue, + }, + }, + description: 'body > NormalButton', + exclusive_time: inpValue, + op: 'ui.interaction.click', + origin: 'auto.http.browser.inp', + segment_id: expect.not.stringMatching(spanEnvelopeItem.span_id!), + // Parent is the pageload span + parent_span_id: expect.stringMatching(/[a-f0-9]{16}/), + span_id: expect.stringMatching(/[a-f0-9]{16}/), + start_timestamp: expect.any(Number), + timestamp: expect.any(Number), + trace_id: traceId, + }); +}); sentryTest( 'should choose the slowest interaction click event when INP is triggered.', - async ({ browserName, getLocalTestPath, page }) => { + async ({ browserName, getLocalTestUrl, page }) => { const supportedBrowsers = ['chromium']; if (shouldSkipTracingTest() || !supportedBrowsers.includes(browserName)) { sentryTest.skip(); } - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); await page.goto(url); await getFirstSentryEnvelopeRequest(page); diff --git a/dev-packages/browser-integration-tests/suites/tracing/metrics/web-vitals-lcp/test.ts b/dev-packages/browser-integration-tests/suites/tracing/metrics/web-vitals-lcp/test.ts index 2e215c728ecf..50a309d22272 100644 --- a/dev-packages/browser-integration-tests/suites/tracing/metrics/web-vitals-lcp/test.ts +++ b/dev-packages/browser-integration-tests/suites/tracing/metrics/web-vitals-lcp/test.ts @@ -5,7 +5,7 @@ import type { Event } from '@sentry/types'; import { sentryTest } from '../../../../utils/fixtures'; import { getFirstSentryEnvelopeRequest, shouldSkipTracingTest } from '../../../../utils/helpers'; -sentryTest('should capture a LCP vital with element details.', async ({ browserName, getLocalTestPath, page }) => { +sentryTest('should capture a LCP vital with element details.', async ({ browserName, getLocalTestUrl, page }) => { if (shouldSkipTracingTest() || browserName !== 'chromium') { sentryTest.skip(); } @@ -15,7 +15,7 @@ sentryTest('should capture a LCP vital with element details.', async ({ browserN return route.fulfill({ path: `${__dirname}/assets/sentry-logo-600x179.png` }); }); - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); const [eventData] = await Promise.all([ getFirstSentryEnvelopeRequest(page), page.goto(url), diff --git a/dev-packages/browser-integration-tests/suites/tracing/metrics/web-vitals/test.ts b/dev-packages/browser-integration-tests/suites/tracing/metrics/web-vitals/test.ts index 51a76797a23b..c41efad620ac 100644 --- a/dev-packages/browser-integration-tests/suites/tracing/metrics/web-vitals/test.ts +++ b/dev-packages/browser-integration-tests/suites/tracing/metrics/web-vitals/test.ts @@ -12,7 +12,7 @@ import { getFirstSentryEnvelopeRequest, shouldSkipTracingTest } from '../../../. * The problem is: We don't always get valid TTFB from the web-vitals library, so we skip the test if that's the case. * Note: There is another test that covers that we actually report TTFB if it is valid (@see ../web-vitals-lcp/test.ts). */ -sentryTest('paint web vitals values are greater than TTFB', async ({ browserName, getLocalTestPath, page }) => { +sentryTest('paint web vitals values are greater than TTFB', async ({ browserName, getLocalTestUrl, page }) => { // Only run in chromium to ensure all vitals are present if (shouldSkipTracingTest() || browserName !== 'chromium') { sentryTest.skip(); @@ -23,7 +23,7 @@ sentryTest('paint web vitals values are greater than TTFB', async ({ browserName return route.fulfill({ path: `${__dirname}/assets/sentry-logo-600x179.png` }); }); - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); const [eventData] = await Promise.all([ getFirstSentryEnvelopeRequest(page), page.goto(url), @@ -61,13 +61,13 @@ sentryTest('paint web vitals values are greater than TTFB', async ({ browserName sentryTest( 'captures time origin and navigation activationStart as span attributes', - async ({ getLocalTestPath, page }) => { + async ({ getLocalTestUrl, page }) => { // Only run in chromium to ensure all vitals are present if (shouldSkipTracingTest()) { sentryTest.skip(); } - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); const [eventData] = await Promise.all([getFirstSentryEnvelopeRequest(page), page.goto(url)]); const timeOriginAttribute = eventData.contexts?.trace?.data?.['performance.timeOrigin']; diff --git a/dev-packages/browser-integration-tests/suites/tracing/request/fetch-no-tracing/test.ts b/dev-packages/browser-integration-tests/suites/tracing/request/fetch-no-tracing/test.ts index 95c7b3052732..56bdc97f7f66 100644 --- a/dev-packages/browser-integration-tests/suites/tracing/request/fetch-no-tracing/test.ts +++ b/dev-packages/browser-integration-tests/suites/tracing/request/fetch-no-tracing/test.ts @@ -5,12 +5,12 @@ import { shouldSkipTracingTest } from '../../../../utils/helpers'; sentryTest( 'should not attach `sentry-trace` header to fetch requests without tracing', - async ({ getLocalTestPath, page }) => { + async ({ getLocalTestUrl, page }) => { if (shouldSkipTracingTest()) { sentryTest.skip(); } - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); const requests = ( await Promise.all([ diff --git a/dev-packages/browser-integration-tests/suites/tracing/request/fetch-tracing-unsampled/test.ts b/dev-packages/browser-integration-tests/suites/tracing/request/fetch-tracing-unsampled/test.ts index 44911665af7c..113c1d107454 100644 --- a/dev-packages/browser-integration-tests/suites/tracing/request/fetch-tracing-unsampled/test.ts +++ b/dev-packages/browser-integration-tests/suites/tracing/request/fetch-tracing-unsampled/test.ts @@ -3,12 +3,12 @@ import { expect } from '@playwright/test'; import { sentryTest } from '../../../../utils/fixtures'; import { shouldSkipTracingTest } from '../../../../utils/helpers'; -sentryTest('should attach `sentry-trace` header to unsampled fetch requests', async ({ getLocalTestPath, page }) => { +sentryTest('should attach `sentry-trace` header to unsampled fetch requests', async ({ getLocalTestUrl, page }) => { if (shouldSkipTracingTest()) { sentryTest.skip(); } - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); const requests = ( await Promise.all([ diff --git a/dev-packages/browser-integration-tests/suites/tracing/request/fetch-tracing-without-performance/test.ts b/dev-packages/browser-integration-tests/suites/tracing/request/fetch-tracing-without-performance/test.ts index 8c5c626731df..bbbed3acb92d 100644 --- a/dev-packages/browser-integration-tests/suites/tracing/request/fetch-tracing-without-performance/test.ts +++ b/dev-packages/browser-integration-tests/suites/tracing/request/fetch-tracing-without-performance/test.ts @@ -5,12 +5,12 @@ import { shouldSkipTracingTest } from '../../../../utils/helpers'; sentryTest( 'should attach `sentry-trace` header to tracing without performance (TWP) fetch requests', - async ({ getLocalTestPath, page }) => { + async ({ getLocalTestUrl, page }) => { if (shouldSkipTracingTest()) { sentryTest.skip(); } - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); const requests = ( await Promise.all([ diff --git a/dev-packages/browser-integration-tests/suites/tracing/request/fetch-with-request/test.ts b/dev-packages/browser-integration-tests/suites/tracing/request/fetch-with-request/test.ts index eb2f354dba4a..3f1a5db07c0f 100644 --- a/dev-packages/browser-integration-tests/suites/tracing/request/fetch-with-request/test.ts +++ b/dev-packages/browser-integration-tests/suites/tracing/request/fetch-with-request/test.ts @@ -5,7 +5,7 @@ import { shouldSkipTracingTest } from '../../../../utils/helpers'; sentryTest( 'instrumentation should pass on headers from fetch options instead of init request, if set', - async ({ getLocalTestPath, page }) => { + async ({ getLocalTestUrl, page }) => { if (shouldSkipTracingTest()) { sentryTest.skip(); } @@ -25,6 +25,6 @@ sentryTest( }); }); - await getLocalTestPath({ testDir: __dirname }); + await getLocalTestUrl({ testDir: __dirname }); }, ); diff --git a/dev-packages/browser-integration-tests/suites/tracing/request/fetch/test.ts b/dev-packages/browser-integration-tests/suites/tracing/request/fetch/test.ts index 6a98022dcdd2..53ff985a3f1b 100644 --- a/dev-packages/browser-integration-tests/suites/tracing/request/fetch/test.ts +++ b/dev-packages/browser-integration-tests/suites/tracing/request/fetch/test.ts @@ -4,12 +4,12 @@ import type { Event } from '@sentry/types'; import { sentryTest } from '../../../../utils/fixtures'; import { getMultipleSentryEnvelopeRequests, shouldSkipTracingTest } from '../../../../utils/helpers'; -sentryTest('should create spans for fetch requests', async ({ getLocalTestPath, page }) => { +sentryTest('should create spans for fetch requests', async ({ getLocalTestUrl, page }) => { if (shouldSkipTracingTest()) { sentryTest.skip(); } - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); // Because we fetch from http://example.com, fetch will throw a CORS error in firefox and webkit. // Chromium does not throw for cors errors. @@ -43,12 +43,12 @@ sentryTest('should create spans for fetch requests', async ({ getLocalTestPath, ); }); -sentryTest('should attach `sentry-trace` header to fetch requests', async ({ getLocalTestPath, page }) => { +sentryTest('should attach `sentry-trace` header to fetch requests', async ({ getLocalTestUrl, page }) => { if (shouldSkipTracingTest()) { sentryTest.skip(); } - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); const requests = ( await Promise.all([ diff --git a/dev-packages/browser-integration-tests/suites/tracing/request/xhr-no-tracing/test.ts b/dev-packages/browser-integration-tests/suites/tracing/request/xhr-no-tracing/test.ts index 95c7b3052732..56bdc97f7f66 100644 --- a/dev-packages/browser-integration-tests/suites/tracing/request/xhr-no-tracing/test.ts +++ b/dev-packages/browser-integration-tests/suites/tracing/request/xhr-no-tracing/test.ts @@ -5,12 +5,12 @@ import { shouldSkipTracingTest } from '../../../../utils/helpers'; sentryTest( 'should not attach `sentry-trace` header to fetch requests without tracing', - async ({ getLocalTestPath, page }) => { + async ({ getLocalTestUrl, page }) => { if (shouldSkipTracingTest()) { sentryTest.skip(); } - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); const requests = ( await Promise.all([ diff --git a/dev-packages/browser-integration-tests/suites/tracing/request/xhr-tracing-unsampled/test.ts b/dev-packages/browser-integration-tests/suites/tracing/request/xhr-tracing-unsampled/test.ts index 954628873383..cb4149ba27ed 100644 --- a/dev-packages/browser-integration-tests/suites/tracing/request/xhr-tracing-unsampled/test.ts +++ b/dev-packages/browser-integration-tests/suites/tracing/request/xhr-tracing-unsampled/test.ts @@ -3,12 +3,12 @@ import { expect } from '@playwright/test'; import { sentryTest } from '../../../../utils/fixtures'; import { shouldSkipTracingTest } from '../../../../utils/helpers'; -sentryTest('should attach `sentry-trace` header to unsampled xhr requests', async ({ getLocalTestPath, page }) => { +sentryTest('should attach `sentry-trace` header to unsampled xhr requests', async ({ getLocalTestUrl, page }) => { if (shouldSkipTracingTest()) { sentryTest.skip(); } - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); const requests = ( await Promise.all([ diff --git a/dev-packages/browser-integration-tests/suites/tracing/request/xhr-tracing-without-performance/test.ts b/dev-packages/browser-integration-tests/suites/tracing/request/xhr-tracing-without-performance/test.ts index 2e1a8ee36277..f593223d520f 100644 --- a/dev-packages/browser-integration-tests/suites/tracing/request/xhr-tracing-without-performance/test.ts +++ b/dev-packages/browser-integration-tests/suites/tracing/request/xhr-tracing-without-performance/test.ts @@ -5,12 +5,12 @@ import { shouldSkipTracingTest } from '../../../../utils/helpers'; sentryTest( 'should attach `sentry-trace` header to tracing without performance (TWP) xhr requests', - async ({ getLocalTestPath, page }) => { + async ({ getLocalTestUrl, page }) => { if (shouldSkipTracingTest()) { sentryTest.skip(); } - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); const requests = ( await Promise.all([ diff --git a/dev-packages/browser-integration-tests/suites/tracing/request/xhr/test.ts b/dev-packages/browser-integration-tests/suites/tracing/request/xhr/test.ts index 5dbfd3edf4cb..5cc65c872c08 100644 --- a/dev-packages/browser-integration-tests/suites/tracing/request/xhr/test.ts +++ b/dev-packages/browser-integration-tests/suites/tracing/request/xhr/test.ts @@ -4,12 +4,12 @@ import type { Event } from '@sentry/types'; import { sentryTest } from '../../../../utils/fixtures'; import { getFirstSentryEnvelopeRequest, shouldSkipTracingTest } from '../../../../utils/helpers'; -sentryTest('should create spans for XHR requests', async ({ getLocalTestPath, page }) => { +sentryTest('should create spans for XHR requests', async ({ getLocalTestUrl, page }) => { if (shouldSkipTracingTest()) { sentryTest.skip(); } - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); const eventData = await getFirstSentryEnvelopeRequest(page, url); const requestSpans = eventData.spans?.filter(({ op }) => op === 'http.client'); @@ -35,12 +35,12 @@ sentryTest('should create spans for XHR requests', async ({ getLocalTestPath, pa ); }); -sentryTest('should attach `sentry-trace` header to XHR requests', async ({ getLocalTestPath, page }) => { +sentryTest('should attach `sentry-trace` header to XHR requests', async ({ getLocalTestUrl, page }) => { if (shouldSkipTracingTest()) { sentryTest.skip(); } - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); const requests = ( await Promise.all([ diff --git a/dev-packages/browser-integration-tests/suites/transport/offline/queued/test.ts b/dev-packages/browser-integration-tests/suites/transport/offline/queued/test.ts index 2ca225ee069a..4cd9b1e8fdff 100644 --- a/dev-packages/browser-integration-tests/suites/transport/offline/queued/test.ts +++ b/dev-packages/browser-integration-tests/suites/transport/offline/queued/test.ts @@ -8,13 +8,13 @@ function delay(ms: number) { return new Promise(resolve => setTimeout(resolve, ms)); } -sentryTest('should queue and retry events when they fail to send', async ({ getLocalTestPath, page }) => { +sentryTest('should queue and retry events when they fail to send', async ({ getLocalTestUrl, page }) => { // makeBrowserOfflineTransport is not included in any CDN bundles if (process.env.PW_BUNDLE && process.env.PW_BUNDLE.startsWith('bundle')) { sentryTest.skip(); } - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); // This would be the obvious way to test offline support but it doesn't appear to work! // await context.setOffline(true); diff --git a/dev-packages/browser-integration-tests/suites/wasm/test.ts b/dev-packages/browser-integration-tests/suites/wasm/test.ts index 702b22a77a74..8b519a25fc4a 100644 --- a/dev-packages/browser-integration-tests/suites/wasm/test.ts +++ b/dev-packages/browser-integration-tests/suites/wasm/test.ts @@ -7,12 +7,12 @@ import { shouldSkipWASMTests } from '../../utils/wasmHelpers'; sentryTest( 'captured exception should include modified frames and debug_meta attribute', - async ({ getLocalTestPath, page, browserName }) => { + async ({ getLocalTestUrl, page, browserName }) => { if (shouldSkipWASMTests(browserName)) { sentryTest.skip(); } - const url = await getLocalTestPath({ testDir: __dirname }); + const url = await getLocalTestUrl({ testDir: __dirname }); await page.route('**/simple.wasm', route => { const wasmModule = fs.readFileSync(path.resolve(__dirname, 'simple.wasm')); diff --git a/dev-packages/browser-integration-tests/utils/fixtures.ts b/dev-packages/browser-integration-tests/utils/fixtures.ts index 9455e8c8626c..0af573f517a0 100644 --- a/dev-packages/browser-integration-tests/utils/fixtures.ts +++ b/dev-packages/browser-integration-tests/utils/fixtures.ts @@ -31,11 +31,11 @@ const getAsset = (assetDir: string, asset: string): string => { export type TestFixtures = { _autoSnapshotSuffix: void; testDir: string; - getLocalTestPath: (options: { testDir: string; skipDsnRouteHandler?: boolean }) => Promise; getLocalTestUrl: (options: { testDir: string; skipRouteHandler?: boolean; skipDsnRouteHandler?: boolean; + handleLazyLoadedFeedback?: boolean; }) => Promise; forceFlushReplay: () => Promise; enableConsole: () => void; @@ -59,76 +59,59 @@ const sentryTest = base.extend({ ], getLocalTestUrl: ({ page }, use) => { - return use(async ({ testDir, skipRouteHandler = false, skipDsnRouteHandler = false }) => { - const pagePath = `${TEST_HOST}/index.html`; + return use( + async ({ testDir, skipRouteHandler = false, skipDsnRouteHandler = false, handleLazyLoadedFeedback = false }) => { + const pagePath = `${TEST_HOST}/index.html`; - const tmpDir = path.join(testDir, 'dist', crypto.randomUUID()); + const tmpDir = path.join(testDir, 'dist', crypto.randomUUID()); - await build(testDir, tmpDir); + await build(testDir, tmpDir); - // If skipping route handlers we return the tmp dir instead of adding the handler - // This way, this can be handled by the caller manually - if (skipRouteHandler) { - return tmpDir; - } + // If skipping route handlers we return the tmp dir instead of adding the handler + // This way, this can be handled by the caller manually + if (skipRouteHandler) { + return tmpDir; + } - if (!skipDsnRouteHandler) { - await page.route('https://dsn.ingest.sentry.io/**/*', route => { - return route.fulfill({ - status: 200, - contentType: 'application/json', - body: JSON.stringify({ id: 'test-id' }), + if (!skipDsnRouteHandler) { + await page.route('https://dsn.ingest.sentry.io/**/*', route => { + return route.fulfill({ + status: 200, + contentType: 'application/json', + body: JSON.stringify({ id: 'test-id' }), + }); }); - }); - } - - await page.route(`${TEST_HOST}/*.*`, route => { - const file = route.request().url().split('/').pop(); - const filePath = path.resolve(tmpDir, `./${file}`); - - return fs.existsSync(filePath) ? route.fulfill({ path: filePath }) : route.continue(); - }); - - // Ensure feedback can be lazy loaded - await page.route(`https://browser.sentry-cdn.com/${SDK_VERSION}/feedback-modal.min.js`, route => { - const filePath = path.resolve(tmpDir, './feedback-modal.bundle.js'); - if (!fs.existsSync(filePath)) { - throw new Error(`Feedback modal bundle (${filePath}) not found`); } - return route.fulfill({ path: filePath }); - }); - await page.route(`https://browser.sentry-cdn.com/${SDK_VERSION}/feedback-screenshot.min.js`, route => { - const filePath = path.resolve(tmpDir, './feedback-screenshot.bundle.js'); - if (!fs.existsSync(filePath)) { - throw new Error(`Feedback screenshot bundle (${filePath}) not found`); - } - return route.fulfill({ path: filePath }); - }); + await page.route(`${TEST_HOST}/*.*`, route => { + const file = route.request().url().split('/').pop(); + const filePath = path.resolve(tmpDir, `./${file}`); - return pagePath; - }); - }, - - getLocalTestPath: ({ page }, use) => { - return use(async ({ testDir, skipDsnRouteHandler }) => { - const tmpDir = path.join(testDir, 'dist', crypto.randomUUID()); - const pagePath = `file:///${path.resolve(tmpDir, './index.html')}`; + return fs.existsSync(filePath) ? route.fulfill({ path: filePath }) : route.continue(); + }); - await build(testDir, tmpDir); + if (handleLazyLoadedFeedback) { + // Ensure feedback can be lazy loaded + await page.route(`https://browser.sentry-cdn.com/${SDK_VERSION}/feedback-modal.min.js`, route => { + const filePath = path.resolve(tmpDir, './feedback-modal.bundle.js'); + if (!fs.existsSync(filePath)) { + throw new Error(`Feedback modal bundle (${filePath}) not found`); + } + return route.fulfill({ path: filePath }); + }); - if (!skipDsnRouteHandler) { - await page.route('https://dsn.ingest.sentry.io/**/*', route => { - return route.fulfill({ - status: 200, - contentType: 'application/json', - body: JSON.stringify({ id: 'test-id' }), + await page.route(`https://browser.sentry-cdn.com/${SDK_VERSION}/feedback-screenshot.min.js`, route => { + const filePath = path.resolve(tmpDir, './feedback-screenshot.bundle.js'); + if (!fs.existsSync(filePath)) { + throw new Error(`Feedback screenshot bundle (${filePath}) not found`); + } + return route.fulfill({ path: filePath }); }); - }); - } + } - return pagePath; - }); + return pagePath; + }, + ); }, runInChromium: ({ runInSingleBrowser }, use) => { return use((fn, args) => runInSingleBrowser('chromium', fn, args));