]> source.dussan.org Git - sonarqube.git/blob
2a46900c6adb664cc8ae0cc7f734765148a6e912
[sonarqube.git] /
1 // Jest Snapshot v1, https://goo.gl/fbAQLP
2
3 exports[`should render correctly 1`] = `
4 <Fragment>
5   <p
6     className="spacer-bottom"
7   >
8     hotspots.no_associated_lines
9   </p>
10   <withCurrentUserContext(HotspotSnippetHeader)
11     branchLike={
12       Object {
13         "analysisDate": "2018-01-01",
14         "excludedFromPurge": true,
15         "isMain": true,
16         "name": "master",
17       }
18     }
19     component={
20       Object {
21         "breadcrumbs": Array [],
22         "key": "my-project",
23         "name": "MyProject",
24         "qualifier": "TRK",
25         "qualityGate": Object {
26           "isDefault": true,
27           "key": "30",
28           "name": "Sonar way",
29         },
30         "qualityProfiles": Array [
31           Object {
32             "deleted": false,
33             "key": "my-qp",
34             "language": "ts",
35             "name": "Sonar way",
36           },
37         ],
38         "tags": Array [],
39       }
40     }
41     hotspot={
42       Object {
43         "assignee": "assignee",
44         "assigneeUser": Object {
45           "active": true,
46           "local": true,
47           "login": "assignee",
48           "name": "John Doe",
49         },
50         "author": "author",
51         "authorUser": Object {
52           "active": true,
53           "local": true,
54           "login": "author",
55           "name": "John Doe",
56         },
57         "canChangeStatus": true,
58         "changelog": Array [],
59         "comment": Array [],
60         "component": Object {
61           "key": "hotspot-component",
62           "longName": "Hotspot component long name",
63           "name": "Hotspot Component",
64           "path": "path/to/component",
65           "qualifier": "FIL",
66         },
67         "creationDate": "2013-05-13T17:55:41+0200",
68         "flows": Array [
69           Object {
70             "locations": Array [
71               Object {
72                 "component": "main.js",
73                 "textRange": Object {
74                   "endLine": 2,
75                   "endOffset": 2,
76                   "startLine": 1,
77                   "startOffset": 1,
78                 },
79               },
80             ],
81           },
82         ],
83         "key": "01fc972e-2a3c-433e-bcae-0bd7f88f5123",
84         "line": 142,
85         "message": "'3' is a magic number.",
86         "project": Object {
87           "key": "hotspot-component",
88           "longName": "Hotspot component long name",
89           "name": "Hotspot Component",
90           "path": "path/to/component",
91           "qualifier": "TRK",
92         },
93         "resolution": "FIXED",
94         "rule": Object {
95           "fixRecommendations": "<p>This a <strong>strong</strong> message about fixing !</p>",
96           "key": "squid:S2077",
97           "name": "That rule",
98           "riskDescription": "<p>This a <strong>strong</strong> message about risk !</p>",
99           "securityCategory": "sql-injection",
100           "vulnerabilityDescription": "<p>This a <strong>strong</strong> message about vulnerability !</p>",
101           "vulnerabilityProbability": "HIGH",
102         },
103         "status": "REVIEWED",
104         "textRange": Object {
105           "endLine": 142,
106           "endOffset": 83,
107           "startLine": 142,
108           "startOffset": 26,
109         },
110         "updateDate": "2013-05-13T17:55:42+0200",
111         "users": Array [
112           Object {
113             "active": true,
114             "local": true,
115             "login": "assignee",
116             "name": "John Doe",
117           },
118           Object {
119             "active": true,
120             "local": true,
121             "login": "author",
122             "name": "John Doe",
123           },
124         ],
125       }
126     }
127   />
128   <div
129     className="hotspot-snippet-container bordered"
130   >
131     <DeferredSpinner
132       className="big-spacer"
133       loading={false}
134     />
135   </div>
136 </Fragment>
137 `;
138
139 exports[`should render correctly when secondary location is selected: with selected hotspot location 1`] = `
140 <Fragment>
141   <p
142     className="spacer-bottom"
143   >
144     hotspots.no_associated_lines
145   </p>
146   <withCurrentUserContext(HotspotSnippetHeader)
147     branchLike={
148       Object {
149         "analysisDate": "2018-01-01",
150         "excludedFromPurge": true,
151         "isMain": true,
152         "name": "master",
153       }
154     }
155     component={
156       Object {
157         "breadcrumbs": Array [],
158         "key": "my-project",
159         "name": "MyProject",
160         "qualifier": "TRK",
161         "qualityGate": Object {
162           "isDefault": true,
163           "key": "30",
164           "name": "Sonar way",
165         },
166         "qualityProfiles": Array [
167           Object {
168             "deleted": false,
169             "key": "my-qp",
170             "language": "ts",
171             "name": "Sonar way",
172           },
173         ],
174         "tags": Array [],
175       }
176     }
177     hotspot={
178       Object {
179         "assignee": "assignee",
180         "assigneeUser": Object {
181           "active": true,
182           "local": true,
183           "login": "assignee",
184           "name": "John Doe",
185         },
186         "author": "author",
187         "authorUser": Object {
188           "active": true,
189           "local": true,
190           "login": "author",
191           "name": "John Doe",
192         },
193         "canChangeStatus": true,
194         "changelog": Array [],
195         "comment": Array [],
196         "component": Object {
197           "key": "hotspot-component",
198           "longName": "Hotspot component long name",
199           "name": "Hotspot Component",
200           "path": "path/to/component",
201           "qualifier": "FIL",
202         },
203         "creationDate": "2013-05-13T17:55:41+0200",
204         "flows": Array [
205           Object {
206             "locations": Array [
207               Object {
208                 "component": "main.js",
209                 "textRange": Object {
210                   "endLine": 2,
211                   "endOffset": 2,
212                   "startLine": 1,
213                   "startOffset": 1,
214                 },
215               },
216             ],
217           },
218         ],
219         "key": "01fc972e-2a3c-433e-bcae-0bd7f88f5123",
220         "line": 142,
221         "message": "'3' is a magic number.",
222         "project": Object {
223           "key": "hotspot-component",
224           "longName": "Hotspot component long name",
225           "name": "Hotspot Component",
226           "path": "path/to/component",
227           "qualifier": "TRK",
228         },
229         "resolution": "FIXED",
230         "rule": Object {
231           "fixRecommendations": "<p>This a <strong>strong</strong> message about fixing !</p>",
232           "key": "squid:S2077",
233           "name": "That rule",
234           "riskDescription": "<p>This a <strong>strong</strong> message about risk !</p>",
235           "securityCategory": "sql-injection",
236           "vulnerabilityDescription": "<p>This a <strong>strong</strong> message about vulnerability !</p>",
237           "vulnerabilityProbability": "HIGH",
238         },
239         "status": "REVIEWED",
240         "textRange": Object {
241           "endLine": 142,
242           "endOffset": 83,
243           "startLine": 142,
244           "startOffset": 26,
245         },
246         "updateDate": "2013-05-13T17:55:42+0200",
247         "users": Array [
248           Object {
249             "active": true,
250             "local": true,
251             "login": "assignee",
252             "name": "John Doe",
253           },
254           Object {
255             "active": true,
256             "local": true,
257             "login": "author",
258             "name": "John Doe",
259           },
260         ],
261       }
262     }
263   />
264   <div
265     className="hotspot-snippet-container bordered"
266   >
267     <DeferredSpinner
268       className="big-spacer"
269       loading={false}
270     />
271   </div>
272 </Fragment>
273 `;
274
275 exports[`should render correctly: with sourcelines 1`] = `
276 <Fragment>
277   <withCurrentUserContext(HotspotSnippetHeader)
278     branchLike={
279       Object {
280         "analysisDate": "2018-01-01",
281         "excludedFromPurge": true,
282         "isMain": true,
283         "name": "master",
284       }
285     }
286     component={
287       Object {
288         "breadcrumbs": Array [],
289         "key": "my-project",
290         "name": "MyProject",
291         "qualifier": "TRK",
292         "qualityGate": Object {
293           "isDefault": true,
294           "key": "30",
295           "name": "Sonar way",
296         },
297         "qualityProfiles": Array [
298           Object {
299             "deleted": false,
300             "key": "my-qp",
301             "language": "ts",
302             "name": "Sonar way",
303           },
304         ],
305         "tags": Array [],
306       }
307     }
308     hotspot={
309       Object {
310         "assignee": "assignee",
311         "assigneeUser": Object {
312           "active": true,
313           "local": true,
314           "login": "assignee",
315           "name": "John Doe",
316         },
317         "author": "author",
318         "authorUser": Object {
319           "active": true,
320           "local": true,
321           "login": "author",
322           "name": "John Doe",
323         },
324         "canChangeStatus": true,
325         "changelog": Array [],
326         "comment": Array [],
327         "component": Object {
328           "key": "hotspot-component",
329           "longName": "Hotspot component long name",
330           "name": "Hotspot Component",
331           "path": "path/to/component",
332           "qualifier": "FIL",
333         },
334         "creationDate": "2013-05-13T17:55:41+0200",
335         "flows": Array [
336           Object {
337             "locations": Array [
338               Object {
339                 "component": "main.js",
340                 "textRange": Object {
341                   "endLine": 2,
342                   "endOffset": 2,
343                   "startLine": 1,
344                   "startOffset": 1,
345                 },
346               },
347             ],
348           },
349         ],
350         "key": "01fc972e-2a3c-433e-bcae-0bd7f88f5123",
351         "line": 142,
352         "message": "'3' is a magic number.",
353         "project": Object {
354           "key": "hotspot-component",
355           "longName": "Hotspot component long name",
356           "name": "Hotspot Component",
357           "path": "path/to/component",
358           "qualifier": "TRK",
359         },
360         "resolution": "FIXED",
361         "rule": Object {
362           "fixRecommendations": "<p>This a <strong>strong</strong> message about fixing !</p>",
363           "key": "squid:S2077",
364           "name": "That rule",
365           "riskDescription": "<p>This a <strong>strong</strong> message about risk !</p>",
366           "securityCategory": "sql-injection",
367           "vulnerabilityDescription": "<p>This a <strong>strong</strong> message about vulnerability !</p>",
368           "vulnerabilityProbability": "HIGH",
369         },
370         "status": "REVIEWED",
371         "textRange": Object {
372           "endLine": 142,
373           "endOffset": 83,
374           "startLine": 142,
375           "startOffset": 26,
376         },
377         "updateDate": "2013-05-13T17:55:42+0200",
378         "users": Array [
379           Object {
380             "active": true,
381             "local": true,
382             "login": "assignee",
383             "name": "John Doe",
384           },
385           Object {
386             "active": true,
387             "local": true,
388             "login": "author",
389             "name": "John Doe",
390           },
391         ],
392       }
393     }
394   />
395   <div
396     className="hotspot-snippet-container bordered"
397   >
398     <DeferredSpinner
399       className="big-spacer"
400       loading={false}
401     >
402       <SnippetViewer
403         component={
404           Object {
405             "key": "foo",
406             "measures": Object {
407               "coverage": "85.2",
408               "duplicationDensity": "1.0",
409               "issues": "12",
410               "lines": "56",
411             },
412             "path": "foo/bar.ts",
413             "project": "my-project",
414             "projectName": "MyProject",
415             "q": "FIL",
416             "uuid": "foo-bar",
417           }
418         }
419         displayLineNumberOptions={false}
420         displaySCM={false}
421         expandBlock={[Function]}
422         handleCloseIssues={[Function]}
423         handleOpenIssues={[Function]}
424         handleSymbolClick={[MockFunction]}
425         highlightedSymbols={Array []}
426         index={0}
427         issue={
428           Object {
429             "assignee": "assignee",
430             "assigneeUser": Object {
431               "active": true,
432               "local": true,
433               "login": "assignee",
434               "name": "John Doe",
435             },
436             "author": "author",
437             "authorUser": Object {
438               "active": true,
439               "local": true,
440               "login": "author",
441               "name": "John Doe",
442             },
443             "canChangeStatus": true,
444             "changelog": Array [],
445             "comment": Array [],
446             "component": Object {
447               "key": "hotspot-component",
448               "longName": "Hotspot component long name",
449               "name": "Hotspot Component",
450               "path": "path/to/component",
451               "qualifier": "FIL",
452             },
453             "creationDate": "2013-05-13T17:55:41+0200",
454             "flows": Array [
455               Object {
456                 "locations": Array [
457                   Object {
458                     "component": "main.js",
459                     "textRange": Object {
460                       "endLine": 2,
461                       "endOffset": 2,
462                       "startLine": 1,
463                       "startOffset": 1,
464                     },
465                   },
466                 ],
467               },
468             ],
469             "key": "01fc972e-2a3c-433e-bcae-0bd7f88f5123",
470             "line": 142,
471             "message": "'3' is a magic number.",
472             "project": Object {
473               "key": "hotspot-component",
474               "longName": "Hotspot component long name",
475               "name": "Hotspot Component",
476               "path": "path/to/component",
477               "qualifier": "TRK",
478             },
479             "resolution": "FIXED",
480             "rule": Object {
481               "fixRecommendations": "<p>This a <strong>strong</strong> message about fixing !</p>",
482               "key": "squid:S2077",
483               "name": "That rule",
484               "riskDescription": "<p>This a <strong>strong</strong> message about risk !</p>",
485               "securityCategory": "sql-injection",
486               "vulnerabilityDescription": "<p>This a <strong>strong</strong> message about vulnerability !</p>",
487               "vulnerabilityProbability": "HIGH",
488             },
489             "status": "REVIEWED",
490             "textRange": Object {
491               "endLine": 142,
492               "endOffset": 83,
493               "startLine": 142,
494               "startOffset": 26,
495             },
496             "updateDate": "2013-05-13T17:55:42+0200",
497             "users": Array [
498               Object {
499                 "active": true,
500                 "local": true,
501                 "login": "assignee",
502                 "name": "John Doe",
503               },
504               Object {
505                 "active": true,
506                 "local": true,
507                 "login": "author",
508                 "name": "John Doe",
509               },
510             ],
511           }
512         }
513         issuesByLine={Object {}}
514         lastSnippetOfLastGroup={false}
515         locations={Array []}
516         locationsByLine={Object {}}
517         onLocationSelect={[MockFunction]}
518         openIssuesByLine={Object {}}
519         renderAdditionalChildInLine={[Function]}
520         renderDuplicationPopup={[Function]}
521         snippet={
522           Array [
523             Object {
524               "code": "<span class=\\"k\\">import</span> java.util.<span class=\\"sym-9 sym\\">ArrayList</span>;",
525               "coverageStatus": "covered",
526               "coveredConditions": 2,
527               "duplicated": false,
528               "isNew": true,
529               "line": 16,
530               "scmAuthor": "simon.brandhof@sonarsource.com",
531               "scmDate": "2018-12-11T10:48:39+0100",
532               "scmRevision": "80f564becc0c0a1c9abaa006eca83a4fd278c3f0",
533             },
534           ]
535         }
536       />
537     </DeferredSpinner>
538   </div>
539 </Fragment>
540 `;