]> source.dussan.org Git - sonarqube.git/blob
ccfb4ebf10853398851615d7e7564f9ad63db083
[sonarqube.git] /
1 // Jest Snapshot v1, https://goo.gl/fbAQLP
2
3 exports[`should render correctly: custom rule 1`] = `
4 <Modal
5   contentLabel="title"
6   onRequestClose={[MockFunction]}
7   size="small"
8 >
9   <form
10     onSubmit={[Function]}
11   >
12     <div
13       className="modal-head"
14     >
15       <h2>
16         title
17       </h2>
18     </div>
19     <div
20       className="modal-body"
21     >
22       <Alert
23         variant="info"
24       >
25         coding_rules.active_in_all_profiles
26       </Alert>
27       <div
28         className="modal-field"
29       >
30         <label
31           id="coding-rules-quality-profile-select"
32         >
33           coding_rules.quality_profile
34         </label>
35         <Select
36           aria-labelledby="coding-rules-quality-profile-select"
37           className="js-profile"
38           getOptionLabel={[Function]}
39           isClearable={false}
40           isDisabled={false}
41           onChange={[Function]}
42           options={Array []}
43         />
44       </div>
45       <div
46         className="modal-field"
47       >
48         <label
49           id="coding-rules-severity-select"
50         >
51           severity
52         </label>
53         <Select
54           aria-labelledby="coding-rules-severity-select"
55           className="js-severity"
56           components={
57             Object {
58               "Option": [Function],
59               "SingleValue": [Function],
60             }
61           }
62           isClearable={false}
63           isDisabled={false}
64           isSearchable={false}
65           onChange={[Function]}
66           options={
67             Array [
68               Object {
69                 "label": "severity.BLOCKER",
70                 "value": "BLOCKER",
71               },
72               Object {
73                 "label": "severity.CRITICAL",
74                 "value": "CRITICAL",
75               },
76               Object {
77                 "label": "severity.MAJOR",
78                 "value": "MAJOR",
79               },
80               Object {
81                 "label": "severity.MINOR",
82                 "value": "MINOR",
83               },
84               Object {
85                 "label": "severity.INFO",
86                 "value": "INFO",
87               },
88             ]
89           }
90           value={
91             Object {
92               "label": "severity.MAJOR",
93               "value": "MAJOR",
94             }
95           }
96         />
97       </div>
98       <div
99         className="modal-field"
100       >
101         <p
102           className="note"
103         >
104           coding_rules.custom_rule.activation_notice
105         </p>
106       </div>
107     </div>
108     <footer
109       className="modal-foot"
110     >
111       <SubmitButton
112         disabled={true}
113       >
114         coding_rules.activate
115       </SubmitButton>
116       <ResetButtonLink
117         disabled={false}
118         onClick={[MockFunction]}
119       >
120         cancel
121       </ResetButtonLink>
122     </footer>
123   </form>
124 </Modal>
125 `;
126
127 exports[`should render correctly: default 1`] = `
128 <Modal
129   contentLabel="title"
130   onRequestClose={[MockFunction]}
131   size="small"
132 >
133   <form
134     onSubmit={[Function]}
135   >
136     <div
137       className="modal-head"
138     >
139       <h2>
140         title
141       </h2>
142     </div>
143     <div
144       className="modal-body modal-container"
145     >
146       <Alert
147         variant="info"
148       >
149         coding_rules.active_in_all_profiles
150       </Alert>
151       <div
152         className="modal-field"
153       >
154         <label
155           id="coding-rules-quality-profile-select"
156         >
157           coding_rules.quality_profile
158         </label>
159         <Select
160           aria-labelledby="coding-rules-quality-profile-select"
161           className="js-profile"
162           getOptionLabel={[Function]}
163           isClearable={false}
164           isDisabled={false}
165           onChange={[Function]}
166           options={Array []}
167         />
168       </div>
169       <div
170         className="modal-field"
171       >
172         <label
173           id="coding-rules-severity-select"
174         >
175           severity
176         </label>
177         <Select
178           aria-labelledby="coding-rules-severity-select"
179           className="js-severity"
180           components={
181             Object {
182               "Option": [Function],
183               "SingleValue": [Function],
184             }
185           }
186           isClearable={false}
187           isDisabled={false}
188           isSearchable={false}
189           onChange={[Function]}
190           options={
191             Array [
192               Object {
193                 "label": "severity.BLOCKER",
194                 "value": "BLOCKER",
195               },
196               Object {
197                 "label": "severity.CRITICAL",
198                 "value": "CRITICAL",
199               },
200               Object {
201                 "label": "severity.MAJOR",
202                 "value": "MAJOR",
203               },
204               Object {
205                 "label": "severity.MINOR",
206                 "value": "MINOR",
207               },
208               Object {
209                 "label": "severity.INFO",
210                 "value": "INFO",
211               },
212             ]
213           }
214           value={
215             Object {
216               "label": "severity.MAJOR",
217               "value": "MAJOR",
218             }
219           }
220         />
221       </div>
222       <div
223         className="modal-field"
224         key="1"
225       >
226         <label
227           title="1"
228         >
229           1
230         </label>
231         <input
232           disabled={false}
233           name="1"
234           onChange={[Function]}
235           placeholder="1"
236           type="text"
237           value="1"
238         />
239         <div
240           className="note"
241           dangerouslySetInnerHTML={
242             Object {
243               "__html": "description",
244             }
245           }
246         />
247       </div>
248       <div
249         className="modal-field"
250         key="2"
251       >
252         <label
253           title="2"
254         >
255           2
256         </label>
257         <textarea
258           disabled={false}
259           name="2"
260           onChange={[Function]}
261           placeholder="1"
262           rows={3}
263           value="1"
264         />
265       </div>
266     </div>
267     <footer
268       className="modal-foot"
269     >
270       <SubmitButton
271         disabled={true}
272       >
273         coding_rules.activate
274       </SubmitButton>
275       <ResetButtonLink
276         disabled={false}
277         onClick={[MockFunction]}
278       >
279         cancel
280       </ResetButtonLink>
281     </footer>
282   </form>
283 </Modal>
284 `;
285
286 exports[`should render correctly: submitting 1`] = `
287 <Modal
288   contentLabel="title"
289   onRequestClose={[MockFunction]}
290   size="small"
291 >
292   <form
293     onSubmit={[Function]}
294   >
295     <div
296       className="modal-head"
297     >
298       <h2>
299         title
300       </h2>
301     </div>
302     <div
303       className="modal-body modal-container"
304     >
305       <Alert
306         variant="info"
307       >
308         coding_rules.active_in_all_profiles
309       </Alert>
310       <div
311         className="modal-field"
312       >
313         <label
314           id="coding-rules-quality-profile-select"
315         >
316           coding_rules.quality_profile
317         </label>
318         <Select
319           aria-labelledby="coding-rules-quality-profile-select"
320           className="js-profile"
321           getOptionLabel={[Function]}
322           isClearable={false}
323           isDisabled={true}
324           onChange={[Function]}
325           options={Array []}
326         />
327       </div>
328       <div
329         className="modal-field"
330       >
331         <label
332           id="coding-rules-severity-select"
333         >
334           severity
335         </label>
336         <Select
337           aria-labelledby="coding-rules-severity-select"
338           className="js-severity"
339           components={
340             Object {
341               "Option": [Function],
342               "SingleValue": [Function],
343             }
344           }
345           isClearable={false}
346           isDisabled={true}
347           isSearchable={false}
348           onChange={[Function]}
349           options={
350             Array [
351               Object {
352                 "label": "severity.BLOCKER",
353                 "value": "BLOCKER",
354               },
355               Object {
356                 "label": "severity.CRITICAL",
357                 "value": "CRITICAL",
358               },
359               Object {
360                 "label": "severity.MAJOR",
361                 "value": "MAJOR",
362               },
363               Object {
364                 "label": "severity.MINOR",
365                 "value": "MINOR",
366               },
367               Object {
368                 "label": "severity.INFO",
369                 "value": "INFO",
370               },
371             ]
372           }
373           value={
374             Object {
375               "label": "severity.MAJOR",
376               "value": "MAJOR",
377             }
378           }
379         />
380       </div>
381       <div
382         className="modal-field"
383         key="1"
384       >
385         <label
386           title="1"
387         >
388           1
389         </label>
390         <input
391           disabled={true}
392           name="1"
393           onChange={[Function]}
394           placeholder="1"
395           type="text"
396           value="1"
397         />
398         <div
399           className="note"
400           dangerouslySetInnerHTML={
401             Object {
402               "__html": "description",
403             }
404           }
405         />
406       </div>
407       <div
408         className="modal-field"
409         key="2"
410       >
411         <label
412           title="2"
413         >
414           2
415         </label>
416         <textarea
417           disabled={true}
418           name="2"
419           onChange={[Function]}
420           placeholder="1"
421           rows={3}
422           value="1"
423         />
424       </div>
425     </div>
426     <footer
427       className="modal-foot"
428     >
429       <i
430         className="spinner spacer-right"
431       />
432       <SubmitButton
433         disabled={true}
434       >
435         coding_rules.activate
436       </SubmitButton>
437       <ResetButtonLink
438         disabled={true}
439         onClick={[MockFunction]}
440       >
441         cancel
442       </ResetButtonLink>
443     </footer>
444   </form>
445 </Modal>
446 `;
447
448 exports[`should render correctly: update mode 1`] = `
449 <Modal
450   contentLabel="title"
451   onRequestClose={[MockFunction]}
452   size="small"
453 >
454   <form
455     onSubmit={[Function]}
456   >
457     <div
458       className="modal-head"
459     >
460       <h2>
461         title
462       </h2>
463     </div>
464     <div
465       className="modal-body modal-container"
466     >
467       <div
468         className="modal-field"
469       >
470         <label
471           id="coding-rules-quality-profile-select"
472         >
473           coding_rules.quality_profile
474         </label>
475         <Select
476           aria-labelledby="coding-rules-quality-profile-select"
477           className="js-profile"
478           getOptionLabel={[Function]}
479           isClearable={false}
480           isDisabled={false}
481           onChange={[Function]}
482           options={Array []}
483         />
484       </div>
485       <div
486         className="modal-field"
487       >
488         <label
489           id="coding-rules-severity-select"
490         >
491           severity
492         </label>
493         <Select
494           aria-labelledby="coding-rules-severity-select"
495           className="js-severity"
496           components={
497             Object {
498               "Option": [Function],
499               "SingleValue": [Function],
500             }
501           }
502           isClearable={false}
503           isDisabled={false}
504           isSearchable={false}
505           onChange={[Function]}
506           options={
507             Array [
508               Object {
509                 "label": "severity.BLOCKER",
510                 "value": "BLOCKER",
511               },
512               Object {
513                 "label": "severity.CRITICAL",
514                 "value": "CRITICAL",
515               },
516               Object {
517                 "label": "severity.MAJOR",
518                 "value": "MAJOR",
519               },
520               Object {
521                 "label": "severity.MINOR",
522                 "value": "MINOR",
523               },
524               Object {
525                 "label": "severity.INFO",
526                 "value": "INFO",
527               },
528             ]
529           }
530           value={
531             Object {
532               "label": "severity.MAJOR",
533               "value": "MAJOR",
534             }
535           }
536         />
537       </div>
538       <div
539         className="modal-field"
540         key="1"
541       >
542         <label
543           title="1"
544         >
545           1
546         </label>
547         <input
548           disabled={false}
549           name="1"
550           onChange={[Function]}
551           placeholder="1"
552           type="text"
553           value="1"
554         />
555         <div
556           className="note"
557           dangerouslySetInnerHTML={
558             Object {
559               "__html": "description",
560             }
561           }
562         />
563       </div>
564       <div
565         className="modal-field"
566         key="2"
567       >
568         <label
569           title="2"
570         >
571           2
572         </label>
573         <textarea
574           disabled={false}
575           name="2"
576           onChange={[Function]}
577           placeholder="1"
578           rows={3}
579           value="1"
580         />
581       </div>
582     </div>
583     <footer
584       className="modal-foot"
585     >
586       <SubmitButton
587         disabled={true}
588       >
589         save
590       </SubmitButton>
591       <ResetButtonLink
592         disabled={false}
593         onClick={[MockFunction]}
594       >
595         cancel
596       </ResetButtonLink>
597     </footer>
598   </form>
599 </Modal>
600 `;
601
602 exports[`should render correctly: with deep profiles 1`] = `
603 <Modal
604   contentLabel="title"
605   onRequestClose={[MockFunction]}
606   size="small"
607 >
608   <form
609     onSubmit={[Function]}
610   >
611     <div
612       className="modal-head"
613     >
614       <h2>
615         title
616       </h2>
617     </div>
618     <div
619       className="modal-body modal-container"
620     >
621       <div
622         className="modal-field"
623       >
624         <label
625           id="coding-rules-quality-profile-select"
626         >
627           coding_rules.quality_profile
628         </label>
629         <Select
630           aria-labelledby="coding-rules-quality-profile-select"
631           className="js-profile"
632           getOptionLabel={[Function]}
633           isClearable={false}
634           isDisabled={true}
635           onChange={[Function]}
636           options={
637             Array [
638               Object {
639                 "actions": Object {
640                   "edit": true,
641                 },
642                 "activeDeprecatedRuleCount": 2,
643                 "activeRuleCount": 10,
644                 "childrenCount": 0,
645                 "depth": 0,
646                 "isBuiltIn": false,
647                 "isDefault": false,
648                 "isInherited": false,
649                 "key": "key",
650                 "language": "js",
651                 "languageName": "JavaScript",
652                 "name": "name",
653                 "projectCount": 3,
654               },
655             ]
656           }
657           value={
658             Object {
659               "actions": Object {
660                 "edit": true,
661               },
662               "activeDeprecatedRuleCount": 2,
663               "activeRuleCount": 10,
664               "childrenCount": 0,
665               "depth": 0,
666               "isBuiltIn": false,
667               "isDefault": false,
668               "isInherited": false,
669               "key": "key",
670               "language": "js",
671               "languageName": "JavaScript",
672               "name": "name",
673               "projectCount": 3,
674             }
675           }
676         />
677       </div>
678       <div
679         className="modal-field"
680       >
681         <label
682           id="coding-rules-severity-select"
683         >
684           severity
685         </label>
686         <Select
687           aria-labelledby="coding-rules-severity-select"
688           className="js-severity"
689           components={
690             Object {
691               "Option": [Function],
692               "SingleValue": [Function],
693             }
694           }
695           isClearable={false}
696           isDisabled={false}
697           isSearchable={false}
698           onChange={[Function]}
699           options={
700             Array [
701               Object {
702                 "label": "severity.BLOCKER",
703                 "value": "BLOCKER",
704               },
705               Object {
706                 "label": "severity.CRITICAL",
707                 "value": "CRITICAL",
708               },
709               Object {
710                 "label": "severity.MAJOR",
711                 "value": "MAJOR",
712               },
713               Object {
714                 "label": "severity.MINOR",
715                 "value": "MINOR",
716               },
717               Object {
718                 "label": "severity.INFO",
719                 "value": "INFO",
720               },
721             ]
722           }
723           value={
724             Object {
725               "label": "severity.MAJOR",
726               "value": "MAJOR",
727             }
728           }
729         />
730       </div>
731       <div
732         className="modal-field"
733         key="1"
734       >
735         <label
736           title="1"
737         >
738           1
739         </label>
740         <input
741           disabled={false}
742           name="1"
743           onChange={[Function]}
744           placeholder="1"
745           type="text"
746           value="1"
747         />
748         <div
749           className="note"
750           dangerouslySetInnerHTML={
751             Object {
752               "__html": "description",
753             }
754           }
755         />
756       </div>
757       <div
758         className="modal-field"
759         key="2"
760       >
761         <label
762           title="2"
763         >
764           2
765         </label>
766         <textarea
767           disabled={false}
768           name="2"
769           onChange={[Function]}
770           placeholder="1"
771           rows={3}
772           value="1"
773         />
774       </div>
775     </div>
776     <footer
777       className="modal-foot"
778     >
779       <SubmitButton
780         disabled={false}
781       >
782         coding_rules.activate
783       </SubmitButton>
784       <ResetButtonLink
785         disabled={false}
786         onClick={[MockFunction]}
787       >
788         cancel
789       </ResetButtonLink>
790     </footer>
791   </form>
792 </Modal>
793 `;