]> source.dussan.org Git - sonarqube.git/blob
1af1f3d81d717bdbd9b8c3882b2509de3390b416
[sonarqube.git] /
1 // Jest Snapshot v1, https://goo.gl/fbAQLP
2
3 exports[`should handle re-activation 1`] = `
4 <Modal
5   contentLabel="coding_rules.create_custom_rule"
6   onRequestClose={[MockFunction]}
7 >
8   <form
9     onSubmit={[Function]}
10   >
11     <div
12       className="modal-head"
13     >
14       <h2>
15         coding_rules.create_custom_rule
16       </h2>
17     </div>
18     <div
19       className="modal-body modal-container"
20     >
21       <Alert
22         variant="warning"
23       >
24         coding_rules.reactivate.help
25       </Alert>
26       <MandatoryFieldsExplanation
27         className="spacer-bottom"
28       />
29       <div
30         className="modal-field"
31       >
32         <label
33           htmlFor="coding-rules-custom-rule-creation-name"
34         >
35           name
36            
37           <MandatoryFieldMarker />
38         </label>
39         <input
40           autoFocus={true}
41           disabled={false}
42           id="coding-rules-custom-rule-creation-name"
43           onChange={[Function]}
44           required={true}
45           type="text"
46           value=""
47         />
48       </div>
49       <div
50         className="modal-field"
51       >
52         <label
53           htmlFor="coding-rules-custom-rule-creation-key"
54         >
55           key
56            
57           <MandatoryFieldMarker />
58         </label>
59         <input
60           disabled={false}
61           id="coding-rules-custom-rule-creation-key"
62           onChange={[Function]}
63           required={true}
64           type="text"
65           value=""
66         />
67       </div>
68       <div
69         className="display-flex-space-between"
70       >
71         <div
72           className="modal-field flex-1 spacer-right"
73         >
74           <label
75             id="coding-rules-custom-rule-type"
76           >
77             type
78           </label>
79           <Select
80             aria-labelledby="coding-rules-custom-rule-type"
81             components={
82               Object {
83                 "Option": [Function],
84                 "SingleValue": [Function],
85               }
86             }
87             isClearable={false}
88             isDisabled={false}
89             isSearchable={false}
90             onChange={[Function]}
91             options={
92               Array [
93                 Object {
94                   "label": "issue.type.BUG",
95                   "value": "BUG",
96                 },
97                 Object {
98                   "label": "issue.type.VULNERABILITY",
99                   "value": "VULNERABILITY",
100                 },
101                 Object {
102                   "label": "issue.type.CODE_SMELL",
103                   "value": "CODE_SMELL",
104                 },
105                 Object {
106                   "label": "issue.type.SECURITY_HOTSPOT",
107                   "value": "SECURITY_HOTSPOT",
108                 },
109               ]
110             }
111             value={
112               Object {
113                 "label": "issue.type.CODE_SMELL",
114                 "value": "CODE_SMELL",
115               }
116             }
117           />
118         </div>
119         <div
120           className="modal-field flex-1 spacer-right"
121         >
122           <label
123             id="coding-rules-custom-rule-severity"
124           >
125             severity
126           </label>
127           <SeveritySelect
128             ariaLabelledby="coding-rules-custom-rule-severity"
129             isDisabled={false}
130             onChange={[Function]}
131             severity="MAJOR"
132           />
133         </div>
134         <div
135           className="modal-field flex-1"
136         >
137           <label
138             id="coding-rules-custom-rule-status"
139           >
140             coding_rules.filters.status
141           </label>
142           <Select
143             aria-labelledby="coding-rules-custom-rule-status"
144             isClearable={false}
145             isDisabled={false}
146             onChange={[Function]}
147             options={
148               Array [
149                 Object {
150                   "label": "rules.status.READY",
151                   "value": "READY",
152                 },
153                 Object {
154                   "label": "rules.status.BETA",
155                   "value": "BETA",
156                 },
157                 Object {
158                   "label": "rules.status.DEPRECATED",
159                   "value": "DEPRECATED",
160                 },
161               ]
162             }
163             searchable={false}
164             value={
165               Object {
166                 "label": "rules.status.READY",
167                 "value": "READY",
168               }
169             }
170           />
171         </div>
172       </div>
173       <div
174         className="modal-field"
175       >
176         <label
177           htmlFor="coding-rules-custom-rule-creation-html-description"
178         >
179           description
180           <MandatoryFieldMarker />
181         </label>
182         <textarea
183           disabled={false}
184           id="coding-rules-custom-rule-creation-html-description"
185           onChange={[Function]}
186           required={true}
187           rows={5}
188           value=""
189         />
190         <FormattingTips
191           className="modal-field-descriptor text-right"
192         />
193       </div>
194       <div
195         className="modal-field"
196         key="1"
197       >
198         <label
199           className="capitalize"
200           htmlFor="1"
201         >
202           1
203         </label>
204         <input
205           disabled={false}
206           id="1"
207           name="1"
208           onChange={[Function]}
209           placeholder="1"
210           type="text"
211           value=""
212         />
213         <div
214           className="modal-field-description"
215           dangerouslySetInnerHTML={
216             Object {
217               "__html": "description",
218             }
219           }
220         />
221       </div>
222       <div
223         className="modal-field"
224         key="2"
225       >
226         <label
227           className="capitalize"
228           htmlFor="2"
229         >
230           2
231         </label>
232         <textarea
233           disabled={false}
234           id="2"
235           name="2"
236           onChange={[Function]}
237           placeholder="1"
238           rows={3}
239           value=""
240         />
241       </div>
242     </div>
243     <div
244       className="modal-foot"
245     >
246       <SubmitButton
247         disabled={false}
248       >
249         coding_rules.reactivate
250       </SubmitButton>
251       <ResetButtonLink
252         disabled={false}
253         id="coding-rules-custom-rule-creation-cancel"
254         onClick={[MockFunction]}
255       >
256         cancel
257       </ResetButtonLink>
258     </div>
259   </form>
260 </Modal>
261 `;
262
263 exports[`should render correctly: default 1`] = `
264 <Modal
265   contentLabel="coding_rules.create_custom_rule"
266   onRequestClose={[MockFunction]}
267 >
268   <form
269     onSubmit={[Function]}
270   >
271     <div
272       className="modal-head"
273     >
274       <h2>
275         coding_rules.create_custom_rule
276       </h2>
277     </div>
278     <div
279       className="modal-body modal-container"
280     >
281       <MandatoryFieldsExplanation
282         className="spacer-bottom"
283       />
284       <div
285         className="modal-field"
286       >
287         <label
288           htmlFor="coding-rules-custom-rule-creation-name"
289         >
290           name
291            
292           <MandatoryFieldMarker />
293         </label>
294         <input
295           autoFocus={true}
296           disabled={false}
297           id="coding-rules-custom-rule-creation-name"
298           onChange={[Function]}
299           required={true}
300           type="text"
301           value=""
302         />
303       </div>
304       <div
305         className="modal-field"
306       >
307         <label
308           htmlFor="coding-rules-custom-rule-creation-key"
309         >
310           key
311            
312           <MandatoryFieldMarker />
313         </label>
314         <input
315           disabled={false}
316           id="coding-rules-custom-rule-creation-key"
317           onChange={[Function]}
318           required={true}
319           type="text"
320           value=""
321         />
322       </div>
323       <div
324         className="display-flex-space-between"
325       >
326         <div
327           className="modal-field flex-1 spacer-right"
328         >
329           <label
330             id="coding-rules-custom-rule-type"
331           >
332             type
333           </label>
334           <Select
335             aria-labelledby="coding-rules-custom-rule-type"
336             components={
337               Object {
338                 "Option": [Function],
339                 "SingleValue": [Function],
340               }
341             }
342             isClearable={false}
343             isDisabled={false}
344             isSearchable={false}
345             onChange={[Function]}
346             options={
347               Array [
348                 Object {
349                   "label": "issue.type.BUG",
350                   "value": "BUG",
351                 },
352                 Object {
353                   "label": "issue.type.VULNERABILITY",
354                   "value": "VULNERABILITY",
355                 },
356                 Object {
357                   "label": "issue.type.CODE_SMELL",
358                   "value": "CODE_SMELL",
359                 },
360                 Object {
361                   "label": "issue.type.SECURITY_HOTSPOT",
362                   "value": "SECURITY_HOTSPOT",
363                 },
364               ]
365             }
366             value={
367               Object {
368                 "label": "issue.type.CODE_SMELL",
369                 "value": "CODE_SMELL",
370               }
371             }
372           />
373         </div>
374         <div
375           className="modal-field flex-1 spacer-right"
376         >
377           <label
378             id="coding-rules-custom-rule-severity"
379           >
380             severity
381           </label>
382           <SeveritySelect
383             ariaLabelledby="coding-rules-custom-rule-severity"
384             isDisabled={false}
385             onChange={[Function]}
386             severity="MAJOR"
387           />
388         </div>
389         <div
390           className="modal-field flex-1"
391         >
392           <label
393             id="coding-rules-custom-rule-status"
394           >
395             coding_rules.filters.status
396           </label>
397           <Select
398             aria-labelledby="coding-rules-custom-rule-status"
399             isClearable={false}
400             isDisabled={false}
401             onChange={[Function]}
402             options={
403               Array [
404                 Object {
405                   "label": "rules.status.READY",
406                   "value": "READY",
407                 },
408                 Object {
409                   "label": "rules.status.BETA",
410                   "value": "BETA",
411                 },
412                 Object {
413                   "label": "rules.status.DEPRECATED",
414                   "value": "DEPRECATED",
415                 },
416               ]
417             }
418             searchable={false}
419             value={
420               Object {
421                 "label": "rules.status.READY",
422                 "value": "READY",
423               }
424             }
425           />
426         </div>
427       </div>
428       <div
429         className="modal-field"
430       >
431         <label
432           htmlFor="coding-rules-custom-rule-creation-html-description"
433         >
434           description
435           <MandatoryFieldMarker />
436         </label>
437         <textarea
438           disabled={false}
439           id="coding-rules-custom-rule-creation-html-description"
440           onChange={[Function]}
441           required={true}
442           rows={5}
443           value=""
444         />
445         <FormattingTips
446           className="modal-field-descriptor text-right"
447         />
448       </div>
449       <div
450         className="modal-field"
451         key="1"
452       >
453         <label
454           className="capitalize"
455           htmlFor="1"
456         >
457           1
458         </label>
459         <input
460           disabled={false}
461           id="1"
462           name="1"
463           onChange={[Function]}
464           placeholder="1"
465           type="text"
466           value=""
467         />
468         <div
469           className="modal-field-description"
470           dangerouslySetInnerHTML={
471             Object {
472               "__html": "description",
473             }
474           }
475         />
476       </div>
477       <div
478         className="modal-field"
479         key="2"
480       >
481         <label
482           className="capitalize"
483           htmlFor="2"
484         >
485           2
486         </label>
487         <textarea
488           disabled={false}
489           id="2"
490           name="2"
491           onChange={[Function]}
492           placeholder="1"
493           rows={3}
494           value=""
495         />
496       </div>
497     </div>
498     <div
499       className="modal-foot"
500     >
501       <SubmitButton
502         disabled={false}
503       >
504         create
505       </SubmitButton>
506       <ResetButtonLink
507         disabled={false}
508         id="coding-rules-custom-rule-creation-cancel"
509         onClick={[MockFunction]}
510       >
511         cancel
512       </ResetButtonLink>
513     </div>
514   </form>
515 </Modal>
516 `;