Skip to content

Commit 37f5ffc

Browse files
committed
update test
1 parent f936f76 commit 37f5ffc

File tree

1 file changed

+5
-61
lines changed

1 file changed

+5
-61
lines changed

static/app/views/insights/common/components/fullSpanDescription.spec.tsx

Lines changed: 5 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import {ProjectFixture} from 'sentry-fixture/project';
44

55
import {render, screen, waitForElementToBeRemoved} from 'sentry-test/reactTestingLibrary';
66

7-
import {EntryType} from 'sentry/types/event';
87
import usePageFilters from 'sentry/utils/usePageFilters';
98
import {FullSpanDescription} from 'sentry/views/insights/common/components/fullSpanDescription';
109
import {ModuleName} from 'sentry/views/insights/types';
@@ -24,35 +23,16 @@ describe('FullSpanDescription', function () {
2423

2524
const groupId = '2ed2abf6ce7e3577';
2625
const spanId = 'abfed2aabf';
27-
const eventId = '65c7d8647b8a76ef8f4c05d41deb7860';
2826

2927
it('uses the correct code formatting for SQL queries', async function () {
3028
MockApiClient.addMockResponse({
3129
url: `/organizations/${organization.slug}/events/`,
3230
body: {
3331
data: [
3432
{
35-
'transaction.id': eventId,
3633
project: project.slug,
3734
span_id: spanId,
38-
},
39-
],
40-
},
41-
});
42-
43-
MockApiClient.addMockResponse({
44-
url: `/organizations/${organization.slug}/events/${project.slug}:${eventId}/`,
45-
body: {
46-
id: eventId,
47-
entries: [
48-
{
49-
type: EntryType.SPANS,
50-
data: [
51-
{
52-
span_id: spanId,
53-
description: 'SELECT users FROM my_table LIMIT 1;',
54-
},
55-
],
35+
'span.description': 'SELECT users FROM my_table LIMIT 1;',
5636
},
5737
],
5838
},
@@ -82,28 +62,10 @@ describe('FullSpanDescription', function () {
8262
body: {
8363
data: [
8464
{
85-
'transaction.id': eventId,
8665
project: project.slug,
8766
span_id: spanId,
88-
},
89-
],
90-
},
91-
});
92-
93-
MockApiClient.addMockResponse({
94-
url: `/organizations/${organization.slug}/events/${project.slug}:${eventId}/`,
95-
body: {
96-
id: eventId,
97-
entries: [
98-
{
99-
type: EntryType.SPANS,
100-
data: [
101-
{
102-
span_id: spanId,
103-
description: `{"insert": "my_cool_collection😎", "a": {}}`,
104-
data: {'db.system': 'mongodb'},
105-
},
106-
],
67+
'span.description': `{"insert": "my_cool_collection😎", "a": {}}`,
68+
'db.system': 'mongodb',
10769
},
10870
],
10971
},
@@ -128,28 +90,10 @@ describe('FullSpanDescription', function () {
12890
body: {
12991
data: [
13092
{
131-
'transaction.id': eventId,
13293
project: project.slug,
13394
span_id: spanId,
134-
},
135-
],
136-
},
137-
});
138-
139-
MockApiClient.addMockResponse({
140-
url: `/organizations/${organization.slug}/events/${project.slug}:${eventId}/`,
141-
body: {
142-
id: eventId,
143-
entries: [
144-
{
145-
type: EntryType.SPANS,
146-
data: [
147-
{
148-
span_id: spanId,
149-
description: `{"insert": "my_cool_collection😎", "a": {}, "uh_oh":"the_query_is_truncated", "ohno*`,
150-
data: {'db.system': 'mongodb'},
151-
},
152-
],
95+
'span.description': `{"insert": "my_cool_collection😎", "a": {}, "uh_oh":"the_query_is_truncated", "ohno*`,
96+
'db.system': 'mongodb',
15397
},
15498
],
15599
},

0 commit comments

Comments
 (0)