@@ -84,115 +84,6 @@ describe("breadcrumbs", function() {
84
84
}
85
85
) ;
86
86
87
- it (
88
- optional (
89
- "should transform XMLHttpRequests with events to the Sentry store endpoint as sentry.event type breadcrumb" ,
90
- IS_LOADER
91
- ) ,
92
- function ( ) {
93
- return runInSandbox ( sandbox , { manual : true } , function ( ) {
94
- var store =
95
- document . location . protocol +
96
- "//" +
97
- document . location . hostname +
98
- ( document . location . port ? ":" + document . location . port : "" ) +
99
- "/api/1/store/" +
100
- "?sentry_key=1337" ;
101
-
102
- var xhr = new XMLHttpRequest ( ) ;
103
- xhr . open ( "POST" , store ) ;
104
- xhr . send ( '{"message":"someMessage","level":"warning"}' ) ;
105
- waitForXHR ( xhr , function ( ) {
106
- Sentry . captureMessage ( "test" ) ;
107
- window . finalizeManualTest ( ) ;
108
- } ) ;
109
- } ) . then ( function ( summary ) {
110
- // The async loader doesn't wrap XHR
111
- if ( IS_LOADER ) {
112
- return ;
113
- }
114
- assert . equal ( summary . breadcrumbs . length , 1 ) ;
115
- assert . equal ( summary . breadcrumbs [ 0 ] . category , "sentry.event" ) ;
116
- assert . equal ( summary . breadcrumbs [ 0 ] . level , "warning" ) ;
117
- assert . equal ( summary . breadcrumbs [ 0 ] . message , "someMessage" ) ;
118
- } ) ;
119
- }
120
- ) ;
121
-
122
- it (
123
- optional (
124
- "should transform XMLHttpRequests with transactions type to the Sentry store endpoint as sentry.transaction type breadcrumb" ,
125
- IS_LOADER
126
- ) ,
127
- function ( ) {
128
- return runInSandbox ( sandbox , { manual : true } , function ( ) {
129
- var store =
130
- document . location . protocol +
131
- "//" +
132
- document . location . hostname +
133
- ( document . location . port ? ":" + document . location . port : "" ) +
134
- "/api/1/store/" +
135
- "?sentry_key=1337" ;
136
-
137
- var xhr = new XMLHttpRequest ( ) ;
138
- xhr . open ( "POST" , store ) ;
139
- xhr . send (
140
- '{"message":"someMessage","transaction":"wat","level":"warning", "type": "transaction"}'
141
- ) ;
142
- waitForXHR ( xhr , function ( ) {
143
- Sentry . captureMessage ( "test" ) ;
144
- window . finalizeManualTest ( ) ;
145
- } ) ;
146
- } ) . then ( function ( summary ) {
147
- // The async loader doesn't wrap XHR
148
- if ( IS_LOADER ) {
149
- return ;
150
- }
151
- assert . equal ( summary . breadcrumbs . length , 1 ) ;
152
- assert . equal ( summary . breadcrumbs [ 0 ] . category , "sentry.transaction" ) ;
153
- assert . equal ( summary . breadcrumbs [ 0 ] . level , "warning" ) ;
154
- assert . equal ( summary . breadcrumbs [ 0 ] . message , "someMessage" ) ;
155
- } ) ;
156
- }
157
- ) ;
158
-
159
- it (
160
- optional (
161
- "should not transform XMLHttpRequests with transactions attribute to the Sentry store endpoint as sentry.transaction type breadcrumb" ,
162
- IS_LOADER
163
- ) ,
164
- function ( ) {
165
- return runInSandbox ( sandbox , { manual : true } , function ( ) {
166
- var store =
167
- document . location . protocol +
168
- "//" +
169
- document . location . hostname +
170
- ( document . location . port ? ":" + document . location . port : "" ) +
171
- "/api/1/store/" +
172
- "?sentry_key=1337" ;
173
-
174
- var xhr = new XMLHttpRequest ( ) ;
175
- xhr . open ( "POST" , store ) ;
176
- xhr . send (
177
- '{"message":"someMessage","transaction":"wat","level":"warning"}'
178
- ) ;
179
- waitForXHR ( xhr , function ( ) {
180
- Sentry . captureMessage ( "test" ) ;
181
- window . finalizeManualTest ( ) ;
182
- } ) ;
183
- } ) . then ( function ( summary ) {
184
- // The async loader doesn't wrap XHR
185
- if ( IS_LOADER ) {
186
- return ;
187
- }
188
- assert . equal ( summary . breadcrumbs . length , 1 ) ;
189
- assert . equal ( summary . breadcrumbs [ 0 ] . category , "sentry.event" ) ;
190
- assert . equal ( summary . breadcrumbs [ 0 ] . level , "warning" ) ;
191
- assert . equal ( summary . breadcrumbs [ 0 ] . message , "someMessage" ) ;
192
- } ) ;
193
- }
194
- ) ;
195
-
196
87
it ( "should record a fetch request" , function ( ) {
197
88
return runInSandbox ( sandbox , { manual : true } , function ( ) {
198
89
fetch ( "/base/subjects/example.json" , {
0 commit comments