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