]> source.dussan.org Git - sonarqube.git/blob
b92c643ffa7f4cba11b68804e4f910c14ee6eb65
[sonarqube.git] /
1 // Jest Snapshot v1, https://goo.gl/fbAQLP
2
3 exports[`should render correctly 1`] = `
4 <div
5   className="text-center"
6 >
7   <i
8     className="spinner spinner-margin"
9   />
10 </div>
11 `;
12
13 exports[`should render correctly 2`] = `
14 <div
15   className="page page-limited"
16 >
17   <div
18     className="overview page-with-sidebar"
19   >
20     <A11ySkipTarget
21       anchor="overview_main"
22     />
23     <div
24       className="overview-main page-main"
25     >
26       <QualityGate
27         branchLike={
28           Object {
29             "analysisDate": "2018-01-01",
30             "isMain": true,
31             "name": "master",
32           }
33         }
34         component={
35           Object {
36             "breadcrumbs": Array [],
37             "key": "my-project",
38             "name": "foo",
39             "organization": "foo",
40             "qualifier": "TRK",
41             "qualityGate": Object {
42               "isDefault": true,
43               "key": "30",
44               "name": "Sonar way",
45             },
46             "qualityProfiles": Array [
47               Object {
48                 "deleted": false,
49                 "key": "my-qp",
50                 "language": "ts",
51                 "name": "Sonar way",
52               },
53             ],
54             "tags": Array [],
55           }
56         }
57         measures={
58           Array [
59             Object {
60               "bestValue": true,
61               "metric": Object {
62                 "id": "coverage",
63                 "key": "ncloc",
64                 "name": "Coverage",
65                 "type": "PERCENT",
66               },
67               "periods": Array [
68                 Object {
69                   "bestValue": true,
70                   "index": 1,
71                   "value": "1.0",
72                 },
73               ],
74               "value": "1.0",
75             },
76             Object {
77               "bestValue": true,
78               "metric": Object {
79                 "id": "coverage",
80                 "key": "coverage",
81                 "name": "Coverage",
82                 "type": "PERCENT",
83               },
84               "periods": Array [
85                 Object {
86                   "bestValue": true,
87                   "index": 1,
88                   "value": "1.0",
89                 },
90               ],
91               "value": "1.0",
92             },
93           ]
94         }
95       />
96       <div
97         className="overview-domains-list"
98       >
99         <enhance(Bugs)
100           branchLike={
101             Object {
102               "analysisDate": "2018-01-01",
103               "isMain": true,
104               "name": "master",
105             }
106           }
107           component={
108             Object {
109               "breadcrumbs": Array [],
110               "key": "my-project",
111               "name": "foo",
112               "organization": "foo",
113               "qualifier": "TRK",
114               "qualityGate": Object {
115                 "isDefault": true,
116                 "key": "30",
117                 "name": "Sonar way",
118               },
119               "qualityProfiles": Array [
120                 Object {
121                   "deleted": false,
122                   "key": "my-qp",
123                   "language": "ts",
124                   "name": "Sonar way",
125                 },
126               ],
127               "tags": Array [],
128             }
129           }
130           history={
131             Object {
132               "bugs": Array [
133                 Object {
134                   "date": "2019-01-05",
135                   "value": "2.0",
136                 },
137               ],
138               "coverage": Array [
139                 Object {
140                   "date": "2019-01-04",
141                   "value": "95.5",
142                 },
143               ],
144               "duplicated_lines_density": Array [
145                 Object {
146                   "date": "2019-01-02",
147                   "value": "1.0",
148                 },
149               ],
150               "ncloc": Array [
151                 Object {
152                   "date": "2019-01-03",
153                   "value": "10000",
154                 },
155               ],
156               "sqale_index": Array [
157                 Object {
158                   "date": "2019-01-01",
159                   "value": "1.0",
160                 },
161               ],
162               "vulnerabilities": Array [
163                 Object {
164                   "date": "2019-01-05",
165                   "value": "0",
166                 },
167               ],
168             }
169           }
170           historyStartDate="2019-01-05"
171           measures={
172             Array [
173               Object {
174                 "bestValue": true,
175                 "metric": Object {
176                   "id": "coverage",
177                   "key": "ncloc",
178                   "name": "Coverage",
179                   "type": "PERCENT",
180                 },
181                 "periods": Array [
182                   Object {
183                     "bestValue": true,
184                     "index": 1,
185                     "value": "1.0",
186                   },
187                 ],
188                 "value": "1.0",
189               },
190               Object {
191                 "bestValue": true,
192                 "metric": Object {
193                   "id": "coverage",
194                   "key": "coverage",
195                   "name": "Coverage",
196                   "type": "PERCENT",
197                 },
198                 "periods": Array [
199                   Object {
200                     "bestValue": true,
201                     "index": 1,
202                     "value": "1.0",
203                   },
204                 ],
205                 "value": "1.0",
206               },
207             ]
208           }
209         />
210         <enhance(VulnerabiltiesAndHotspots)
211           branchLike={
212             Object {
213               "analysisDate": "2018-01-01",
214               "isMain": true,
215               "name": "master",
216             }
217           }
218           component={
219             Object {
220               "breadcrumbs": Array [],
221               "key": "my-project",
222               "name": "foo",
223               "organization": "foo",
224               "qualifier": "TRK",
225               "qualityGate": Object {
226                 "isDefault": true,
227                 "key": "30",
228                 "name": "Sonar way",
229               },
230               "qualityProfiles": Array [
231                 Object {
232                   "deleted": false,
233                   "key": "my-qp",
234                   "language": "ts",
235                   "name": "Sonar way",
236                 },
237               ],
238               "tags": Array [],
239             }
240           }
241           history={
242             Object {
243               "bugs": Array [
244                 Object {
245                   "date": "2019-01-05",
246                   "value": "2.0",
247                 },
248               ],
249               "coverage": Array [
250                 Object {
251                   "date": "2019-01-04",
252                   "value": "95.5",
253                 },
254               ],
255               "duplicated_lines_density": Array [
256                 Object {
257                   "date": "2019-01-02",
258                   "value": "1.0",
259                 },
260               ],
261               "ncloc": Array [
262                 Object {
263                   "date": "2019-01-03",
264                   "value": "10000",
265                 },
266               ],
267               "sqale_index": Array [
268                 Object {
269                   "date": "2019-01-01",
270                   "value": "1.0",
271                 },
272               ],
273               "vulnerabilities": Array [
274                 Object {
275                   "date": "2019-01-05",
276                   "value": "0",
277                 },
278               ],
279             }
280           }
281           historyStartDate="2019-01-05"
282           measures={
283             Array [
284               Object {
285                 "bestValue": true,
286                 "metric": Object {
287                   "id": "coverage",
288                   "key": "ncloc",
289                   "name": "Coverage",
290                   "type": "PERCENT",
291                 },
292                 "periods": Array [
293                   Object {
294                     "bestValue": true,
295                     "index": 1,
296                     "value": "1.0",
297                   },
298                 ],
299                 "value": "1.0",
300               },
301               Object {
302                 "bestValue": true,
303                 "metric": Object {
304                   "id": "coverage",
305                   "key": "coverage",
306                   "name": "Coverage",
307                   "type": "PERCENT",
308                 },
309                 "periods": Array [
310                   Object {
311                     "bestValue": true,
312                     "index": 1,
313                     "value": "1.0",
314                   },
315                 ],
316                 "value": "1.0",
317               },
318             ]
319           }
320         />
321         <enhance(CodeSmells)
322           branchLike={
323             Object {
324               "analysisDate": "2018-01-01",
325               "isMain": true,
326               "name": "master",
327             }
328           }
329           component={
330             Object {
331               "breadcrumbs": Array [],
332               "key": "my-project",
333               "name": "foo",
334               "organization": "foo",
335               "qualifier": "TRK",
336               "qualityGate": Object {
337                 "isDefault": true,
338                 "key": "30",
339                 "name": "Sonar way",
340               },
341               "qualityProfiles": Array [
342                 Object {
343                   "deleted": false,
344                   "key": "my-qp",
345                   "language": "ts",
346                   "name": "Sonar way",
347                 },
348               ],
349               "tags": Array [],
350             }
351           }
352           history={
353             Object {
354               "bugs": Array [
355                 Object {
356                   "date": "2019-01-05",
357                   "value": "2.0",
358                 },
359               ],
360               "coverage": Array [
361                 Object {
362                   "date": "2019-01-04",
363                   "value": "95.5",
364                 },
365               ],
366               "duplicated_lines_density": Array [
367                 Object {
368                   "date": "2019-01-02",
369                   "value": "1.0",
370                 },
371               ],
372               "ncloc": Array [
373                 Object {
374                   "date": "2019-01-03",
375                   "value": "10000",
376                 },
377               ],
378               "sqale_index": Array [
379                 Object {
380                   "date": "2019-01-01",
381                   "value": "1.0",
382                 },
383               ],
384               "vulnerabilities": Array [
385                 Object {
386                   "date": "2019-01-05",
387                   "value": "0",
388                 },
389               ],
390             }
391           }
392           historyStartDate="2019-01-05"
393           measures={
394             Array [
395               Object {
396                 "bestValue": true,
397                 "metric": Object {
398                   "id": "coverage",
399                   "key": "ncloc",
400                   "name": "Coverage",
401                   "type": "PERCENT",
402                 },
403                 "periods": Array [
404                   Object {
405                     "bestValue": true,
406                     "index": 1,
407                     "value": "1.0",
408                   },
409                 ],
410                 "value": "1.0",
411               },
412               Object {
413                 "bestValue": true,
414                 "metric": Object {
415                   "id": "coverage",
416                   "key": "coverage",
417                   "name": "Coverage",
418                   "type": "PERCENT",
419                 },
420                 "periods": Array [
421                   Object {
422                     "bestValue": true,
423                     "index": 1,
424                     "value": "1.0",
425                   },
426                 ],
427                 "value": "1.0",
428               },
429             ]
430           }
431         />
432         <enhance(Coverage)
433           branchLike={
434             Object {
435               "analysisDate": "2018-01-01",
436               "isMain": true,
437               "name": "master",
438             }
439           }
440           component={
441             Object {
442               "breadcrumbs": Array [],
443               "key": "my-project",
444               "name": "foo",
445               "organization": "foo",
446               "qualifier": "TRK",
447               "qualityGate": Object {
448                 "isDefault": true,
449                 "key": "30",
450                 "name": "Sonar way",
451               },
452               "qualityProfiles": Array [
453                 Object {
454                   "deleted": false,
455                   "key": "my-qp",
456                   "language": "ts",
457                   "name": "Sonar way",
458                 },
459               ],
460               "tags": Array [],
461             }
462           }
463           history={
464             Object {
465               "bugs": Array [
466                 Object {
467                   "date": "2019-01-05",
468                   "value": "2.0",
469                 },
470               ],
471               "coverage": Array [
472                 Object {
473                   "date": "2019-01-04",
474                   "value": "95.5",
475                 },
476               ],
477               "duplicated_lines_density": Array [
478                 Object {
479                   "date": "2019-01-02",
480                   "value": "1.0",
481                 },
482               ],
483               "ncloc": Array [
484                 Object {
485                   "date": "2019-01-03",
486                   "value": "10000",
487                 },
488               ],
489               "sqale_index": Array [
490                 Object {
491                   "date": "2019-01-01",
492                   "value": "1.0",
493                 },
494               ],
495               "vulnerabilities": Array [
496                 Object {
497                   "date": "2019-01-05",
498                   "value": "0",
499                 },
500               ],
501             }
502           }
503           historyStartDate="2019-01-05"
504           measures={
505             Array [
506               Object {
507                 "bestValue": true,
508                 "metric": Object {
509                   "id": "coverage",
510                   "key": "ncloc",
511                   "name": "Coverage",
512                   "type": "PERCENT",
513                 },
514                 "periods": Array [
515                   Object {
516                     "bestValue": true,
517                     "index": 1,
518                     "value": "1.0",
519                   },
520                 ],
521                 "value": "1.0",
522               },
523               Object {
524                 "bestValue": true,
525                 "metric": Object {
526                   "id": "coverage",
527                   "key": "coverage",
528                   "name": "Coverage",
529                   "type": "PERCENT",
530                 },
531                 "periods": Array [
532                   Object {
533                     "bestValue": true,
534                     "index": 1,
535                     "value": "1.0",
536                   },
537                 ],
538                 "value": "1.0",
539               },
540             ]
541           }
542         />
543         <enhance(Duplications)
544           branchLike={
545             Object {
546               "analysisDate": "2018-01-01",
547               "isMain": true,
548               "name": "master",
549             }
550           }
551           component={
552             Object {
553               "breadcrumbs": Array [],
554               "key": "my-project",
555               "name": "foo",
556               "organization": "foo",
557               "qualifier": "TRK",
558               "qualityGate": Object {
559                 "isDefault": true,
560                 "key": "30",
561                 "name": "Sonar way",
562               },
563               "qualityProfiles": Array [
564                 Object {
565                   "deleted": false,
566                   "key": "my-qp",
567                   "language": "ts",
568                   "name": "Sonar way",
569                 },
570               ],
571               "tags": Array [],
572             }
573           }
574           history={
575             Object {
576               "bugs": Array [
577                 Object {
578                   "date": "2019-01-05",
579                   "value": "2.0",
580                 },
581               ],
582               "coverage": Array [
583                 Object {
584                   "date": "2019-01-04",
585                   "value": "95.5",
586                 },
587               ],
588               "duplicated_lines_density": Array [
589                 Object {
590                   "date": "2019-01-02",
591                   "value": "1.0",
592                 },
593               ],
594               "ncloc": Array [
595                 Object {
596                   "date": "2019-01-03",
597                   "value": "10000",
598                 },
599               ],
600               "sqale_index": Array [
601                 Object {
602                   "date": "2019-01-01",
603                   "value": "1.0",
604                 },
605               ],
606               "vulnerabilities": Array [
607                 Object {
608                   "date": "2019-01-05",
609                   "value": "0",
610                 },
611               ],
612             }
613           }
614           historyStartDate="2019-01-05"
615           measures={
616             Array [
617               Object {
618                 "bestValue": true,
619                 "metric": Object {
620                   "id": "coverage",
621                   "key": "ncloc",
622                   "name": "Coverage",
623                   "type": "PERCENT",
624                 },
625                 "periods": Array [
626                   Object {
627                     "bestValue": true,
628                     "index": 1,
629                     "value": "1.0",
630                   },
631                 ],
632                 "value": "1.0",
633               },
634               Object {
635                 "bestValue": true,
636                 "metric": Object {
637                   "id": "coverage",
638                   "key": "coverage",
639                   "name": "Coverage",
640                   "type": "PERCENT",
641                 },
642                 "periods": Array [
643                   Object {
644                     "bestValue": true,
645                     "index": 1,
646                     "value": "1.0",
647                   },
648                 ],
649                 "value": "1.0",
650               },
651             ]
652           }
653         />
654       </div>
655     </div>
656     <div
657       className="overview-sidebar page-sidebar-fixed"
658     >
659       <Connect(Meta)
660         branchLike={
661           Object {
662             "analysisDate": "2018-01-01",
663             "isMain": true,
664             "name": "master",
665           }
666         }
667         component={
668           Object {
669             "breadcrumbs": Array [],
670             "key": "my-project",
671             "name": "foo",
672             "organization": "foo",
673             "qualifier": "TRK",
674             "qualityGate": Object {
675               "isDefault": true,
676               "key": "30",
677               "name": "Sonar way",
678             },
679             "qualityProfiles": Array [
680               Object {
681                 "deleted": false,
682                 "key": "my-qp",
683                 "language": "ts",
684                 "name": "Sonar way",
685               },
686             ],
687             "tags": Array [],
688           }
689         }
690         history={
691           Object {
692             "bugs": Array [
693               Object {
694                 "date": "2019-01-05",
695                 "value": "2.0",
696               },
697             ],
698             "coverage": Array [
699               Object {
700                 "date": "2019-01-04",
701                 "value": "95.5",
702               },
703             ],
704             "duplicated_lines_density": Array [
705               Object {
706                 "date": "2019-01-02",
707                 "value": "1.0",
708               },
709             ],
710             "ncloc": Array [
711               Object {
712                 "date": "2019-01-03",
713                 "value": "10000",
714               },
715             ],
716             "sqale_index": Array [
717               Object {
718                 "date": "2019-01-01",
719                 "value": "1.0",
720               },
721             ],
722             "vulnerabilities": Array [
723               Object {
724                 "date": "2019-01-05",
725                 "value": "0",
726               },
727             ],
728           }
729         }
730         measures={
731           Array [
732             Object {
733               "bestValue": true,
734               "metric": Object {
735                 "id": "coverage",
736                 "key": "ncloc",
737                 "name": "Coverage",
738                 "type": "PERCENT",
739               },
740               "periods": Array [
741                 Object {
742                   "bestValue": true,
743                   "index": 1,
744                   "value": "1.0",
745                 },
746               ],
747               "value": "1.0",
748             },
749             Object {
750               "bestValue": true,
751               "metric": Object {
752                 "id": "coverage",
753                 "key": "coverage",
754                 "name": "Coverage",
755                 "type": "PERCENT",
756               },
757               "periods": Array [
758                 Object {
759                   "bestValue": true,
760                   "index": 1,
761                   "value": "1.0",
762                 },
763               ],
764               "value": "1.0",
765             },
766           ]
767         }
768         metrics={
769           Object {
770             "coverage": Object {
771               "id": "coverage",
772               "key": "coverage",
773               "name": "Coverage",
774               "type": "PERCENT",
775             },
776           }
777         }
778         onComponentChange={[MockFunction]}
779       />
780     </div>
781   </div>
782 </div>
783 `;
784
785 exports[`should render correctly if no measures are found 1`] = `
786 <div
787   className="page page-limited"
788 >
789   <div
790     className="overview page-with-sidebar"
791   >
792     <A11ySkipTarget
793       anchor="overview_main"
794     />
795     <div
796       className="overview-main page-main"
797     >
798       <h3>
799         overview.project.empty
800       </h3>
801     </div>
802     <div
803       className="overview-sidebar page-sidebar-fixed"
804     >
805       <Connect(Meta)
806         branchLike={
807           Object {
808             "analysisDate": "2018-01-01",
809             "isMain": true,
810             "name": "master",
811           }
812         }
813         component={
814           Object {
815             "breadcrumbs": Array [],
816             "key": "my-project",
817             "name": "foo",
818             "organization": "foo",
819             "qualifier": "TRK",
820             "qualityGate": Object {
821               "isDefault": true,
822               "key": "30",
823               "name": "Sonar way",
824             },
825             "qualityProfiles": Array [
826               Object {
827                 "deleted": false,
828                 "key": "my-qp",
829                 "language": "ts",
830                 "name": "Sonar way",
831               },
832             ],
833             "tags": Array [],
834           }
835         }
836         history={
837           Object {
838             "bugs": Array [
839               Object {
840                 "date": "2019-01-05",
841                 "value": "2.0",
842               },
843             ],
844             "coverage": Array [
845               Object {
846                 "date": "2019-01-04",
847                 "value": "95.5",
848               },
849             ],
850             "duplicated_lines_density": Array [
851               Object {
852                 "date": "2019-01-02",
853                 "value": "1.0",
854               },
855             ],
856             "ncloc": Array [
857               Object {
858                 "date": "2019-01-03",
859                 "value": "10000",
860               },
861             ],
862             "sqale_index": Array [
863               Object {
864                 "date": "2019-01-01",
865                 "value": "1.0",
866               },
867             ],
868             "vulnerabilities": Array [
869               Object {
870                 "date": "2019-01-05",
871                 "value": "0",
872               },
873             ],
874           }
875         }
876         measures={
877           Array [
878             Object {
879               "bestValue": true,
880               "metric": Object {
881                 "id": "coverage",
882                 "key": "coverage",
883                 "name": "Coverage",
884                 "type": "PERCENT",
885               },
886               "periods": Array [
887                 Object {
888                   "bestValue": true,
889                   "index": 1,
890                   "value": "1.0",
891                 },
892               ],
893               "value": "1.0",
894             },
895           ]
896         }
897         metrics={
898           Object {
899             "coverage": Object {
900               "id": "coverage",
901               "key": "coverage",
902               "name": "Coverage",
903               "type": "PERCENT",
904             },
905           }
906         }
907         onComponentChange={[MockFunction]}
908       />
909     </div>
910   </div>
911 </div>
912 `;