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