]> source.dussan.org Git - sonarqube.git/blob
218e1a3d16ec0005e81ecf51b748e2e8a7a954a3
[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-label"
32         >
33           coding_rules.quality_profile
34         </label>
35         <Select
36           aria-labelledby="coding-rules-quality-profile-select-label"
37           getOptionLabel={[Function]}
38           id="coding-rules-quality-profile-select"
39           isClearable={false}
40           isDisabled={false}
41           onChange={[Function]}
42           options={[]}
43         />
44       </div>
45       <div
46         className="modal-field"
47       >
48         <label
49           id="coding-rules-severity-select"
50         >
51           severity
52         </label>
53         <SeveritySelect
54           ariaLabelledby="coding-rules-severity-select"
55           isDisabled={false}
56           onChange={[Function]}
57           severity="MAJOR"
58         />
59       </div>
60       <div
61         className="modal-field"
62       >
63         <p
64           className="note"
65         >
66           coding_rules.custom_rule.activation_notice
67         </p>
68       </div>
69     </div>
70     <footer
71       className="modal-foot"
72     >
73       <SubmitButton
74         disabled={true}
75       >
76         coding_rules.activate
77       </SubmitButton>
78       <ResetButtonLink
79         disabled={false}
80         onClick={[MockFunction]}
81       >
82         cancel
83       </ResetButtonLink>
84     </footer>
85   </form>
86 </Modal>
87 `;
88
89 exports[`should render correctly: default 1`] = `
90 <Modal
91   contentLabel="title"
92   onRequestClose={[MockFunction]}
93   size="small"
94 >
95   <form
96     onSubmit={[Function]}
97   >
98     <div
99       className="modal-head"
100     >
101       <h2>
102         title
103       </h2>
104     </div>
105     <div
106       className="modal-body modal-container"
107     >
108       <Alert
109         variant="info"
110       >
111         coding_rules.active_in_all_profiles
112       </Alert>
113       <div
114         className="modal-field"
115       >
116         <label
117           id="coding-rules-quality-profile-select-label"
118         >
119           coding_rules.quality_profile
120         </label>
121         <Select
122           aria-labelledby="coding-rules-quality-profile-select-label"
123           getOptionLabel={[Function]}
124           id="coding-rules-quality-profile-select"
125           isClearable={false}
126           isDisabled={false}
127           onChange={[Function]}
128           options={[]}
129         />
130       </div>
131       <div
132         className="modal-field"
133       >
134         <label
135           id="coding-rules-severity-select"
136         >
137           severity
138         </label>
139         <SeveritySelect
140           ariaLabelledby="coding-rules-severity-select"
141           isDisabled={false}
142           onChange={[Function]}
143           severity="MAJOR"
144         />
145       </div>
146       <div
147         className="modal-field"
148         key="1"
149       >
150         <label
151           title="1"
152         >
153           1
154         </label>
155         <input
156           disabled={false}
157           name="1"
158           onChange={[Function]}
159           placeholder="1"
160           type="text"
161           value="1"
162         />
163         <div
164           className="note"
165           dangerouslySetInnerHTML={
166             {
167               "__html": "description",
168             }
169           }
170         />
171       </div>
172       <div
173         className="modal-field"
174         key="2"
175       >
176         <label
177           title="2"
178         >
179           2
180         </label>
181         <textarea
182           disabled={false}
183           name="2"
184           onChange={[Function]}
185           placeholder="1"
186           rows={3}
187           value="1"
188         />
189       </div>
190     </div>
191     <footer
192       className="modal-foot"
193     >
194       <SubmitButton
195         disabled={true}
196       >
197         coding_rules.activate
198       </SubmitButton>
199       <ResetButtonLink
200         disabled={false}
201         onClick={[MockFunction]}
202       >
203         cancel
204       </ResetButtonLink>
205     </footer>
206   </form>
207 </Modal>
208 `;
209
210 exports[`should render correctly: submitting 1`] = `
211 <Modal
212   contentLabel="title"
213   onRequestClose={[MockFunction]}
214   size="small"
215 >
216   <form
217     onSubmit={[Function]}
218   >
219     <div
220       className="modal-head"
221     >
222       <h2>
223         title
224       </h2>
225     </div>
226     <div
227       className="modal-body modal-container"
228     >
229       <Alert
230         variant="info"
231       >
232         coding_rules.active_in_all_profiles
233       </Alert>
234       <div
235         className="modal-field"
236       >
237         <label
238           id="coding-rules-quality-profile-select-label"
239         >
240           coding_rules.quality_profile
241         </label>
242         <Select
243           aria-labelledby="coding-rules-quality-profile-select-label"
244           getOptionLabel={[Function]}
245           id="coding-rules-quality-profile-select"
246           isClearable={false}
247           isDisabled={true}
248           onChange={[Function]}
249           options={[]}
250         />
251       </div>
252       <div
253         className="modal-field"
254       >
255         <label
256           id="coding-rules-severity-select"
257         >
258           severity
259         </label>
260         <SeveritySelect
261           ariaLabelledby="coding-rules-severity-select"
262           isDisabled={true}
263           onChange={[Function]}
264           severity="MAJOR"
265         />
266       </div>
267       <div
268         className="modal-field"
269         key="1"
270       >
271         <label
272           title="1"
273         >
274           1
275         </label>
276         <input
277           disabled={true}
278           name="1"
279           onChange={[Function]}
280           placeholder="1"
281           type="text"
282           value="1"
283         />
284         <div
285           className="note"
286           dangerouslySetInnerHTML={
287             {
288               "__html": "description",
289             }
290           }
291         />
292       </div>
293       <div
294         className="modal-field"
295         key="2"
296       >
297         <label
298           title="2"
299         >
300           2
301         </label>
302         <textarea
303           disabled={true}
304           name="2"
305           onChange={[Function]}
306           placeholder="1"
307           rows={3}
308           value="1"
309         />
310       </div>
311     </div>
312     <footer
313       className="modal-foot"
314     >
315       <i
316         className="spinner spacer-right"
317       />
318       <SubmitButton
319         disabled={true}
320       >
321         coding_rules.activate
322       </SubmitButton>
323       <ResetButtonLink
324         disabled={true}
325         onClick={[MockFunction]}
326       >
327         cancel
328       </ResetButtonLink>
329     </footer>
330   </form>
331 </Modal>
332 `;
333
334 exports[`should render correctly: update mode 1`] = `
335 <Modal
336   contentLabel="title"
337   onRequestClose={[MockFunction]}
338   size="small"
339 >
340   <form
341     onSubmit={[Function]}
342   >
343     <div
344       className="modal-head"
345     >
346       <h2>
347         title
348       </h2>
349     </div>
350     <div
351       className="modal-body modal-container"
352     >
353       <div
354         className="modal-field"
355       >
356         <label
357           id="coding-rules-quality-profile-select-label"
358         >
359           coding_rules.quality_profile
360         </label>
361         <Select
362           aria-labelledby="coding-rules-quality-profile-select-label"
363           getOptionLabel={[Function]}
364           id="coding-rules-quality-profile-select"
365           isClearable={false}
366           isDisabled={false}
367           onChange={[Function]}
368           options={[]}
369         />
370       </div>
371       <div
372         className="modal-field"
373       >
374         <label
375           id="coding-rules-severity-select"
376         >
377           severity
378         </label>
379         <SeveritySelect
380           ariaLabelledby="coding-rules-severity-select"
381           isDisabled={false}
382           onChange={[Function]}
383           severity="MAJOR"
384         />
385       </div>
386       <div
387         className="modal-field"
388         key="1"
389       >
390         <label
391           title="1"
392         >
393           1
394         </label>
395         <input
396           disabled={false}
397           name="1"
398           onChange={[Function]}
399           placeholder="1"
400           type="text"
401           value="1"
402         />
403         <div
404           className="note"
405           dangerouslySetInnerHTML={
406             {
407               "__html": "description",
408             }
409           }
410         />
411       </div>
412       <div
413         className="modal-field"
414         key="2"
415       >
416         <label
417           title="2"
418         >
419           2
420         </label>
421         <textarea
422           disabled={false}
423           name="2"
424           onChange={[Function]}
425           placeholder="1"
426           rows={3}
427           value="1"
428         />
429       </div>
430     </div>
431     <footer
432       className="modal-foot"
433     >
434       <SubmitButton
435         disabled={true}
436       >
437         save
438       </SubmitButton>
439       <ResetButtonLink
440         disabled={false}
441         onClick={[MockFunction]}
442       >
443         cancel
444       </ResetButtonLink>
445     </footer>
446   </form>
447 </Modal>
448 `;
449
450 exports[`should render correctly: with deep profiles 1`] = `
451 <Modal
452   contentLabel="title"
453   onRequestClose={[MockFunction]}
454   size="small"
455 >
456   <form
457     onSubmit={[Function]}
458   >
459     <div
460       className="modal-head"
461     >
462       <h2>
463         title
464       </h2>
465     </div>
466     <div
467       className="modal-body modal-container"
468     >
469       <div
470         className="modal-field"
471       >
472         <label
473           id="coding-rules-quality-profile-select-label"
474         >
475           coding_rules.quality_profile
476         </label>
477         <Select
478           aria-labelledby="coding-rules-quality-profile-select-label"
479           getOptionLabel={[Function]}
480           id="coding-rules-quality-profile-select"
481           isClearable={false}
482           isDisabled={true}
483           onChange={[Function]}
484           options={
485             [
486               {
487                 "actions": {
488                   "edit": true,
489                 },
490                 "activeDeprecatedRuleCount": 2,
491                 "activeRuleCount": 10,
492                 "childrenCount": 0,
493                 "depth": 0,
494                 "isBuiltIn": false,
495                 "isDefault": false,
496                 "isInherited": false,
497                 "key": "key",
498                 "language": "js",
499                 "languageName": "JavaScript",
500                 "name": "name",
501                 "projectCount": 3,
502               },
503             ]
504           }
505           value={
506             {
507               "actions": {
508                 "edit": true,
509               },
510               "activeDeprecatedRuleCount": 2,
511               "activeRuleCount": 10,
512               "childrenCount": 0,
513               "depth": 0,
514               "isBuiltIn": false,
515               "isDefault": false,
516               "isInherited": false,
517               "key": "key",
518               "language": "js",
519               "languageName": "JavaScript",
520               "name": "name",
521               "projectCount": 3,
522             }
523           }
524         />
525       </div>
526       <div
527         className="modal-field"
528       >
529         <label
530           id="coding-rules-severity-select"
531         >
532           severity
533         </label>
534         <SeveritySelect
535           ariaLabelledby="coding-rules-severity-select"
536           isDisabled={false}
537           onChange={[Function]}
538           severity="MAJOR"
539         />
540       </div>
541       <div
542         className="modal-field"
543         key="1"
544       >
545         <label
546           title="1"
547         >
548           1
549         </label>
550         <input
551           disabled={false}
552           name="1"
553           onChange={[Function]}
554           placeholder="1"
555           type="text"
556           value="1"
557         />
558         <div
559           className="note"
560           dangerouslySetInnerHTML={
561             {
562               "__html": "description",
563             }
564           }
565         />
566       </div>
567       <div
568         className="modal-field"
569         key="2"
570       >
571         <label
572           title="2"
573         >
574           2
575         </label>
576         <textarea
577           disabled={false}
578           name="2"
579           onChange={[Function]}
580           placeholder="1"
581           rows={3}
582           value="1"
583         />
584       </div>
585     </div>
586     <footer
587       className="modal-foot"
588     >
589       <SubmitButton
590         disabled={false}
591       >
592         coding_rules.activate
593       </SubmitButton>
594       <ResetButtonLink
595         disabled={false}
596         onClick={[MockFunction]}
597       >
598         cancel
599       </ResetButtonLink>
600     </footer>
601   </form>
602 </Modal>
603 `;