@@ -4,7 +4,6 @@ import {ProjectFixture} from 'sentry-fixture/project';
4
4
5
5
import { render , screen , waitForElementToBeRemoved } from 'sentry-test/reactTestingLibrary' ;
6
6
7
- import { EntryType } from 'sentry/types/event' ;
8
7
import usePageFilters from 'sentry/utils/usePageFilters' ;
9
8
import { FullSpanDescription } from 'sentry/views/insights/common/components/fullSpanDescription' ;
10
9
import { ModuleName } from 'sentry/views/insights/types' ;
@@ -24,35 +23,16 @@ describe('FullSpanDescription', function () {
24
23
25
24
const groupId = '2ed2abf6ce7e3577' ;
26
25
const spanId = 'abfed2aabf' ;
27
- const eventId = '65c7d8647b8a76ef8f4c05d41deb7860' ;
28
26
29
27
it ( 'uses the correct code formatting for SQL queries' , async function ( ) {
30
28
MockApiClient . addMockResponse ( {
31
29
url : `/organizations/${ organization . slug } /events/` ,
32
30
body : {
33
31
data : [
34
32
{
35
- 'transaction.id' : eventId ,
36
33
project : project . slug ,
37
34
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;' ,
56
36
} ,
57
37
] ,
58
38
} ,
@@ -82,28 +62,10 @@ describe('FullSpanDescription', function () {
82
62
body : {
83
63
data : [
84
64
{
85
- 'transaction.id' : eventId ,
86
65
project : project . slug ,
87
66
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' ,
107
69
} ,
108
70
] ,
109
71
} ,
@@ -128,28 +90,10 @@ describe('FullSpanDescription', function () {
128
90
body : {
129
91
data : [
130
92
{
131
- 'transaction.id' : eventId ,
132
93
project : project . slug ,
133
94
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' ,
153
97
} ,
154
98
] ,
155
99
} ,
0 commit comments