Skip to content

Commit ffccdc1

Browse files
committed
check for chromium
1 parent f1ffb35 commit ffccdc1

File tree

1 file changed

+17
-15
lines changed
  • dev-packages/browser-integration-tests/suites/profiling/legacyMode

1 file changed

+17
-15
lines changed

dev-packages/browser-integration-tests/suites/profiling/legacyMode/test.ts

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,25 +7,27 @@ import {
77
waitForTransactionRequestOnUrl,
88
} from '../../../utils/helpers';
99

10-
sentryTest('does not send profile envelope when document-policy is not set', async ({ page, getLocalTestUrl }) => {
11-
if (shouldSkipTracingTest()) {
12-
// Profiling only works when tracing is enabled
13-
sentryTest.skip();
14-
}
15-
16-
const url = await getLocalTestUrl({ testDir: __dirname });
10+
sentryTest(
11+
'does not send profile envelope when document-policy is not set',
12+
async ({ page, getLocalTestUrl, browserName }) => {
13+
if (shouldSkipTracingTest() || browserName !== 'chromium') {
14+
// Profiling only works when tracing is enabled
15+
sentryTest.skip();
16+
}
1717

18-
const req = await waitForTransactionRequestOnUrl(page, url);
19-
const transactionEvent = properEnvelopeRequestParser<Event>(req, 0);
20-
const profileEvent = properEnvelopeRequestParser<Profile>(req, 1);
18+
const url = await getLocalTestUrl({ testDir: __dirname });
2119

22-
expect(transactionEvent).toBeDefined();
20+
const req = await waitForTransactionRequestOnUrl(page, url);
21+
const transactionEvent = properEnvelopeRequestParser<Event>(req, 0);
22+
const profileEvent = properEnvelopeRequestParser<Profile>(req, 1);
2323

24-
expect(profileEvent).toBeUndefined();
25-
});
24+
expect(transactionEvent).toBeDefined();
25+
expect(profileEvent).toBeUndefined();
26+
},
27+
);
2628

27-
sentryTest('sends profile envelope in legacy mode', async ({ page, getLocalTestUrl }) => {
28-
if (shouldSkipTracingTest()) {
29+
sentryTest('sends profile envelope in legacy mode', async ({ page, getLocalTestUrl, browserName }) => {
30+
if (shouldSkipTracingTest() || browserName !== 'chromium') {
2931
// Profiling only works when tracing is enabled
3032
sentryTest.skip();
3133
}

0 commit comments

Comments
 (0)