Skip to content

Commit 9b15302

Browse files
committed
fix tests
1 parent a577c4f commit 9b15302

1 file changed

Lines changed: 65 additions & 7 deletions

File tree

  • dev-packages/browser-integration-tests/suites/public-api/logger/integration

dev-packages/browser-integration-tests/suites/public-api/logger/integration/test.ts

Lines changed: 65 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,30 @@ sentryTest('should capture console object calls', async ({ getLocalTestUrl, page
1616
const event = await getFirstSentryEnvelopeRequest<OtelLogEnvelope>(page, url, properFullEnvelopeRequestParser);
1717
const envelopeItems = event[1];
1818

19+
// - "attributes": Array [],
20+
// + "attributes": Array [
21+
// + Object {
22+
// + "key": "sentry.origin",
23+
// + "value": Object {
24+
// + "stringValue": "auto.console.logging",
25+
// + },
26+
// + },
27+
// + ],
1928
expect(envelopeItems[0]).toEqual([
2029
{
2130
type: 'otel_log',
2231
},
2332
{
2433
severityText: 'trace',
2534
body: { stringValue: 'console.trace 123 false' },
26-
attributes: [],
35+
attributes: [
36+
{
37+
key: 'sentry.origin',
38+
value: {
39+
stringValue: 'auto.console.logging',
40+
},
41+
},
42+
],
2743
timeUnixNano: expect.any(String),
2844
traceId: expect.any(String),
2945
severityNumber: 1,
@@ -37,7 +53,14 @@ sentryTest('should capture console object calls', async ({ getLocalTestUrl, page
3753
{
3854
severityText: 'debug',
3955
body: { stringValue: 'console.debug 123 false' },
40-
attributes: [],
56+
attributes: [
57+
{
58+
key: 'sentry.origin',
59+
value: {
60+
stringValue: 'auto.console.logging',
61+
},
62+
},
63+
],
4164
timeUnixNano: expect.any(String),
4265
traceId: expect.any(String),
4366
severityNumber: 5,
@@ -51,7 +74,14 @@ sentryTest('should capture console object calls', async ({ getLocalTestUrl, page
5174
{
5275
severityText: 'info',
5376
body: { stringValue: 'console.log 123 false' },
54-
attributes: [],
77+
attributes: [
78+
{
79+
key: 'sentry.origin',
80+
value: {
81+
stringValue: 'auto.console.logging',
82+
},
83+
},
84+
],
5585
timeUnixNano: expect.any(String),
5686
traceId: expect.any(String),
5787
severityNumber: 10,
@@ -65,7 +95,14 @@ sentryTest('should capture console object calls', async ({ getLocalTestUrl, page
6595
{
6696
severityText: 'info',
6797
body: { stringValue: 'console.info 123 false' },
68-
attributes: [],
98+
attributes: [
99+
{
100+
key: 'sentry.origin',
101+
value: {
102+
stringValue: 'auto.console.logging',
103+
},
104+
},
105+
],
69106
timeUnixNano: expect.any(String),
70107
traceId: expect.any(String),
71108
severityNumber: 9,
@@ -79,7 +116,14 @@ sentryTest('should capture console object calls', async ({ getLocalTestUrl, page
79116
{
80117
severityText: 'warn',
81118
body: { stringValue: 'console.warn 123 false' },
82-
attributes: [],
119+
attributes: [
120+
{
121+
key: 'sentry.origin',
122+
value: {
123+
stringValue: 'auto.console.logging',
124+
},
125+
},
126+
],
83127
timeUnixNano: expect.any(String),
84128
traceId: expect.any(String),
85129
severityNumber: 13,
@@ -93,7 +137,14 @@ sentryTest('should capture console object calls', async ({ getLocalTestUrl, page
93137
{
94138
severityText: 'error',
95139
body: { stringValue: 'console.error 123 false' },
96-
attributes: [],
140+
attributes: [
141+
{
142+
key: 'sentry.origin',
143+
value: {
144+
stringValue: 'auto.console.logging',
145+
},
146+
},
147+
],
97148
timeUnixNano: expect.any(String),
98149
traceId: expect.any(String),
99150
severityNumber: 17,
@@ -107,7 +158,14 @@ sentryTest('should capture console object calls', async ({ getLocalTestUrl, page
107158
{
108159
severityText: 'error',
109160
body: { stringValue: 'Assertion failed: console.assert 123 false' },
110-
attributes: [],
161+
attributes: [
162+
{
163+
key: 'sentry.origin',
164+
value: {
165+
stringValue: 'auto.console.logging',
166+
},
167+
},
168+
],
111169
timeUnixNano: expect.any(String),
112170
traceId: expect.any(String),
113171
severityNumber: 17,

0 commit comments

Comments
 (0)