]> source.dussan.org Git - sonarqube.git/blob
e51c719d869d8adfb6fe5fb568ff830371fdb213
[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               ]
109             }
110             searchable={false}
111             value="CODE_SMELL"
112             valueRenderer={[Function]}
113           />
114         </div>
115         <div
116           className="modal-field flex-1 spacer-right"
117         >
118           <label
119             htmlFor="coding-rules-custom-rule-severity"
120           >
121             severity
122           </label>
123           <Select
124             clearable={false}
125             disabled={false}
126             id="coding-rules-custom-rule-severity"
127             onChange={[Function]}
128             optionRenderer={[Function]}
129             options={
130               Array [
131                 Object {
132                   "label": "severity.BLOCKER",
133                   "value": "BLOCKER",
134                 },
135                 Object {
136                   "label": "severity.CRITICAL",
137                   "value": "CRITICAL",
138                 },
139                 Object {
140                   "label": "severity.MAJOR",
141                   "value": "MAJOR",
142                 },
143                 Object {
144                   "label": "severity.MINOR",
145                   "value": "MINOR",
146                 },
147                 Object {
148                   "label": "severity.INFO",
149                   "value": "INFO",
150                 },
151               ]
152             }
153             searchable={false}
154             value="MAJOR"
155             valueRenderer={[Function]}
156           />
157         </div>
158         <div
159           className="modal-field flex-1"
160         >
161           <label
162             htmlFor="coding-rules-custom-rule-status"
163           >
164             coding_rules.filters.status
165           </label>
166           <Select
167             clearable={false}
168             disabled={false}
169             id="coding-rules-custom-rule-status"
170             onChange={[Function]}
171             options={
172               Array [
173                 Object {
174                   "label": "rules.status.READY",
175                   "value": "READY",
176                 },
177                 Object {
178                   "label": "rules.status.BETA",
179                   "value": "BETA",
180                 },
181                 Object {
182                   "label": "rules.status.DEPRECATED",
183                   "value": "DEPRECATED",
184                 },
185               ]
186             }
187             searchable={false}
188             value="READY"
189           />
190         </div>
191       </div>
192       <div
193         className="modal-field"
194       >
195         <label
196           htmlFor="coding-rules-custom-rule-creation-html-description"
197         >
198           description
199            
200           <em
201             className="mandatory"
202           >
203             *
204           </em>
205         </label>
206         <textarea
207           disabled={false}
208           id="coding-rules-custom-rule-creation-html-description"
209           onChange={[Function]}
210           required={true}
211           rows={5}
212           value=""
213         />
214         <FormattingTips
215           className="modal-field-descriptor text-right"
216         />
217       </div>
218     </div>
219     <div
220       className="modal-foot"
221     >
222       <SubmitButton
223         disabled={false}
224       >
225         coding_rules.reactivate
226       </SubmitButton>
227       <ResetButtonLink
228         disabled={false}
229         id="coding-rules-custom-rule-creation-cancel"
230         onClick={[MockFunction]}
231       >
232         cancel
233       </ResetButtonLink>
234     </div>
235   </form>
236 </Modal>
237 `;
238
239 exports[`should render correctly 1`] = `
240 <Modal
241   contentLabel="coding_rules.create_custom_rule"
242   onRequestClose={[MockFunction]}
243 >
244   <form
245     onSubmit={[Function]}
246   >
247     <div
248       className="modal-head"
249     >
250       <h2>
251         coding_rules.create_custom_rule
252       </h2>
253     </div>
254     <div
255       className="modal-body modal-container"
256     >
257       <div
258         className="modal-field"
259       >
260         <label
261           htmlFor="coding-rules-custom-rule-creation-name"
262         >
263           name
264            
265           <em
266             className="mandatory"
267           >
268             *
269           </em>
270         </label>
271         <input
272           autoFocus={true}
273           disabled={false}
274           id="coding-rules-custom-rule-creation-name"
275           onChange={[Function]}
276           required={true}
277           type="text"
278           value=""
279         />
280       </div>
281       <div
282         className="modal-field"
283       >
284         <label
285           htmlFor="coding-rules-custom-rule-creation-key"
286         >
287           key
288            
289           <em
290             className="mandatory"
291           >
292             *
293           </em>
294         </label>
295         <input
296           disabled={false}
297           id="coding-rules-custom-rule-creation-key"
298           onChange={[Function]}
299           required={true}
300           type="text"
301           value=""
302         />
303       </div>
304       <div
305         className="display-flex-space-between"
306       >
307         <div
308           className="modal-field flex-1 spacer-right"
309         >
310           <label
311             htmlFor="coding-rules-custom-rule-type"
312           >
313             type
314           </label>
315           <Select
316             clearable={false}
317             disabled={false}
318             id="coding-rules-custom-rule-type"
319             onChange={[Function]}
320             optionRenderer={[Function]}
321             options={
322               Array [
323                 Object {
324                   "label": "issue.type.BUG",
325                   "value": "BUG",
326                 },
327                 Object {
328                   "label": "issue.type.VULNERABILITY",
329                   "value": "VULNERABILITY",
330                 },
331                 Object {
332                   "label": "issue.type.CODE_SMELL",
333                   "value": "CODE_SMELL",
334                 },
335                 Object {
336                   "label": "issue.type.SECURITY_HOTSPOT",
337                   "value": "SECURITY_HOTSPOT",
338                 },
339               ]
340             }
341             searchable={false}
342             value="CODE_SMELL"
343             valueRenderer={[Function]}
344           />
345         </div>
346         <div
347           className="modal-field flex-1 spacer-right"
348         >
349           <label
350             htmlFor="coding-rules-custom-rule-severity"
351           >
352             severity
353           </label>
354           <Select
355             clearable={false}
356             disabled={false}
357             id="coding-rules-custom-rule-severity"
358             onChange={[Function]}
359             optionRenderer={[Function]}
360             options={
361               Array [
362                 Object {
363                   "label": "severity.BLOCKER",
364                   "value": "BLOCKER",
365                 },
366                 Object {
367                   "label": "severity.CRITICAL",
368                   "value": "CRITICAL",
369                 },
370                 Object {
371                   "label": "severity.MAJOR",
372                   "value": "MAJOR",
373                 },
374                 Object {
375                   "label": "severity.MINOR",
376                   "value": "MINOR",
377                 },
378                 Object {
379                   "label": "severity.INFO",
380                   "value": "INFO",
381                 },
382               ]
383             }
384             searchable={false}
385             value="MAJOR"
386             valueRenderer={[Function]}
387           />
388         </div>
389         <div
390           className="modal-field flex-1"
391         >
392           <label
393             htmlFor="coding-rules-custom-rule-status"
394           >
395             coding_rules.filters.status
396           </label>
397           <Select
398             clearable={false}
399             disabled={false}
400             id="coding-rules-custom-rule-status"
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="READY"
420           />
421         </div>
422       </div>
423       <div
424         className="modal-field"
425       >
426         <label
427           htmlFor="coding-rules-custom-rule-creation-html-description"
428         >
429           description
430            
431           <em
432             className="mandatory"
433           >
434             *
435           </em>
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     <div
451       className="modal-foot"
452     >
453       <SubmitButton
454         disabled={false}
455       >
456         create
457       </SubmitButton>
458       <ResetButtonLink
459         disabled={false}
460         id="coding-rules-custom-rule-creation-cancel"
461         onClick={[MockFunction]}
462       >
463         cancel
464       </ResetButtonLink>
465     </div>
466   </form>
467 </Modal>
468 `;