1
1
import { EventType } from '@sentry-internal/rrweb' ;
2
2
3
+ import { BreadcrumbType } from 'sentry/types/breadcrumbs' ;
3
4
import ReplayReader from 'sentry/utils/replays/replayReader' ;
4
5
5
6
describe ( 'ReplayReader' , ( ) => {
@@ -86,6 +87,20 @@ describe('ReplayReader', () => {
86
87
endTimestamp : new Date ( '2023-12-25T00:03:30' ) ,
87
88
} ) ;
88
89
const consoleEvent = TestStubs . Replay . ConsoleEvent ( { timestamp} ) ;
90
+ const customEvent = TestStubs . Replay . BreadcrumbFrameEvent ( {
91
+ timestamp : new Date ( '2023-12-25T00:02:30' ) ,
92
+ data : {
93
+ payload : {
94
+ category : 'redux.action' ,
95
+ data : {
96
+ action : 'save.click' ,
97
+ } ,
98
+ message : '' ,
99
+ timestamp : new Date ( '2023-12-25T00:02:30' ) . getTime ( ) / 1000 ,
100
+ type : BreadcrumbType . DEFAULT ,
101
+ } ,
102
+ } ,
103
+ } ) ;
89
104
const attachments = [
90
105
clickEvent ,
91
106
consoleEvent ,
@@ -95,6 +110,7 @@ describe('ReplayReader', () => {
95
110
optionsEvent ,
96
111
secondDiv ,
97
112
secondMemory ,
113
+ customEvent ,
98
114
] ;
99
115
100
116
it . each ( [
@@ -139,6 +155,7 @@ describe('ReplayReader', () => {
139
155
expected : [
140
156
expect . objectContaining ( { category : 'replay.init' } ) ,
141
157
expect . objectContaining ( { category : 'ui.click' } ) ,
158
+ expect . objectContaining ( { category : 'redux.action' } ) ,
142
159
expect . objectContaining ( { op : 'navigation.navigate' } ) ,
143
160
] ,
144
161
} ,
0 commit comments