]> source.dussan.org Git - sonarqube.git/blob
fe59402ddfe6cdb8e63f4e21e6b2a53f933aedca
[sonarqube.git] /
1 // Jest Snapshot v1, https://goo.gl/fbAQLP
2
3 exports[`should render CrossComponentSourceViewer correctly 1`] = `
4 <div>
5   <CrossComponentSourceViewer
6     branchLike={
7       Object {
8         "analysisDate": "2018-01-01",
9         "excludedFromPurge": true,
10         "isMain": true,
11         "name": "master",
12       }
13     }
14     issue={
15       Object {
16         "actions": Array [],
17         "component": "main.js",
18         "componentLongName": "main.js",
19         "componentQualifier": "FIL",
20         "componentUuid": "foo1234",
21         "creationDate": "2017-03-01T09:36:01+0100",
22         "flows": Array [
23           Array [
24             Object {
25               "component": "main.js",
26               "index": 0,
27               "textRange": Object {
28                 "endLine": 2,
29                 "endOffset": 2,
30                 "startLine": 1,
31                 "startOffset": 1,
32               },
33             },
34             Object {
35               "component": "main.js",
36               "index": 1,
37               "textRange": Object {
38                 "endLine": 2,
39                 "endOffset": 2,
40                 "startLine": 1,
41                 "startOffset": 1,
42               },
43             },
44             Object {
45               "component": "main.js",
46               "index": 2,
47               "textRange": Object {
48                 "endLine": 2,
49                 "endOffset": 2,
50                 "startLine": 1,
51                 "startOffset": 1,
52               },
53             },
54           ],
55           Array [
56             Object {
57               "component": "main.js",
58               "textRange": Object {
59                 "endLine": 2,
60                 "endOffset": 2,
61                 "startLine": 1,
62                 "startOffset": 1,
63               },
64             },
65             Object {
66               "component": "main.js",
67               "textRange": Object {
68                 "endLine": 2,
69                 "endOffset": 2,
70                 "startLine": 1,
71                 "startOffset": 1,
72               },
73             },
74           ],
75         ],
76         "fromHotspot": false,
77         "key": "AVsae-CQS-9G3txfbFN2",
78         "line": 25,
79         "message": "Reduce the number of conditional operators (4) used in the expression",
80         "project": "myproject",
81         "projectKey": "foo",
82         "projectName": "Foo",
83         "rule": "javascript:S1067",
84         "ruleName": "foo",
85         "secondaryLocations": Array [
86           Object {
87             "component": "main.js",
88             "textRange": Object {
89               "endLine": 2,
90               "endOffset": 2,
91               "startLine": 1,
92               "startOffset": 1,
93             },
94           },
95           Object {
96             "component": "main.js",
97             "textRange": Object {
98               "endLine": 2,
99               "endOffset": 2,
100               "startLine": 1,
101               "startOffset": 1,
102             },
103           },
104         ],
105         "severity": "MAJOR",
106         "status": "OPEN",
107         "textRange": Object {
108           "endLine": 26,
109           "endOffset": 15,
110           "startLine": 25,
111           "startOffset": 0,
112         },
113         "transitions": Array [],
114         "type": "BUG",
115       }
116     }
117     issues={
118       Array [
119         Object {
120           "actions": Array [],
121           "component": "main.js",
122           "componentLongName": "main.js",
123           "componentQualifier": "FIL",
124           "componentUuid": "foo1234",
125           "creationDate": "2017-03-01T09:36:01+0100",
126           "flows": Array [
127             Array [
128               Object {
129                 "component": "main.js",
130                 "textRange": Object {
131                   "endLine": 2,
132                   "endOffset": 2,
133                   "startLine": 1,
134                   "startOffset": 1,
135                 },
136               },
137               Object {
138                 "component": "main.js",
139                 "textRange": Object {
140                   "endLine": 2,
141                   "endOffset": 2,
142                   "startLine": 1,
143                   "startOffset": 1,
144                 },
145               },
146               Object {
147                 "component": "main.js",
148                 "textRange": Object {
149                   "endLine": 2,
150                   "endOffset": 2,
151                   "startLine": 1,
152                   "startOffset": 1,
153                 },
154               },
155             ],
156             Array [
157               Object {
158                 "component": "main.js",
159                 "textRange": Object {
160                   "endLine": 2,
161                   "endOffset": 2,
162                   "startLine": 1,
163                   "startOffset": 1,
164                 },
165               },
166               Object {
167                 "component": "main.js",
168                 "textRange": Object {
169                   "endLine": 2,
170                   "endOffset": 2,
171                   "startLine": 1,
172                   "startOffset": 1,
173                 },
174               },
175             ],
176           ],
177           "fromHotspot": false,
178           "key": "AVsae-CQS-9G3txfbFN2",
179           "line": 25,
180           "message": "Reduce the number of conditional operators (4) used in the expression",
181           "project": "myproject",
182           "projectKey": "foo",
183           "projectName": "Foo",
184           "rule": "javascript:S1067",
185           "ruleName": "foo",
186           "secondaryLocations": Array [
187             Object {
188               "component": "main.js",
189               "textRange": Object {
190                 "endLine": 2,
191                 "endOffset": 2,
192                 "startLine": 1,
193                 "startOffset": 1,
194               },
195             },
196             Object {
197               "component": "main.js",
198               "textRange": Object {
199                 "endLine": 2,
200                 "endOffset": 2,
201                 "startLine": 1,
202                 "startOffset": 1,
203               },
204             },
205           ],
206           "severity": "MAJOR",
207           "status": "OPEN",
208           "textRange": Object {
209             "endLine": 26,
210             "endOffset": 15,
211             "startLine": 25,
212             "startOffset": 0,
213           },
214           "transitions": Array [],
215           "type": "BUG",
216         },
217       ]
218     }
219     locations={
220       Array [
221         Object {
222           "component": "main.js",
223           "index": 0,
224           "textRange": Object {
225             "endLine": 2,
226             "endOffset": 2,
227             "startLine": 1,
228             "startOffset": 1,
229           },
230         },
231         Object {
232           "component": "main.js",
233           "index": 1,
234           "textRange": Object {
235             "endLine": 2,
236             "endOffset": 2,
237             "startLine": 1,
238             "startOffset": 1,
239           },
240         },
241         Object {
242           "component": "main.js",
243           "index": 2,
244           "textRange": Object {
245             "endLine": 2,
246             "endOffset": 2,
247             "startLine": 1,
248             "startOffset": 1,
249           },
250         },
251       ]
252     }
253     onIssueChange={[MockFunction]}
254     onLoaded={[Function]}
255     onLocationSelect={[MockFunction]}
256     scroll={[Function]}
257   />
258 </div>
259 `;
260
261 exports[`should render SourceViewer correctly 1`] = `
262 <div>
263   <SourceViewer
264     aroundLine={26}
265     branchLike={
266       Object {
267         "analysisDate": "2018-01-01",
268         "excludedFromPurge": true,
269         "isMain": true,
270         "name": "master",
271       }
272     }
273     component="main.js"
274     displayAllIssues={true}
275     displayIssueLocationsCount={true}
276     displayIssueLocationsLink={false}
277     displayLocationMarkers={false}
278     highlightedLocations={Array []}
279     loadIssues={[MockFunction]}
280     onIssueChange={[MockFunction]}
281     onIssueSelect={[MockFunction]}
282     onLoaded={[Function]}
283     onLocationSelect={[MockFunction]}
284     scroll={[Function]}
285     selectedIssue="AVsae-CQS-9G3txfbFN2"
286     slimHeader={true}
287   />
288 </div>
289 `;