Skip to content

Commit 88e3a1b

Browse files
committed
fix tests
1 parent b72711d commit 88e3a1b

5 files changed

Lines changed: 34 additions & 26 deletions

File tree

.size-limit.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ module.exports = [
276276
path: createCDNPath('bundle.tracing.replay.min.js'),
277277
gzip: false,
278278
brotli: false,
279-
limit: '255 KB',
279+
limit: '255.5 KB',
280280
},
281281
{
282282
name: 'CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed',

dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/interactions-streamed/test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ sentryTest('captures streamed interaction span tree. @firefox', async ({ browser
9999
});
100100

101101
const loAFSpans = interactionSpanTree.filter(span => getSpanOp(span)?.startsWith('ui.long-animation-frame'));
102-
expect(loAFSpans).toHaveLength(1);
102+
expect(loAFSpans).toHaveLength(browserName === 'chromium' ? 1 : 0);
103103

104104
const interactionSpan = interactionSpanTree.find(span => getSpanOp(span) === 'ui.interaction.click');
105105
expect(interactionSpan).toEqual({

dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/navigation-streamed/test.ts

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import {
1515
waitForStreamedSpanEnvelope,
1616
} from '../../../../utils/spanUtils';
1717

18-
sentryTest('starts a streamed navigation span on page navigation', async ({ getLocalTestUrl, page }) => {
18+
sentryTest('starts a streamed navigation span on page navigation', async ({ browserName, getLocalTestUrl, page }) => {
1919
sentryTest.skip(shouldSkipTracingTest());
2020

2121
const pageloadSpanPromise = waitForStreamedSpan(page, span => getSpanOp(span) === 'pageload');
@@ -81,18 +81,20 @@ sentryTest('starts a streamed navigation span on page navigation', async ({ getL
8181
type: 'string',
8282
value: expect.any(String),
8383
},
84-
'network.connection.effective_type': {
85-
type: 'string',
86-
value: expect.any(String),
87-
},
8884
'device.processor_count': {
8985
type: expect.stringMatching(/^(integer)|(double)$/),
9086
value: expect.any(Number),
9187
},
92-
'network.connection.rtt': {
93-
type: expect.stringMatching(/^(integer)|(double)$/),
94-
value: expect.any(Number),
95-
},
88+
...(browserName !== 'webkit' && {
89+
'network.connection.effective_type': {
90+
type: 'string',
91+
value: expect.any(String),
92+
},
93+
'network.connection.rtt': {
94+
type: expect.stringMatching(/^(integer)|(double)$/),
95+
value: expect.any(Number),
96+
},
97+
}),
9698
'sentry.idle_span_finish_reason': {
9799
type: 'string',
98100
value: 'idleTimeout',

dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/pageload-streamed/test.ts

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import { getSpanOp, getSpansFromEnvelope, waitForStreamedSpanEnvelope } from '..
1616

1717
sentryTest(
1818
'creates a pageload streamed span envelope with url as pageload span name source',
19-
async ({ getLocalTestUrl, page }) => {
19+
async ({ browserName, getLocalTestUrl, page }) => {
2020
sentryTest.skip(shouldSkipTracingTest());
2121

2222
const spanEnvelopePromise = waitForStreamedSpanEnvelope(
@@ -74,11 +74,6 @@ sentryTest(
7474
type: 'string',
7575
value: expect.any(String),
7676
},
77-
// formerly known as 'effectiveConnectionType'
78-
'network.connection.effective_type': {
79-
type: 'string',
80-
value: expect.any(String),
81-
},
8277
// formerly known as 'hardwareConcurrency'
8378
'device.processor_count': {
8479
type: expect.stringMatching(/^(integer)|(double)$/),
@@ -92,18 +87,25 @@ sentryTest(
9287
type: expect.stringMatching(/^(integer)|(double)$/),
9388
value: expect.any(Number),
9489
},
95-
'network.connection.rtt': {
96-
type: expect.stringMatching(/^(integer)|(double)$/),
97-
value: expect.any(Number),
98-
},
9990
'browser.web_vital.ttfb.request_time': {
10091
type: expect.stringMatching(/^(integer)|(double)$/),
10192
value: expect.any(Number),
10293
},
103-
'browser.web_vital.ttfb.value': {
104-
type: expect.stringMatching(/^(integer)|(double)$/),
105-
value: expect.any(Number),
106-
},
94+
...(browserName !== 'webkit' && {
95+
// formerly known as 'effectiveConnectionType'
96+
'network.connection.effective_type': {
97+
type: 'string',
98+
value: expect.any(String),
99+
},
100+
'network.connection.rtt': {
101+
type: expect.stringMatching(/^(integer)|(double)$/),
102+
value: expect.any(Number),
103+
},
104+
'browser.web_vital.ttfb.value': {
105+
type: expect.stringMatching(/^(integer)|(double)$/),
106+
value: expect.any(Number),
107+
},
108+
}),
107109
'sentry.idle_span_finish_reason': {
108110
type: 'string',
109111
value: 'idleTimeout',

dev-packages/browser-integration-tests/suites/tracing/request/fetch-streamed/test.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,11 @@ sentryTest('creates spans for fetch requests', async ({ getLocalTestUrl, page })
1919

2020
const allSpans = await spansPromise;
2121
const pageloadSpan = allSpans.find(s => getSpanOp(s) === 'pageload');
22-
const requestSpans = allSpans.filter(s => getSpanOp(s) === 'http.client');
22+
const requestSpans = allSpans
23+
.filter(s => getSpanOp(s) === 'http.client')
24+
.sort((a, b) =>
25+
(a.attributes!['http.url']!.value as string).localeCompare(b.attributes!['http.url']!.value as string),
26+
);
2327

2428
expect(requestSpans).toHaveLength(3);
2529

0 commit comments

Comments
 (0)