@@ -35,7 +35,6 @@ sentryTest('replay recording should contain default performance spans', async ({
35
35
const { performanceSpans : performanceSpans0 } = getCustomRecordingEvents ( await reqPromise0 ) ;
36
36
37
37
expect ( replayEvent0 ) . toEqual ( getExpectedReplayEvent ( { segment_id : 0 } ) ) ;
38
- expect ( performanceSpans0 ) . toEqual ( [ expectedMemoryPerformanceSpan ] ) ;
39
38
40
39
await page . click ( 'button' ) ;
41
40
@@ -44,11 +43,17 @@ sentryTest('replay recording should contain default performance spans', async ({
44
43
45
44
expect ( replayEvent1 ) . toEqual ( getExpectedReplayEvent ( { segment_id : 1 , urls : [ ] , replay_start_timestamp : undefined } ) ) ;
46
45
47
- expect ( performanceSpans1 ) . toEqual ( [
48
- expectedNavigationPerformanceSpan ,
49
- expectedLCPPerformanceSpan ,
50
- expectedFPPerformanceSpan ,
51
- expectedFCPPerformanceSpan ,
52
- expectedMemoryPerformanceSpan ,
53
- ] ) ;
46
+ const collectedPerformanceSpans = [ ...performanceSpans0 , ...performanceSpans1 ] ;
47
+
48
+ expect ( collectedPerformanceSpans . length ) . toBe ( 6 ) ;
49
+ expect ( collectedPerformanceSpans ) . toEqual (
50
+ expect . arrayContaining ( [
51
+ expectedNavigationPerformanceSpan ,
52
+ expectedLCPPerformanceSpan ,
53
+ expectedFPPerformanceSpan ,
54
+ expectedFCPPerformanceSpan ,
55
+ expectedMemoryPerformanceSpan , // two memory spans - once per flush
56
+ expectedMemoryPerformanceSpan ,
57
+ ] ) ,
58
+ ) ;
54
59
} ) ;
0 commit comments