@@ -198,66 +198,61 @@ def test_as_log_message_click() -> None:
198
198
199
199
200
200
def test_as_log_message_lcp () -> None :
201
- event = (
202
- {
203
- "type" : 5 ,
204
- "timestamp" : 1756400489.048 ,
205
- "data" : {
206
- "tag" : "performanceSpan" ,
207
- "payload" : {
208
- "op" : "web-vital" ,
209
- "description" : "largest-contentful-paint" ,
210
- "startTimestamp" : 1756400489.048 ,
211
- "endTimestamp" : 1756400489.048 ,
212
- "data" : {"value" : 623 , "size" : 623 , "rating" : "good" },
213
- },
201
+ event = {
202
+ "type" : 5 ,
203
+ "timestamp" : 1756400489.048 ,
204
+ "data" : {
205
+ "tag" : "performanceSpan" ,
206
+ "payload" : {
207
+ "op" : "web-vital" ,
208
+ "description" : "largest-contentful-paint" ,
209
+ "startTimestamp" : 1756400489.048 ,
210
+ "endTimestamp" : 1756400489.048 ,
211
+ "data" : {"value" : 623 , "size" : 623 , "rating" : "good" },
214
212
},
215
213
},
216
- )
214
+ }
215
+
217
216
assert (
218
217
as_log_message (event )
219
- == "Application largest contentful paint: 623 ms and has a good rating at 1756400489048"
218
+ == "Application largest contentful paint: 623 ms and has a good rating at 1756400489048.0 "
220
219
)
221
220
222
221
223
222
def test_as_log_message_navigation () -> None :
224
- event = (
225
- {
226
- "type" : 5 ,
227
- "timestamp" : 1756400579304 ,
228
- "data" : {
229
- "tag" : "breadcrumb" ,
230
- "payload" : {
231
- "timestamp" : 1756400579.304 ,
232
- "type" : "default" ,
233
- "category" : "navigation" ,
234
- "data" : {
235
- "from" : "https://url-example-previous.com" ,
236
- "to" : "https://url-example.com" ,
237
- },
223
+ event = {
224
+ "type" : 5 ,
225
+ "timestamp" : 1756400579304 ,
226
+ "data" : {
227
+ "tag" : "breadcrumb" ,
228
+ "payload" : {
229
+ "timestamp" : 1756400579.304 ,
230
+ "type" : "default" ,
231
+ "category" : "navigation" ,
232
+ "data" : {
233
+ "from" : "https://url-example-previous.com" ,
234
+ "to" : "https://url-example.com" ,
238
235
},
239
236
},
240
237
},
241
- )
238
+ }
242
239
assert as_log_message (event ) is None
243
240
244
241
245
242
def test_as_log_message_feedback () -> None :
246
- event = (
247
- {
248
- "type" : 5 ,
249
- "timestamp" : 1756400970768 ,
250
- "data" : {
251
- "tag" : "breadcrumb" ,
252
- "payload" : {
253
- "timestamp" : 1756400970.768 ,
254
- "type" : "default" ,
255
- "category" : "sentry.feedback" ,
256
- "data" : {"feedbackId" : "332f05068b2d43e6b5c5557ffecfcd0f" },
257
- },
243
+ event = {
244
+ "type" : 5 ,
245
+ "timestamp" : 1756400970768 ,
246
+ "data" : {
247
+ "tag" : "breadcrumb" ,
248
+ "payload" : {
249
+ "timestamp" : 1756400970.768 ,
250
+ "type" : "default" ,
251
+ "category" : "sentry.feedback" ,
252
+ "data" : {"feedbackId" : "332f05068b2d43e6b5c5557ffecfcd0f" },
258
253
},
259
254
},
260
- )
255
+ }
261
256
assert as_log_message (event ) is None
262
257
263
258
@@ -327,23 +322,21 @@ def test_as_log_message_resource_script() -> None:
327
322
328
323
329
324
def test_as_log_message_navigation_span () -> None :
330
- event = (
331
- {
332
- "type" : 5 ,
333
- "timestamp" : 1756400579.304 ,
334
- "data" : {
335
- "tag" : "performanceSpan" ,
336
- "payload" : {
337
- "op" : "navigation.push" ,
338
- "description" : "https://url-example.com" ,
339
- "startTimestamp" : 1756400579.304 ,
340
- "endTimestamp" : 1756400579.304 ,
341
- "data" : {"previous" : "https://url-example-prev.com" },
342
- },
325
+ event = {
326
+ "type" : 5 ,
327
+ "timestamp" : 1756400579.304 ,
328
+ "data" : {
329
+ "tag" : "performanceSpan" ,
330
+ "payload" : {
331
+ "op" : "navigation.push" ,
332
+ "description" : "https://url-example.com" ,
333
+ "startTimestamp" : 1756400579.304 ,
334
+ "endTimestamp" : 1756400579.304 ,
335
+ "data" : {"previous" : "https://url-example-prev.com" },
343
336
},
344
337
},
345
- )
346
- assert as_log_message (event ) == "User navigated to: https://url-example.com at 1756400579304"
338
+ }
339
+ assert as_log_message (event ) == "User navigated to: https://url-example.com at 1756400579304.0 "
347
340
348
341
349
342
def test_as_log_message_long_console_message () -> None :
0 commit comments