]> source.dussan.org Git - sonarqube.git/blob
5a1ee9c85582da32c5136e19290789a3bff047af
[sonarqube.git] /
1 // Jest Snapshot v1, https://goo.gl/fbAQLP
2
3 exports[`should render correctly for security extensions 1`] = `
4 <Dropdown
5   data-test="extensions"
6   overlay={
7     <ul
8       className="menu"
9     >
10       <li>
11         <Link
12           activeClassName="active"
13           onlyActiveOnIndex={false}
14           style={Object {}}
15           to={
16             Object {
17               "pathname": "/project/extension/component-bar",
18               "query": Object {
19                 "id": "foo",
20                 "qualifier": "TRK",
21               },
22             }
23           }
24         >
25           ComponentBar
26         </Link>
27       </li>
28     </ul>
29   }
30   tagName="li"
31 >
32   <Component />
33 </Dropdown>
34 `;
35
36 exports[`should render correctly for security extensions 2`] = `
37 <Dropdown
38   data-test="security"
39   overlay={
40     <ul
41       className="menu"
42     >
43       <li>
44         <Link
45           activeClassName="active"
46           onlyActiveOnIndex={false}
47           style={Object {}}
48           to={
49             Object {
50               "pathname": "/project/extension/securityreport/sonarsource_security",
51               "query": Object {
52                 "id": "foo",
53               },
54             }
55           }
56         >
57           securityreport.sonarsourceSecurity.page
58         </Link>
59       </li>
60       <li>
61         <Link
62           activeClassName="active"
63           onlyActiveOnIndex={false}
64           style={Object {}}
65           to={
66             Object {
67               "pathname": "/project/extension/securityreport/owasp_top_10",
68               "query": Object {
69                 "id": "foo",
70               },
71             }
72           }
73         >
74           securityreport.owaspTop10.page
75         </Link>
76       </li>
77       <li>
78         <Link
79           activeClassName="active"
80           onlyActiveOnIndex={false}
81           style={Object {}}
82           to={
83             Object {
84               "pathname": "/project/extension/securityreport/sans_top_25",
85               "query": Object {
86                 "id": "foo",
87               },
88             }
89           }
90         >
91           securityreport.sansTop25.page
92         </Link>
93       </li>
94     </ul>
95   }
96   tagName="li"
97 >
98   <Component />
99 </Dropdown>
100 `;
101
102 exports[`should work for all qualifiers 1`] = `
103 <NavBarTabs>
104   <li>
105     <Link
106       activeClassName="active"
107       onlyActiveOnIndex={false}
108       style={Object {}}
109       to={
110         Object {
111           "pathname": "/dashboard",
112           "query": Object {
113             "id": "foo",
114           },
115         }
116       }
117     >
118       overview.page
119     </Link>
120   </li>
121   <li>
122     <Link
123       activeClassName="active"
124       className=""
125       onlyActiveOnIndex={false}
126       style={Object {}}
127       to={
128         Object {
129           "pathname": "/project/issues",
130           "query": Object {
131             "id": "foo",
132             "resolved": "false",
133           },
134         }
135       }
136     >
137       issues.page
138     </Link>
139   </li>
140   <li>
141     <Link
142       activeClassName="active"
143       onlyActiveOnIndex={false}
144       style={Object {}}
145       to={
146         Object {
147           "pathname": "/component_measures",
148           "query": Object {
149             "id": "foo",
150           },
151         }
152       }
153     >
154       layout.measures
155     </Link>
156   </li>
157   <li>
158     <Link
159       activeClassName="active"
160       onlyActiveOnIndex={false}
161       style={Object {}}
162       to={
163         Object {
164           "pathname": "/code",
165           "query": Object {
166             "id": "foo",
167           },
168         }
169       }
170     >
171       code.page
172     </Link>
173   </li>
174   <li>
175     <Link
176       activeClassName="active"
177       onlyActiveOnIndex={false}
178       style={Object {}}
179       to={
180         Object {
181           "pathname": "/project/activity",
182           "query": Object {
183             "id": "foo",
184           },
185         }
186       }
187     >
188       project_activity.page
189     </Link>
190   </li>
191   <Dropdown
192     data-test="administration"
193     overlay={
194       <ul
195         className="menu"
196       >
197         <li>
198           <Link
199             activeClassName="active"
200             onlyActiveOnIndex={false}
201             style={Object {}}
202             to={
203               Object {
204                 "pathname": "/project/settings",
205                 "query": Object {
206                   "id": "foo",
207                 },
208               }
209             }
210           >
211             project_settings.page
212           </Link>
213         </li>
214         <li>
215           <Link
216             activeClassName="active"
217             onlyActiveOnIndex={false}
218             style={Object {}}
219             to={
220               Object {
221                 "pathname": "/project/branches",
222                 "query": Object {
223                   "id": "foo",
224                 },
225               }
226             }
227           >
228             project_branches.page
229           </Link>
230         </li>
231         <li>
232           <Link
233             activeClassName="active"
234             onlyActiveOnIndex={false}
235             style={Object {}}
236             to={
237               Object {
238                 "pathname": "/project/webhooks",
239                 "query": Object {
240                   "id": "foo",
241                 },
242               }
243             }
244           >
245             webhooks.page
246           </Link>
247         </li>
248         <li>
249           <Link
250             activeClassName="active"
251             onlyActiveOnIndex={false}
252             style={Object {}}
253             to={
254               Object {
255                 "pathname": "/project/deletion",
256                 "query": Object {
257                   "id": "foo",
258                 },
259               }
260             }
261           >
262             deletion.page
263           </Link>
264         </li>
265       </ul>
266     }
267     tagName="li"
268   >
269     <Component />
270   </Dropdown>
271 </NavBarTabs>
272 `;
273
274 exports[`should work for all qualifiers 2`] = `
275 <NavBarTabs>
276   <li>
277     <Link
278       activeClassName="active"
279       onlyActiveOnIndex={false}
280       style={Object {}}
281       to={
282         Object {
283           "pathname": "/portfolio",
284           "query": Object {
285             "id": "foo",
286           },
287         }
288       }
289     >
290       overview.page
291     </Link>
292   </li>
293   <li>
294     <Link
295       activeClassName="active"
296       className=""
297       onlyActiveOnIndex={false}
298       style={Object {}}
299       to={
300         Object {
301           "pathname": "/project/issues",
302           "query": Object {
303             "id": "foo",
304             "resolved": "false",
305           },
306         }
307       }
308     >
309       issues.page
310     </Link>
311   </li>
312   <li>
313     <Link
314       activeClassName="active"
315       onlyActiveOnIndex={false}
316       style={Object {}}
317       to={
318         Object {
319           "pathname": "/component_measures",
320           "query": Object {
321             "id": "foo",
322           },
323         }
324       }
325     >
326       layout.measures
327     </Link>
328   </li>
329   <li>
330     <Link
331       activeClassName="active"
332       onlyActiveOnIndex={false}
333       style={Object {}}
334       to={
335         Object {
336           "pathname": "/code",
337           "query": Object {
338             "id": "foo",
339           },
340         }
341       }
342     >
343       view_projects.page
344     </Link>
345   </li>
346   <li>
347     <Link
348       activeClassName="active"
349       onlyActiveOnIndex={false}
350       style={Object {}}
351       to={
352         Object {
353           "pathname": "/project/activity",
354           "query": Object {
355             "id": "foo",
356           },
357         }
358       }
359     >
360       project_activity.page
361     </Link>
362   </li>
363   <Dropdown
364     data-test="administration"
365     overlay={
366       <ul
367         className="menu"
368       >
369         <li>
370           <Link
371             activeClassName="active"
372             onlyActiveOnIndex={false}
373             style={Object {}}
374             to={
375               Object {
376                 "pathname": "/project/deletion",
377                 "query": Object {
378                   "id": "foo",
379                 },
380               }
381             }
382           >
383             deletion.page
384           </Link>
385         </li>
386       </ul>
387     }
388     tagName="li"
389   >
390     <Component />
391   </Dropdown>
392 </NavBarTabs>
393 `;
394
395 exports[`should work for all qualifiers 3`] = `
396 <NavBarTabs>
397   <li>
398     <Link
399       activeClassName="active"
400       onlyActiveOnIndex={false}
401       style={Object {}}
402       to={
403         Object {
404           "pathname": "/portfolio",
405           "query": Object {
406             "id": "foo",
407           },
408         }
409       }
410     >
411       overview.page
412     </Link>
413   </li>
414   <li>
415     <Link
416       activeClassName="active"
417       className=""
418       onlyActiveOnIndex={false}
419       style={Object {}}
420       to={
421         Object {
422           "pathname": "/project/issues",
423           "query": Object {
424             "id": "foo",
425             "resolved": "false",
426           },
427         }
428       }
429     >
430       issues.page
431     </Link>
432   </li>
433   <li>
434     <Link
435       activeClassName="active"
436       onlyActiveOnIndex={false}
437       style={Object {}}
438       to={
439         Object {
440           "pathname": "/component_measures",
441           "query": Object {
442             "id": "foo",
443           },
444         }
445       }
446     >
447       layout.measures
448     </Link>
449   </li>
450   <li>
451     <Link
452       activeClassName="active"
453       onlyActiveOnIndex={false}
454       style={Object {}}
455       to={
456         Object {
457           "pathname": "/code",
458           "query": Object {
459             "id": "foo",
460           },
461         }
462       }
463     >
464       view_projects.page
465     </Link>
466   </li>
467   <li>
468     <Link
469       activeClassName="active"
470       onlyActiveOnIndex={false}
471       style={Object {}}
472       to={
473         Object {
474           "pathname": "/project/activity",
475           "query": Object {
476             "id": "foo",
477           },
478         }
479       }
480     >
481       project_activity.page
482     </Link>
483   </li>
484 </NavBarTabs>
485 `;
486
487 exports[`should work for all qualifiers 4`] = `
488 <NavBarTabs>
489   <li>
490     <Link
491       activeClassName="active"
492       onlyActiveOnIndex={false}
493       style={Object {}}
494       to={
495         Object {
496           "pathname": "/dashboard",
497           "query": Object {
498             "id": "foo",
499           },
500         }
501       }
502     >
503       overview.page
504     </Link>
505   </li>
506   <li>
507     <Link
508       activeClassName="active"
509       className=""
510       onlyActiveOnIndex={false}
511       style={Object {}}
512       to={
513         Object {
514           "pathname": "/project/issues",
515           "query": Object {
516             "id": "foo",
517             "resolved": "false",
518           },
519         }
520       }
521     >
522       issues.page
523     </Link>
524   </li>
525   <li>
526     <Link
527       activeClassName="active"
528       onlyActiveOnIndex={false}
529       style={Object {}}
530       to={
531         Object {
532           "pathname": "/component_measures",
533           "query": Object {
534             "id": "foo",
535           },
536         }
537       }
538     >
539       layout.measures
540     </Link>
541   </li>
542   <li>
543     <Link
544       activeClassName="active"
545       onlyActiveOnIndex={false}
546       style={Object {}}
547       to={
548         Object {
549           "pathname": "/code",
550           "query": Object {
551             "id": "foo",
552           },
553         }
554       }
555     >
556       view_projects.page
557     </Link>
558   </li>
559   <li>
560     <Link
561       activeClassName="active"
562       onlyActiveOnIndex={false}
563       style={Object {}}
564       to={
565         Object {
566           "pathname": "/project/activity",
567           "query": Object {
568             "id": "foo",
569           },
570         }
571       }
572     >
573       project_activity.page
574     </Link>
575   </li>
576   <Dropdown
577     data-test="administration"
578     overlay={
579       <ul
580         className="menu"
581       >
582         <li>
583           <Link
584             activeClassName="active"
585             onlyActiveOnIndex={false}
586             style={Object {}}
587             to={
588               Object {
589                 "pathname": "/project/deletion",
590                 "query": Object {
591                   "id": "foo",
592                 },
593               }
594             }
595           >
596             deletion.page
597           </Link>
598         </li>
599       </ul>
600     }
601     tagName="li"
602   >
603     <Component />
604   </Dropdown>
605 </NavBarTabs>
606 `;
607
608 exports[`should work for long-living branches 1`] = `
609 <NavBarTabs>
610   <li>
611     <Link
612       activeClassName="active"
613       onlyActiveOnIndex={false}
614       style={Object {}}
615       to={
616         Object {
617           "pathname": "/dashboard",
618           "query": Object {
619             "branch": "release",
620             "id": "foo",
621           },
622         }
623       }
624     >
625       overview.page
626     </Link>
627   </li>
628   <li>
629     <Link
630       activeClassName="active"
631       className=""
632       onlyActiveOnIndex={false}
633       style={Object {}}
634       to={
635         Object {
636           "pathname": "/project/issues",
637           "query": Object {
638             "branch": "release",
639             "id": "foo",
640             "resolved": "false",
641           },
642         }
643       }
644     >
645       issues.page
646     </Link>
647   </li>
648   <li>
649     <Link
650       activeClassName="active"
651       onlyActiveOnIndex={false}
652       style={Object {}}
653       to={
654         Object {
655           "pathname": "/component_measures",
656           "query": Object {
657             "branch": "release",
658             "id": "foo",
659           },
660         }
661       }
662     >
663       layout.measures
664     </Link>
665   </li>
666   <li>
667     <Link
668       activeClassName="active"
669       onlyActiveOnIndex={false}
670       style={Object {}}
671       to={
672         Object {
673           "pathname": "/code",
674           "query": Object {
675             "branch": "release",
676             "id": "foo",
677           },
678         }
679       }
680     >
681       code.page
682     </Link>
683   </li>
684   <li>
685     <Link
686       activeClassName="active"
687       onlyActiveOnIndex={false}
688       style={Object {}}
689       to={
690         Object {
691           "pathname": "/project/activity",
692           "query": Object {
693             "branch": "release",
694             "id": "foo",
695           },
696         }
697       }
698     >
699       project_activity.page
700     </Link>
701   </li>
702 </NavBarTabs>
703 `;
704
705 exports[`should work for long-living branches 2`] = `
706 <NavBarTabs>
707   <li>
708     <Link
709       activeClassName="active"
710       onlyActiveOnIndex={false}
711       style={Object {}}
712       to={
713         Object {
714           "pathname": "/dashboard",
715           "query": Object {
716             "branch": "release",
717             "id": "foo",
718           },
719         }
720       }
721     >
722       overview.page
723     </Link>
724   </li>
725   <li>
726     <Link
727       activeClassName="active"
728       className=""
729       onlyActiveOnIndex={false}
730       style={Object {}}
731       to={
732         Object {
733           "pathname": "/project/issues",
734           "query": Object {
735             "branch": "release",
736             "id": "foo",
737             "resolved": "false",
738           },
739         }
740       }
741     >
742       issues.page
743     </Link>
744   </li>
745   <li>
746     <Link
747       activeClassName="active"
748       onlyActiveOnIndex={false}
749       style={Object {}}
750       to={
751         Object {
752           "pathname": "/component_measures",
753           "query": Object {
754             "branch": "release",
755             "id": "foo",
756           },
757         }
758       }
759     >
760       layout.measures
761     </Link>
762   </li>
763   <li>
764     <Link
765       activeClassName="active"
766       onlyActiveOnIndex={false}
767       style={Object {}}
768       to={
769         Object {
770           "pathname": "/code",
771           "query": Object {
772             "branch": "release",
773             "id": "foo",
774           },
775         }
776       }
777     >
778       code.page
779     </Link>
780   </li>
781   <li>
782     <Link
783       activeClassName="active"
784       onlyActiveOnIndex={false}
785       style={Object {}}
786       to={
787         Object {
788           "pathname": "/project/activity",
789           "query": Object {
790             "branch": "release",
791             "id": "foo",
792           },
793         }
794       }
795     >
796       project_activity.page
797     </Link>
798   </li>
799 </NavBarTabs>
800 `;
801
802 exports[`should work for short-living branches 1`] = `
803 <NavBarTabs>
804   <li>
805     <Link
806       activeClassName="active"
807       onlyActiveOnIndex={false}
808       style={Object {}}
809       to={
810         Object {
811           "pathname": "/dashboard",
812           "query": Object {
813             "branch": "feature",
814             "id": "foo",
815           },
816         }
817       }
818     >
819       overview.page
820     </Link>
821   </li>
822   <li>
823     <Link
824       activeClassName="active"
825       className=""
826       onlyActiveOnIndex={false}
827       style={Object {}}
828       to={
829         Object {
830           "pathname": "/project/issues",
831           "query": Object {
832             "branch": "feature",
833             "id": "foo",
834             "resolved": "false",
835           },
836         }
837       }
838     >
839       issues.page
840     </Link>
841   </li>
842   <li>
843     <Link
844       activeClassName="active"
845       onlyActiveOnIndex={false}
846       style={Object {}}
847       to={
848         Object {
849           "pathname": "/component_measures",
850           "query": Object {
851             "branch": "feature",
852             "id": "foo",
853           },
854         }
855       }
856     >
857       layout.measures
858     </Link>
859   </li>
860   <li>
861     <Link
862       activeClassName="active"
863       onlyActiveOnIndex={false}
864       style={Object {}}
865       to={
866         Object {
867           "pathname": "/code",
868           "query": Object {
869             "branch": "feature",
870             "id": "foo",
871           },
872         }
873       }
874     >
875       code.page
876     </Link>
877   </li>
878 </NavBarTabs>
879 `;
880
881 exports[`should work with extensions 1`] = `
882 <Dropdown
883   data-test="extensions"
884   overlay={
885     <ul
886       className="menu"
887     >
888       <li>
889         <Link
890           activeClassName="active"
891           onlyActiveOnIndex={false}
892           style={Object {}}
893           to={
894             Object {
895               "pathname": "/project/extension/component-foo",
896               "query": Object {
897                 "id": "foo",
898                 "qualifier": "TRK",
899               },
900             }
901           }
902         >
903           ComponentFoo
904         </Link>
905       </li>
906     </ul>
907   }
908   tagName="li"
909 >
910   <Component />
911 </Dropdown>
912 `;
913
914 exports[`should work with extensions 2`] = `
915 <Dropdown
916   data-test="administration"
917   overlay={
918     <ul
919       className="menu"
920     >
921       <li>
922         <Link
923           activeClassName="active"
924           onlyActiveOnIndex={false}
925           style={Object {}}
926           to={
927             Object {
928               "pathname": "/project/settings",
929               "query": Object {
930                 "id": "foo",
931               },
932             }
933           }
934         >
935           project_settings.page
936         </Link>
937       </li>
938       <li>
939         <Link
940           activeClassName="active"
941           onlyActiveOnIndex={false}
942           style={Object {}}
943           to={
944             Object {
945               "pathname": "/project/branches",
946               "query": Object {
947                 "id": "foo",
948               },
949             }
950           }
951         >
952           project_branches.page
953         </Link>
954       </li>
955       <li>
956         <Link
957           activeClassName="active"
958           onlyActiveOnIndex={false}
959           style={Object {}}
960           to={
961             Object {
962               "pathname": "/project/webhooks",
963               "query": Object {
964                 "id": "foo",
965               },
966             }
967           }
968         >
969           webhooks.page
970         </Link>
971       </li>
972       <li>
973         <Link
974           activeClassName="active"
975           onlyActiveOnIndex={false}
976           style={Object {}}
977           to={
978             Object {
979               "pathname": "/project/admin/extension/foo",
980               "query": Object {
981                 "id": "foo",
982                 "qualifier": "TRK",
983               },
984             }
985           }
986         >
987           Foo
988         </Link>
989       </li>
990       <li>
991         <Link
992           activeClassName="active"
993           onlyActiveOnIndex={false}
994           style={Object {}}
995           to={
996             Object {
997               "pathname": "/project/deletion",
998               "query": Object {
999                 "id": "foo",
1000               },
1001             }
1002           }
1003         >
1004           deletion.page
1005         </Link>
1006       </li>
1007     </ul>
1008   }
1009   tagName="li"
1010 >
1011   <Component />
1012 </Dropdown>
1013 `;
1014
1015 exports[`should work with multiple extensions 1`] = `
1016 <Dropdown
1017   data-test="extensions"
1018   overlay={
1019     <ul
1020       className="menu"
1021     >
1022       <li>
1023         <Link
1024           activeClassName="active"
1025           onlyActiveOnIndex={false}
1026           style={Object {}}
1027           to={
1028             Object {
1029               "pathname": "/project/extension/component-foo",
1030               "query": Object {
1031                 "id": "foo",
1032                 "qualifier": "TRK",
1033               },
1034             }
1035           }
1036         >
1037           ComponentFoo
1038         </Link>
1039       </li>
1040       <li>
1041         <Link
1042           activeClassName="active"
1043           onlyActiveOnIndex={false}
1044           style={Object {}}
1045           to={
1046             Object {
1047               "pathname": "/project/extension/component-bar",
1048               "query": Object {
1049                 "id": "foo",
1050                 "qualifier": "TRK",
1051               },
1052             }
1053           }
1054         >
1055           ComponentBar
1056         </Link>
1057       </li>
1058     </ul>
1059   }
1060   tagName="li"
1061 >
1062   <Component />
1063 </Dropdown>
1064 `;
1065
1066 exports[`should work with multiple extensions 2`] = `
1067 <Dropdown
1068   data-test="administration"
1069   overlay={
1070     <ul
1071       className="menu"
1072     >
1073       <li>
1074         <Link
1075           activeClassName="active"
1076           onlyActiveOnIndex={false}
1077           style={Object {}}
1078           to={
1079             Object {
1080               "pathname": "/project/settings",
1081               "query": Object {
1082                 "id": "foo",
1083               },
1084             }
1085           }
1086         >
1087           project_settings.page
1088         </Link>
1089       </li>
1090       <li>
1091         <Link
1092           activeClassName="active"
1093           onlyActiveOnIndex={false}
1094           style={Object {}}
1095           to={
1096             Object {
1097               "pathname": "/project/branches",
1098               "query": Object {
1099                 "id": "foo",
1100               },
1101             }
1102           }
1103         >
1104           project_branches.page
1105         </Link>
1106       </li>
1107       <li>
1108         <Link
1109           activeClassName="active"
1110           onlyActiveOnIndex={false}
1111           style={Object {}}
1112           to={
1113             Object {
1114               "pathname": "/project/webhooks",
1115               "query": Object {
1116                 "id": "foo",
1117               },
1118             }
1119           }
1120         >
1121           webhooks.page
1122         </Link>
1123       </li>
1124       <li>
1125         <Link
1126           activeClassName="active"
1127           onlyActiveOnIndex={false}
1128           style={Object {}}
1129           to={
1130             Object {
1131               "pathname": "/project/admin/extension/foo",
1132               "query": Object {
1133                 "id": "foo",
1134                 "qualifier": "TRK",
1135               },
1136             }
1137           }
1138         >
1139           Foo
1140         </Link>
1141       </li>
1142       <li>
1143         <Link
1144           activeClassName="active"
1145           onlyActiveOnIndex={false}
1146           style={Object {}}
1147           to={
1148             Object {
1149               "pathname": "/project/admin/extension/bar",
1150               "query": Object {
1151                 "id": "foo",
1152                 "qualifier": "TRK",
1153               },
1154             }
1155           }
1156         >
1157           Bar
1158         </Link>
1159       </li>
1160       <li>
1161         <Link
1162           activeClassName="active"
1163           onlyActiveOnIndex={false}
1164           style={Object {}}
1165           to={
1166             Object {
1167               "pathname": "/project/deletion",
1168               "query": Object {
1169                 "id": "foo",
1170               },
1171             }
1172           }
1173         >
1174           deletion.page
1175         </Link>
1176       </li>
1177     </ul>
1178   }
1179   tagName="li"
1180 >
1181   <Component />
1182 </Dropdown>
1183 `;