Skip to content

Commit 3fa1cf5

Browse files
committed
WIP
1 parent d71532b commit 3fa1cf5

File tree

14 files changed

+32
-32
lines changed
  • dev-packages/browser-integration-tests/suites
    • integrations
      • globalHandlers/fetchStackTrace
      • httpclient/fetch/withAbortController
      • moduleMetadata
    • public-api/init/built-pkg
    • tracing
      • browserTracingIntegration
        • long-animation-frame-disabled
        • long-animation-frame-enabled
        • long-animation-frame-non-chromium
        • long-tasks-and-animation-frame-enabled
        • long-tasks-no-animation-frame
      • metrics

14 files changed

+32
-32
lines changed

dev-packages/browser-integration-tests/suites/integrations/globalHandlers/fetchStackTrace/test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import type { Event } from '@sentry/types';
44
import { sentryTest } from '../../../../utils/fixtures';
55
import { getMultipleSentryEnvelopeRequests } from '../../../../utils/helpers';
66

7-
sentryTest('should create errors with stack traces for failing fetch calls', async ({ getLocalTestPath, page }) => {
8-
const url = await getLocalTestPath({ testDir: __dirname });
7+
sentryTest('should create errors with stack traces for failing fetch calls', async ({ getLocalTestUrl, page }) => {
8+
const url = await getLocalTestUrl({ testDir: __dirname });
99

1010
const envelopes = await getMultipleSentryEnvelopeRequests<Event>(page, 3, { url, timeout: 10000 });
1111
const errorEvent = envelopes.find(event => !event.type)!;

dev-packages/browser-integration-tests/suites/integrations/httpclient/fetch/withAbortController/test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ import type { Event as SentryEvent } from '@sentry/types';
33
import { sentryTest } from '../../../../../utils/fixtures';
44
import { getFirstSentryEnvelopeRequest, shouldSkipTracingTest } from '../../../../../utils/helpers';
55

6-
sentryTest('should handle aborted fetch calls', async ({ getLocalTestPath, page }) => {
6+
sentryTest('should handle aborted fetch calls', async ({ getLocalTestUrl, page }) => {
77
if (shouldSkipTracingTest()) {
88
sentryTest.skip();
99
}
1010

11-
const url = await getLocalTestPath({ testDir: __dirname });
11+
const url = await getLocalTestUrl({ testDir: __dirname });
1212

1313
await page.route('**/foo', async () => {
1414
// never fulfil this route because we abort the request as part of the test

dev-packages/browser-integration-tests/suites/integrations/moduleMetadata/appliesMetadata/test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ import type { Event } from '@sentry/types';
44
import { sentryTest } from '../../../../utils/fixtures';
55
import { getFirstSentryEnvelopeRequest } from '../../../../utils/helpers';
66

7-
sentryTest('should provide module_metadata on stack frames in beforeSend', async ({ getLocalTestPath, page }) => {
7+
sentryTest('should provide module_metadata on stack frames in beforeSend', async ({ getLocalTestUrl, page }) => {
88
// moduleMetadataIntegration is not included in any CDN bundles
99
if (process.env.PW_BUNDLE?.startsWith('bundle')) {
1010
sentryTest.skip();
1111
}
1212

13-
const url = await getLocalTestPath({ testDir: __dirname });
13+
const url = await getLocalTestUrl({ testDir: __dirname });
1414

1515
const errorEvent = await getFirstSentryEnvelopeRequest<Event>(page, url);
1616
expect(errorEvent.extra?.['module_metadata_entries']).toEqual([{ foo: 'bar' }]);

dev-packages/browser-integration-tests/suites/integrations/moduleMetadata/appliesMetadataWithRewriteFrames/test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ import { getFirstSentryEnvelopeRequest } from '../../../../utils/helpers';
66

77
sentryTest(
88
'should provide module_metadata on stack frames in beforeSend even though an event processor (rewriteFramesIntegration) modified the filename',
9-
async ({ getLocalTestPath, page }) => {
9+
async ({ getLocalTestUrl, page }) => {
1010
// moduleMetadataIntegration is not included in any CDN bundles
1111
if (process.env.PW_BUNDLE?.startsWith('bundle')) {
1212
sentryTest.skip();
1313
}
1414

15-
const url = await getLocalTestPath({ testDir: __dirname });
15+
const url = await getLocalTestUrl({ testDir: __dirname });
1616

1717
const errorEvent = await getFirstSentryEnvelopeRequest<Event>(page, url);
1818
expect(errorEvent?.extra?.['module_metadata_entries']).toEqual([{ foo: 'baz' }]);

dev-packages/browser-integration-tests/suites/public-api/init/built-pkg/test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ import { expect } from '@playwright/test';
66
import { sentryTest } from '../../../../utils/fixtures';
77

88
// Regression test against https://github.com/getsentry/sentry-javascript/pull/1896
9-
sentryTest('should not contain tslib_1__default', async ({ getLocalTestPath }) => {
10-
await getLocalTestPath({ testDir: __dirname });
9+
sentryTest('should not contain tslib_1__default', async ({ getLocalTestUrl }) => {
10+
await getLocalTestUrl({ testDir: __dirname });
1111

1212
const initBundle = fs.readFileSync(path.join(__dirname, 'dist', 'init.bundle.js'), 'utf-8');
1313
expect(initBundle.length).toBeGreaterThan(0);

dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/long-animation-frame-disabled/test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { getFirstSentryEnvelopeRequest, shouldSkipTracingTest } from '../../../.
77

88
sentryTest(
99
'should not capture long animation frame when flag is disabled.',
10-
async ({ browserName, getLocalTestPath, page }) => {
10+
async ({ browserName, getLocalTestUrl, page }) => {
1111
// Long animation frames only work on chrome
1212
if (shouldSkipTracingTest() || browserName !== 'chromium') {
1313
sentryTest.skip();
@@ -17,7 +17,7 @@ sentryTest(
1717
route.fulfill({ path: `${__dirname}/assets/script.js` }),
1818
);
1919

20-
const url = await getLocalTestPath({ testDir: __dirname });
20+
const url = await getLocalTestUrl({ testDir: __dirname });
2121

2222
const eventData = await getFirstSentryEnvelopeRequest<Event>(page, url);
2323
const uiSpans = eventData.spans?.filter(({ op }) => op?.startsWith('ui'));

dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/long-animation-frame-enabled/test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { getFirstSentryEnvelopeRequest, shouldSkipTracingTest } from '../../../.
88

99
sentryTest(
1010
'should capture long animation frame for top-level script.',
11-
async ({ browserName, getLocalTestPath, page }) => {
11+
async ({ browserName, getLocalTestUrl, page }) => {
1212
// Long animation frames only work on chrome
1313
if (shouldSkipTracingTest() || browserName !== 'chromium') {
1414
sentryTest.skip();
@@ -18,7 +18,7 @@ sentryTest(
1818
route.fulfill({ path: `${__dirname}/assets/script.js` }),
1919
);
2020

21-
const url = await getLocalTestPath({ testDir: __dirname });
21+
const url = await getLocalTestUrl({ testDir: __dirname });
2222

2323
const promise = getFirstSentryEnvelopeRequest<Event>(page);
2424

@@ -59,7 +59,7 @@ sentryTest(
5959

6060
sentryTest(
6161
'should capture long animation frame for event listener.',
62-
async ({ browserName, getLocalTestPath, page }) => {
62+
async ({ browserName, getLocalTestUrl, page }) => {
6363
// Long animation frames only work on chrome
6464
if (shouldSkipTracingTest() || browserName !== 'chromium') {
6565
sentryTest.skip();
@@ -69,7 +69,7 @@ sentryTest(
6969
route.fulfill({ path: `${__dirname}/assets/script.js` }),
7070
);
7171

72-
const url = await getLocalTestPath({ testDir: __dirname });
72+
const url = await getLocalTestUrl({ testDir: __dirname });
7373

7474
const promise = getFirstSentryEnvelopeRequest<Event>(page);
7575

dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/long-animation-frame-non-chromium/test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { getFirstSentryEnvelopeRequest, shouldSkipTracingTest } from '../../../.
77

88
sentryTest(
99
'should not capture long animation frame or long task when browser is non-chromium',
10-
async ({ browserName, getLocalTestPath, page }) => {
10+
async ({ browserName, getLocalTestUrl, page }) => {
1111
// Only test non-chromium browsers
1212
if (shouldSkipTracingTest() || browserName === 'chromium') {
1313
sentryTest.skip();
@@ -17,7 +17,7 @@ sentryTest(
1717
route.fulfill({ path: `${__dirname}/assets/script.js` }),
1818
);
1919

20-
const url = await getLocalTestPath({ testDir: __dirname });
20+
const url = await getLocalTestUrl({ testDir: __dirname });
2121

2222
const eventData = await getFirstSentryEnvelopeRequest<Event>(page, url);
2323
const uiSpans = eventData.spans?.filter(({ op }) => op?.startsWith('ui'));

dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/long-tasks-and-animation-frame-enabled/test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { getFirstSentryEnvelopeRequest, shouldSkipTracingTest } from '../../../.
88

99
sentryTest(
1010
'should capture long animation frame for top-level script.',
11-
async ({ browserName, getLocalTestPath, page }) => {
11+
async ({ browserName, getLocalTestUrl, page }) => {
1212
// Long animation frames only work on chrome
1313
if (shouldSkipTracingTest() || browserName !== 'chromium') {
1414
sentryTest.skip();
@@ -20,7 +20,7 @@ sentryTest(
2020
route.fulfill({ path: `${__dirname}/assets/script.js` }),
2121
);
2222

23-
const url = await getLocalTestPath({ testDir: __dirname });
23+
const url = await getLocalTestUrl({ testDir: __dirname });
2424

2525
const promise = getFirstSentryEnvelopeRequest<Event>(page);
2626

@@ -61,7 +61,7 @@ sentryTest(
6161

6262
sentryTest(
6363
'should capture long animation frame for event listener.',
64-
async ({ browserName, getLocalTestPath, page }) => {
64+
async ({ browserName, getLocalTestUrl, page }) => {
6565
// Long animation frames only work on chrome
6666
if (shouldSkipTracingTest() || browserName !== 'chromium') {
6767
sentryTest.skip();
@@ -71,7 +71,7 @@ sentryTest(
7171
route.fulfill({ path: `${__dirname}/assets/script.js` }),
7272
);
7373

74-
const url = await getLocalTestPath({ testDir: __dirname });
74+
const url = await getLocalTestUrl({ testDir: __dirname });
7575

7676
const promise = getFirstSentryEnvelopeRequest<Event>(page);
7777

dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/long-tasks-no-animation-frame/test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@ import type { Event } from '@sentry/types';
55
import { sentryTest } from '../../../../utils/fixtures';
66
import { getFirstSentryEnvelopeRequest, shouldSkipTracingTest } from '../../../../utils/helpers';
77

8-
sentryTest('should capture long task.', async ({ browserName, getLocalTestPath, page }) => {
8+
sentryTest('should capture long task.', async ({ browserName, getLocalTestUrl, page }) => {
99
// Long tasks only work on chrome
1010
if (shouldSkipTracingTest() || browserName !== 'chromium') {
1111
sentryTest.skip();
1212
}
1313

1414
await page.route('**/path/to/script.js', (route: Route) => route.fulfill({ path: `${__dirname}/assets/script.js` }));
1515

16-
const url = await getLocalTestPath({ testDir: __dirname });
16+
const url = await getLocalTestUrl({ testDir: __dirname });
1717

1818
const eventData = await getFirstSentryEnvelopeRequest<Event>(page, url);
1919
const uiSpans = eventData.spans?.filter(({ op }) => op?.startsWith('ui'));

dev-packages/browser-integration-tests/suites/tracing/metrics/pageload-measure-spans/test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ import { sentryTest } from '../../../../utils/fixtures';
55
import { getFirstSentryEnvelopeRequest, shouldSkipTracingTest } from '../../../../utils/helpers';
66

77
// Validation test for https://github.com/getsentry/sentry-javascript/issues/12281
8-
sentryTest('should add browser-related spans to pageload transaction', async ({ getLocalTestPath, page }) => {
8+
sentryTest('should add browser-related spans to pageload transaction', async ({ getLocalTestUrl, page }) => {
99
if (shouldSkipTracingTest()) {
1010
sentryTest.skip();
1111
}
1212

13-
const url = await getLocalTestPath({ testDir: __dirname });
13+
const url = await getLocalTestUrl({ testDir: __dirname });
1414

1515
const eventData = await getFirstSentryEnvelopeRequest<Event>(page, url);
1616
const browserSpans = eventData.spans?.filter(({ op }) => op === 'browser');

dev-packages/browser-integration-tests/suites/tracing/metrics/web-vitals-inp-late/test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import {
99
shouldSkipTracingTest,
1010
} from '../../../../utils/helpers';
1111

12-
sentryTest('should capture an INP click event span after pageload', async ({ browserName, getLocalTestPath, page }) => {
12+
sentryTest('should capture an INP click event span after pageload', async ({ browserName, getLocalTestUrl, page }) => {
1313
const supportedBrowsers = ['chromium'];
1414

1515
if (shouldSkipTracingTest() || !supportedBrowsers.includes(browserName)) {
@@ -24,7 +24,7 @@ sentryTest('should capture an INP click event span after pageload', async ({ bro
2424
});
2525
});
2626

27-
const url = await getLocalTestPath({ testDir: __dirname });
27+
const url = await getLocalTestUrl({ testDir: __dirname });
2828

2929
await page.goto(url);
3030
await getFirstSentryEnvelopeRequest<SentryEvent>(page); // wait for page load

dev-packages/browser-integration-tests/suites/tracing/metrics/web-vitals-inp-parametrized-late/test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import {
1111

1212
sentryTest(
1313
'should capture an INP click event span after pageload for a parametrized transaction',
14-
async ({ browserName, getLocalTestPath, page }) => {
14+
async ({ browserName, getLocalTestUrl, page }) => {
1515
const supportedBrowsers = ['chromium'];
1616

1717
if (shouldSkipTracingTest() || !supportedBrowsers.includes(browserName)) {
@@ -26,7 +26,7 @@ sentryTest(
2626
});
2727
});
2828

29-
const url = await getLocalTestPath({ testDir: __dirname });
29+
const url = await getLocalTestUrl({ testDir: __dirname });
3030

3131
await page.goto(url);
3232
await getFirstSentryEnvelopeRequest<SentryEvent>(page); // wait for page load

dev-packages/browser-integration-tests/suites/tracing/metrics/web-vitals-inp-parametrized/test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {
1010

1111
sentryTest(
1212
'should capture an INP click event span during pageload for a parametrized transaction',
13-
async ({ browserName, getLocalTestPath, page }) => {
13+
async ({ browserName, getLocalTestUrl, page }) => {
1414
const supportedBrowsers = ['chromium'];
1515

1616
if (shouldSkipTracingTest() || !supportedBrowsers.includes(browserName)) {
@@ -25,7 +25,7 @@ sentryTest(
2525
});
2626
});
2727

28-
const url = await getLocalTestPath({ testDir: __dirname });
28+
const url = await getLocalTestUrl({ testDir: __dirname });
2929

3030
await page.goto(url);
3131

0 commit comments

Comments
 (0)