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