]> source.dussan.org Git - sonarqube.git/blob
cec54e6a9a65129042b1d007519e76826e96ad3c
[sonarqube.git] /
1 // Jest Snapshot v1, https://goo.gl/fbAQLP
2
3 exports[`should render correctly: default 1`] = `
4 <div
5   className="source-viewer-code"
6 >
7   <table
8     className="source-table"
9   >
10     <tbody>
11       <Line
12         branchLike={
13           Object {
14             "analysisDate": "2018-01-01",
15             "excludedFromPurge": true,
16             "isMain": false,
17             "name": "branch-6.7",
18           }
19         }
20         displayCoverage={true}
21         displayDuplications={false}
22         displayIssues={true}
23         duplications={Array []}
24         duplicationsCount={0}
25         highlighted={false}
26         issueLocations={Array []}
27         issues={Array []}
28         key="16"
29         last={false}
30         line={
31           Object {
32             "code": "<span class=\\"k\\">import</span> java.util.<span class=\\"sym-9 sym\\">ArrayList</span>;",
33             "coverageStatus": "covered",
34             "coveredConditions": 2,
35             "duplicated": false,
36             "isNew": true,
37             "line": 16,
38             "scmAuthor": "simon.brandhof@sonarsource.com",
39             "scmDate": "2018-12-11T10:48:39+0100",
40             "scmRevision": "80f564becc0c0a1c9abaa006eca83a4fd278c3f0",
41           }
42         }
43         loadDuplications={[MockFunction]}
44         onIssueChange={[MockFunction]}
45         onIssuePopupToggle={[MockFunction]}
46         onIssueSelect={[MockFunction]}
47         onIssueUnselect={[MockFunction]}
48         onIssuesClose={[MockFunction]}
49         onIssuesOpen={[MockFunction]}
50         onLocationSelect={[MockFunction]}
51         onSymbolClick={[MockFunction]}
52         openIssues={false}
53         renderDuplicationPopup={[MockFunction]}
54         scrollToUncoveredLine={false}
55         secondaryIssueLocations={Array []}
56       />
57       <Line
58         branchLike={
59           Object {
60             "analysisDate": "2018-01-01",
61             "excludedFromPurge": true,
62             "isMain": false,
63             "name": "branch-6.7",
64           }
65         }
66         displayCoverage={true}
67         displayDuplications={false}
68         displayIssues={true}
69         duplications={Array []}
70         duplicationsCount={0}
71         highlighted={false}
72         issueLocations={Array []}
73         issues={Array []}
74         key="16"
75         last={false}
76         line={
77           Object {
78             "code": "<span class=\\"k\\">import</span> java.util.<span class=\\"sym-9 sym\\">ArrayList</span>;",
79             "coverageStatus": "covered",
80             "coveredConditions": 2,
81             "duplicated": false,
82             "isNew": true,
83             "line": 16,
84             "scmAuthor": "simon.brandhof@sonarsource.com",
85             "scmDate": "2018-12-11T10:48:39+0100",
86             "scmRevision": "80f564becc0c0a1c9abaa006eca83a4fd278c3f0",
87           }
88         }
89         loadDuplications={[MockFunction]}
90         onIssueChange={[MockFunction]}
91         onIssuePopupToggle={[MockFunction]}
92         onIssueSelect={[MockFunction]}
93         onIssueUnselect={[MockFunction]}
94         onIssuesClose={[MockFunction]}
95         onIssuesOpen={[MockFunction]}
96         onLocationSelect={[MockFunction]}
97         onSymbolClick={[MockFunction]}
98         openIssues={false}
99         previousLine={
100           Object {
101             "code": "<span class=\\"k\\">import</span> java.util.<span class=\\"sym-9 sym\\">ArrayList</span>;",
102             "coverageStatus": "covered",
103             "coveredConditions": 2,
104             "duplicated": false,
105             "isNew": true,
106             "line": 16,
107             "scmAuthor": "simon.brandhof@sonarsource.com",
108             "scmDate": "2018-12-11T10:48:39+0100",
109             "scmRevision": "80f564becc0c0a1c9abaa006eca83a4fd278c3f0",
110           }
111         }
112         renderDuplicationPopup={[MockFunction]}
113         scrollToUncoveredLine={false}
114         secondaryIssueLocations={Array []}
115       />
116       <Line
117         branchLike={
118           Object {
119             "analysisDate": "2018-01-01",
120             "excludedFromPurge": true,
121             "isMain": false,
122             "name": "branch-6.7",
123           }
124         }
125         displayCoverage={true}
126         displayDuplications={false}
127         displayIssues={true}
128         duplications={Array []}
129         duplicationsCount={0}
130         highlighted={false}
131         issueLocations={Array []}
132         issues={Array []}
133         key="16"
134         last={true}
135         line={
136           Object {
137             "code": "<span class=\\"k\\">import</span> java.util.<span class=\\"sym-9 sym\\">ArrayList</span>;",
138             "coverageStatus": "covered",
139             "coveredConditions": 2,
140             "duplicated": false,
141             "isNew": true,
142             "line": 16,
143             "scmAuthor": "simon.brandhof@sonarsource.com",
144             "scmDate": "2018-12-11T10:48:39+0100",
145             "scmRevision": "80f564becc0c0a1c9abaa006eca83a4fd278c3f0",
146           }
147         }
148         loadDuplications={[MockFunction]}
149         onIssueChange={[MockFunction]}
150         onIssuePopupToggle={[MockFunction]}
151         onIssueSelect={[MockFunction]}
152         onIssueUnselect={[MockFunction]}
153         onIssuesClose={[MockFunction]}
154         onIssuesOpen={[MockFunction]}
155         onLocationSelect={[MockFunction]}
156         onSymbolClick={[MockFunction]}
157         openIssues={false}
158         previousLine={
159           Object {
160             "code": "<span class=\\"k\\">import</span> java.util.<span class=\\"sym-9 sym\\">ArrayList</span>;",
161             "coverageStatus": "covered",
162             "coveredConditions": 2,
163             "duplicated": false,
164             "isNew": true,
165             "line": 16,
166             "scmAuthor": "simon.brandhof@sonarsource.com",
167             "scmDate": "2018-12-11T10:48:39+0100",
168             "scmRevision": "80f564becc0c0a1c9abaa006eca83a4fd278c3f0",
169           }
170         }
171         renderDuplicationPopup={[MockFunction]}
172         scrollToUncoveredLine={false}
173         secondaryIssueLocations={Array []}
174       />
175     </tbody>
176   </table>
177 </div>
178 `;
179
180 exports[`should render correctly: has file level issues 1`] = `
181 <div
182   className="source-viewer-code"
183 >
184   <table
185     className="source-table"
186   >
187     <tbody>
188       <Line
189         branchLike={
190           Object {
191             "analysisDate": "2018-01-01",
192             "excludedFromPurge": true,
193             "isMain": false,
194             "name": "branch-6.7",
195           }
196         }
197         displayCoverage={true}
198         displayDuplications={false}
199         displayIssues={true}
200         duplications={Array []}
201         duplicationsCount={0}
202         highlighted={false}
203         issueLocations={Array []}
204         issues={Array []}
205         key="0"
206         last={false}
207         line={
208           Object {
209             "code": "",
210             "duplicated": false,
211             "isNew": false,
212             "line": 0,
213           }
214         }
215         loadDuplications={[MockFunction]}
216         onIssueChange={[MockFunction]}
217         onIssuePopupToggle={[MockFunction]}
218         onIssueSelect={[MockFunction]}
219         onIssueUnselect={[MockFunction]}
220         onIssuesClose={[MockFunction]}
221         onIssuesOpen={[MockFunction]}
222         onLocationSelect={[MockFunction]}
223         onSymbolClick={[MockFunction]}
224         openIssues={false}
225         renderDuplicationPopup={[MockFunction]}
226         scrollToUncoveredLine={false}
227         secondaryIssueLocations={Array []}
228       />
229       <Line
230         branchLike={
231           Object {
232             "analysisDate": "2018-01-01",
233             "excludedFromPurge": true,
234             "isMain": false,
235             "name": "branch-6.7",
236           }
237         }
238         displayCoverage={true}
239         displayDuplications={false}
240         displayIssues={true}
241         duplications={Array []}
242         duplicationsCount={0}
243         highlighted={false}
244         issueLocations={Array []}
245         issues={Array []}
246         key="16"
247         last={false}
248         line={
249           Object {
250             "code": "<span class=\\"k\\">import</span> java.util.<span class=\\"sym-9 sym\\">ArrayList</span>;",
251             "coverageStatus": "covered",
252             "coveredConditions": 2,
253             "duplicated": false,
254             "isNew": true,
255             "line": 16,
256             "scmAuthor": "simon.brandhof@sonarsource.com",
257             "scmDate": "2018-12-11T10:48:39+0100",
258             "scmRevision": "80f564becc0c0a1c9abaa006eca83a4fd278c3f0",
259           }
260         }
261         loadDuplications={[MockFunction]}
262         onIssueChange={[MockFunction]}
263         onIssuePopupToggle={[MockFunction]}
264         onIssueSelect={[MockFunction]}
265         onIssueUnselect={[MockFunction]}
266         onIssuesClose={[MockFunction]}
267         onIssuesOpen={[MockFunction]}
268         onLocationSelect={[MockFunction]}
269         onSymbolClick={[MockFunction]}
270         openIssues={false}
271         renderDuplicationPopup={[MockFunction]}
272         scrollToUncoveredLine={false}
273         secondaryIssueLocations={Array []}
274       />
275       <Line
276         branchLike={
277           Object {
278             "analysisDate": "2018-01-01",
279             "excludedFromPurge": true,
280             "isMain": false,
281             "name": "branch-6.7",
282           }
283         }
284         displayCoverage={true}
285         displayDuplications={false}
286         displayIssues={true}
287         duplications={Array []}
288         duplicationsCount={0}
289         highlighted={false}
290         issueLocations={Array []}
291         issues={Array []}
292         key="16"
293         last={false}
294         line={
295           Object {
296             "code": "<span class=\\"k\\">import</span> java.util.<span class=\\"sym-9 sym\\">ArrayList</span>;",
297             "coverageStatus": "covered",
298             "coveredConditions": 2,
299             "duplicated": false,
300             "isNew": true,
301             "line": 16,
302             "scmAuthor": "simon.brandhof@sonarsource.com",
303             "scmDate": "2018-12-11T10:48:39+0100",
304             "scmRevision": "80f564becc0c0a1c9abaa006eca83a4fd278c3f0",
305           }
306         }
307         loadDuplications={[MockFunction]}
308         onIssueChange={[MockFunction]}
309         onIssuePopupToggle={[MockFunction]}
310         onIssueSelect={[MockFunction]}
311         onIssueUnselect={[MockFunction]}
312         onIssuesClose={[MockFunction]}
313         onIssuesOpen={[MockFunction]}
314         onLocationSelect={[MockFunction]}
315         onSymbolClick={[MockFunction]}
316         openIssues={false}
317         previousLine={
318           Object {
319             "code": "<span class=\\"k\\">import</span> java.util.<span class=\\"sym-9 sym\\">ArrayList</span>;",
320             "coverageStatus": "covered",
321             "coveredConditions": 2,
322             "duplicated": false,
323             "isNew": true,
324             "line": 16,
325             "scmAuthor": "simon.brandhof@sonarsource.com",
326             "scmDate": "2018-12-11T10:48:39+0100",
327             "scmRevision": "80f564becc0c0a1c9abaa006eca83a4fd278c3f0",
328           }
329         }
330         renderDuplicationPopup={[MockFunction]}
331         scrollToUncoveredLine={false}
332         secondaryIssueLocations={Array []}
333       />
334       <Line
335         branchLike={
336           Object {
337             "analysisDate": "2018-01-01",
338             "excludedFromPurge": true,
339             "isMain": false,
340             "name": "branch-6.7",
341           }
342         }
343         displayCoverage={true}
344         displayDuplications={false}
345         displayIssues={true}
346         duplications={Array []}
347         duplicationsCount={0}
348         highlighted={false}
349         issueLocations={Array []}
350         issues={Array []}
351         key="16"
352         last={true}
353         line={
354           Object {
355             "code": "<span class=\\"k\\">import</span> java.util.<span class=\\"sym-9 sym\\">ArrayList</span>;",
356             "coverageStatus": "covered",
357             "coveredConditions": 2,
358             "duplicated": false,
359             "isNew": true,
360             "line": 16,
361             "scmAuthor": "simon.brandhof@sonarsource.com",
362             "scmDate": "2018-12-11T10:48:39+0100",
363             "scmRevision": "80f564becc0c0a1c9abaa006eca83a4fd278c3f0",
364           }
365         }
366         loadDuplications={[MockFunction]}
367         onIssueChange={[MockFunction]}
368         onIssuePopupToggle={[MockFunction]}
369         onIssueSelect={[MockFunction]}
370         onIssueUnselect={[MockFunction]}
371         onIssuesClose={[MockFunction]}
372         onIssuesOpen={[MockFunction]}
373         onLocationSelect={[MockFunction]}
374         onSymbolClick={[MockFunction]}
375         openIssues={false}
376         previousLine={
377           Object {
378             "code": "<span class=\\"k\\">import</span> java.util.<span class=\\"sym-9 sym\\">ArrayList</span>;",
379             "coverageStatus": "covered",
380             "coveredConditions": 2,
381             "duplicated": false,
382             "isNew": true,
383             "line": 16,
384             "scmAuthor": "simon.brandhof@sonarsource.com",
385             "scmDate": "2018-12-11T10:48:39+0100",
386             "scmRevision": "80f564becc0c0a1c9abaa006eca83a4fd278c3f0",
387           }
388         }
389         renderDuplicationPopup={[MockFunction]}
390         scrollToUncoveredLine={false}
391         secondaryIssueLocations={Array []}
392       />
393     </tbody>
394   </table>
395 </div>
396 `;
397
398 exports[`should render correctly: has more sources 1`] = `
399 <div
400   className="source-viewer-code"
401 >
402   <div
403     className="source-viewer-more-code"
404   >
405     <Button
406       className="js-component-viewer-source-before"
407       onClick={[MockFunction]}
408     >
409       source_viewer.load_more_code
410     </Button>
411   </div>
412   <table
413     className="source-table"
414   >
415     <tbody>
416       <Line
417         branchLike={
418           Object {
419             "analysisDate": "2018-01-01",
420             "excludedFromPurge": true,
421             "isMain": false,
422             "name": "branch-6.7",
423           }
424         }
425         displayCoverage={true}
426         displayDuplications={false}
427         displayIssues={true}
428         duplications={Array []}
429         duplicationsCount={0}
430         highlighted={false}
431         issueLocations={Array []}
432         issues={Array []}
433         key="16"
434         last={false}
435         line={
436           Object {
437             "code": "<span class=\\"k\\">import</span> java.util.<span class=\\"sym-9 sym\\">ArrayList</span>;",
438             "coverageStatus": "covered",
439             "coveredConditions": 2,
440             "duplicated": false,
441             "isNew": true,
442             "line": 16,
443             "scmAuthor": "simon.brandhof@sonarsource.com",
444             "scmDate": "2018-12-11T10:48:39+0100",
445             "scmRevision": "80f564becc0c0a1c9abaa006eca83a4fd278c3f0",
446           }
447         }
448         loadDuplications={[MockFunction]}
449         onIssueChange={[MockFunction]}
450         onIssuePopupToggle={[MockFunction]}
451         onIssueSelect={[MockFunction]}
452         onIssueUnselect={[MockFunction]}
453         onIssuesClose={[MockFunction]}
454         onIssuesOpen={[MockFunction]}
455         onLocationSelect={[MockFunction]}
456         onSymbolClick={[MockFunction]}
457         openIssues={false}
458         renderDuplicationPopup={[MockFunction]}
459         scrollToUncoveredLine={false}
460         secondaryIssueLocations={Array []}
461       />
462       <Line
463         branchLike={
464           Object {
465             "analysisDate": "2018-01-01",
466             "excludedFromPurge": true,
467             "isMain": false,
468             "name": "branch-6.7",
469           }
470         }
471         displayCoverage={true}
472         displayDuplications={false}
473         displayIssues={true}
474         duplications={Array []}
475         duplicationsCount={0}
476         highlighted={false}
477         issueLocations={Array []}
478         issues={Array []}
479         key="16"
480         last={false}
481         line={
482           Object {
483             "code": "<span class=\\"k\\">import</span> java.util.<span class=\\"sym-9 sym\\">ArrayList</span>;",
484             "coverageStatus": "covered",
485             "coveredConditions": 2,
486             "duplicated": false,
487             "isNew": true,
488             "line": 16,
489             "scmAuthor": "simon.brandhof@sonarsource.com",
490             "scmDate": "2018-12-11T10:48:39+0100",
491             "scmRevision": "80f564becc0c0a1c9abaa006eca83a4fd278c3f0",
492           }
493         }
494         loadDuplications={[MockFunction]}
495         onIssueChange={[MockFunction]}
496         onIssuePopupToggle={[MockFunction]}
497         onIssueSelect={[MockFunction]}
498         onIssueUnselect={[MockFunction]}
499         onIssuesClose={[MockFunction]}
500         onIssuesOpen={[MockFunction]}
501         onLocationSelect={[MockFunction]}
502         onSymbolClick={[MockFunction]}
503         openIssues={false}
504         previousLine={
505           Object {
506             "code": "<span class=\\"k\\">import</span> java.util.<span class=\\"sym-9 sym\\">ArrayList</span>;",
507             "coverageStatus": "covered",
508             "coveredConditions": 2,
509             "duplicated": false,
510             "isNew": true,
511             "line": 16,
512             "scmAuthor": "simon.brandhof@sonarsource.com",
513             "scmDate": "2018-12-11T10:48:39+0100",
514             "scmRevision": "80f564becc0c0a1c9abaa006eca83a4fd278c3f0",
515           }
516         }
517         renderDuplicationPopup={[MockFunction]}
518         scrollToUncoveredLine={false}
519         secondaryIssueLocations={Array []}
520       />
521       <Line
522         branchLike={
523           Object {
524             "analysisDate": "2018-01-01",
525             "excludedFromPurge": true,
526             "isMain": false,
527             "name": "branch-6.7",
528           }
529         }
530         displayCoverage={true}
531         displayDuplications={false}
532         displayIssues={true}
533         duplications={Array []}
534         duplicationsCount={0}
535         highlighted={false}
536         issueLocations={Array []}
537         issues={Array []}
538         key="16"
539         last={false}
540         line={
541           Object {
542             "code": "<span class=\\"k\\">import</span> java.util.<span class=\\"sym-9 sym\\">ArrayList</span>;",
543             "coverageStatus": "covered",
544             "coveredConditions": 2,
545             "duplicated": false,
546             "isNew": true,
547             "line": 16,
548             "scmAuthor": "simon.brandhof@sonarsource.com",
549             "scmDate": "2018-12-11T10:48:39+0100",
550             "scmRevision": "80f564becc0c0a1c9abaa006eca83a4fd278c3f0",
551           }
552         }
553         loadDuplications={[MockFunction]}
554         onIssueChange={[MockFunction]}
555         onIssuePopupToggle={[MockFunction]}
556         onIssueSelect={[MockFunction]}
557         onIssueUnselect={[MockFunction]}
558         onIssuesClose={[MockFunction]}
559         onIssuesOpen={[MockFunction]}
560         onLocationSelect={[MockFunction]}
561         onSymbolClick={[MockFunction]}
562         openIssues={false}
563         previousLine={
564           Object {
565             "code": "<span class=\\"k\\">import</span> java.util.<span class=\\"sym-9 sym\\">ArrayList</span>;",
566             "coverageStatus": "covered",
567             "coveredConditions": 2,
568             "duplicated": false,
569             "isNew": true,
570             "line": 16,
571             "scmAuthor": "simon.brandhof@sonarsource.com",
572             "scmDate": "2018-12-11T10:48:39+0100",
573             "scmRevision": "80f564becc0c0a1c9abaa006eca83a4fd278c3f0",
574           }
575         }
576         renderDuplicationPopup={[MockFunction]}
577         scrollToUncoveredLine={false}
578         secondaryIssueLocations={Array []}
579       />
580     </tbody>
581   </table>
582   <div
583     className="source-viewer-more-code"
584   >
585     <Button
586       className="js-component-viewer-source-after"
587       onClick={[MockFunction]}
588     >
589       source_viewer.load_more_code
590     </Button>
591   </div>
592 </div>
593 `;