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