]> source.dussan.org Git - sonarqube.git/blob
9b9f4ddfb4968a62bf17cdcfa02c394b75926ab2
[sonarqube.git] /
1 // Jest Snapshot v1, https://goo.gl/fbAQLP
2
3 exports[`should display action state correctly 1`] = `
4 <div>
5   <header
6     className="page-header"
7   >
8     <h1
9       className="page-title"
10     >
11       settings.pr_decoration.binding.title
12     </h1>
13   </header>
14   <div
15     className="markdown small spacer-top big-spacer-bottom"
16   >
17     settings.pr_decoration.binding.description
18   </div>
19   <form
20     onSubmit={[Function]}
21   >
22     <div
23       className="form-field"
24     >
25       <label
26         htmlFor="name"
27       >
28         settings.pr_decoration.binding.form.name
29         <em
30           className="mandatory spacer-right"
31         >
32           *
33         </em>
34       </label>
35       <Select
36         autosize={true}
37         className="abs-width-400"
38         clearable={false}
39         id="name"
40         menuContainerStyle={
41           Object {
42             "maxWidth": "210%",
43             "width": "auto",
44           }
45         }
46         onChange={[Function]}
47         optionRenderer={[Function]}
48         options={
49           Array [
50             Object {
51               "alm": "github",
52               "key": "key",
53               "url": "http://url.com",
54             },
55           ]
56         }
57         searchable={false}
58         value=""
59         valueKey="key"
60         valueRenderer={[Function]}
61       />
62     </div>
63     <div
64       className="display-flex-center"
65     >
66       <DeferredSpinner
67         className="spacer-right"
68         loading={true}
69         timeout={100}
70       />
71     </div>
72   </form>
73 </div>
74 `;
75
76 exports[`should display action state correctly 2`] = `
77 <div>
78   <header
79     className="page-header"
80   >
81     <h1
82       className="page-title"
83     >
84       settings.pr_decoration.binding.title
85     </h1>
86   </header>
87   <div
88     className="markdown small spacer-top big-spacer-bottom"
89   >
90     settings.pr_decoration.binding.description
91   </div>
92   <form
93     onSubmit={[Function]}
94   >
95     <div
96       className="form-field"
97     >
98       <label
99         htmlFor="name"
100       >
101         settings.pr_decoration.binding.form.name
102         <em
103           className="mandatory spacer-right"
104         >
105           *
106         </em>
107       </label>
108       <Select
109         autosize={true}
110         className="abs-width-400"
111         clearable={false}
112         id="name"
113         menuContainerStyle={
114           Object {
115             "maxWidth": "210%",
116             "width": "auto",
117           }
118         }
119         onChange={[Function]}
120         optionRenderer={[Function]}
121         options={
122           Array [
123             Object {
124               "alm": "github",
125               "key": "key",
126               "url": "http://url.com",
127             },
128           ]
129         }
130         searchable={false}
131         value=""
132         valueKey="key"
133         valueRenderer={[Function]}
134       />
135     </div>
136     <div
137       className="display-flex-center"
138     >
139       <DeferredSpinner
140         className="spacer-right"
141         loading={false}
142         timeout={100}
143       />
144       <span
145         className="text-success"
146       >
147         <AlertSuccessIcon
148           className="spacer-right"
149         />
150         settings.state.saved
151       </span>
152     </div>
153   </form>
154 </div>
155 `;
156
157 exports[`should display action state correctly 3`] = `
158 <div>
159   <header
160     className="page-header"
161   >
162     <h1
163       className="page-title"
164     >
165       settings.pr_decoration.binding.title
166     </h1>
167   </header>
168   <div
169     className="markdown small spacer-top big-spacer-bottom"
170   >
171     settings.pr_decoration.binding.description
172   </div>
173   <form
174     onSubmit={[Function]}
175   >
176     <div
177       className="form-field"
178     >
179       <label
180         htmlFor="name"
181       >
182         settings.pr_decoration.binding.form.name
183         <em
184           className="mandatory spacer-right"
185         >
186           *
187         </em>
188       </label>
189       <Select
190         autosize={true}
191         className="abs-width-400"
192         clearable={false}
193         id="name"
194         menuContainerStyle={
195           Object {
196             "maxWidth": "210%",
197             "width": "auto",
198           }
199         }
200         onChange={[Function]}
201         optionRenderer={[Function]}
202         options={
203           Array [
204             Object {
205               "alm": "github",
206               "key": "key",
207               "url": "http://url.com",
208             },
209           ]
210         }
211         searchable={false}
212         value=""
213         valueKey="key"
214         valueRenderer={[Function]}
215       />
216     </div>
217     <div
218       className="display-flex-center"
219     >
220       <DeferredSpinner
221         className="spacer-right"
222         loading={false}
223         timeout={100}
224       />
225     </div>
226   </form>
227 </div>
228 `;
229
230 exports[`should render correctly 1`] = `
231 <DeferredSpinner
232   timeout={100}
233 />
234 `;
235
236 exports[`should render correctly 2`] = `
237 <div>
238   <Alert
239     className="spacer-top huge-spacer-bottom"
240     variant="info"
241   >
242     <FormattedMessage
243       defaultMessage="settings.pr_decoration.binding.no_bindings"
244       id="settings.pr_decoration.binding.no_bindings"
245       values={
246         Object {
247           "link": <Link
248             onlyActiveOnIndex={false}
249             style={Object {}}
250             to="/documentation/analysis/pull-request/#pr-decoration"
251           >
252             learn_more
253           </Link>,
254         }
255       }
256     />
257   </Alert>
258 </div>
259 `;
260
261 exports[`should render multiple instances correctly 1`] = `
262 <div>
263   <header
264     className="page-header"
265   >
266     <h1
267       className="page-title"
268     >
269       settings.pr_decoration.binding.title
270     </h1>
271   </header>
272   <div
273     className="markdown small spacer-top big-spacer-bottom"
274   >
275     settings.pr_decoration.binding.description
276   </div>
277   <form
278     onSubmit={[Function]}
279   >
280     <div
281       className="form-field"
282     >
283       <label
284         htmlFor="name"
285       >
286         settings.pr_decoration.binding.form.name
287         <em
288           className="mandatory spacer-right"
289         >
290           *
291         </em>
292       </label>
293       <Select
294         autosize={true}
295         className="abs-width-400"
296         clearable={false}
297         id="name"
298         menuContainerStyle={
299           Object {
300             "maxWidth": "210%",
301             "width": "auto",
302           }
303         }
304         onChange={[Function]}
305         optionRenderer={[Function]}
306         options={
307           Array [
308             Object {
309               "alm": "github",
310               "key": "i1",
311               "url": "http://github.enterprise.com",
312             },
313             Object {
314               "alm": "github",
315               "key": "i2",
316               "url": "http://github.enterprise.com",
317             },
318             Object {
319               "alm": "bitbucket",
320               "key": "i3",
321               "url": "http://bbs.enterprise.com",
322             },
323             Object {
324               "alm": "azure",
325               "key": "i4",
326             },
327           ]
328         }
329         searchable={false}
330         value=""
331         valueKey="key"
332         valueRenderer={[Function]}
333       />
334     </div>
335     <div
336       className="display-flex-center"
337     >
338       <DeferredSpinner
339         className="spacer-right"
340         loading={false}
341         timeout={100}
342       />
343     </div>
344   </form>
345 </div>
346 `;
347
348 exports[`should render multiple instances correctly 2`] = `
349 <div>
350   <header
351     className="page-header"
352   >
353     <h1
354       className="page-title"
355     >
356       settings.pr_decoration.binding.title
357     </h1>
358   </header>
359   <div
360     className="markdown small spacer-top big-spacer-bottom"
361   >
362     settings.pr_decoration.binding.description
363   </div>
364   <form
365     onSubmit={[Function]}
366   >
367     <div
368       className="form-field"
369     >
370       <label
371         htmlFor="name"
372       >
373         settings.pr_decoration.binding.form.name
374         <em
375           className="mandatory spacer-right"
376         >
377           *
378         </em>
379       </label>
380       <Select
381         autosize={true}
382         className="abs-width-400"
383         clearable={false}
384         id="name"
385         menuContainerStyle={
386           Object {
387             "maxWidth": "210%",
388             "width": "auto",
389           }
390         }
391         onChange={[Function]}
392         optionRenderer={[Function]}
393         options={
394           Array [
395             Object {
396               "alm": "github",
397               "key": "i1",
398               "url": "http://github.enterprise.com",
399             },
400             Object {
401               "alm": "github",
402               "key": "i2",
403               "url": "http://github.enterprise.com",
404             },
405             Object {
406               "alm": "bitbucket",
407               "key": "i3",
408               "url": "http://bbs.enterprise.com",
409             },
410             Object {
411               "alm": "azure",
412               "key": "i4",
413             },
414           ]
415         }
416         searchable={false}
417         value="i1"
418         valueKey="key"
419         valueRenderer={[Function]}
420       />
421     </div>
422     <div
423       className="form-field"
424     >
425       <label
426         className="display-flex-center"
427         htmlFor="github.repository"
428       >
429         settings.pr_decoration.binding.form.github.repository
430         <em
431           className="mandatory"
432         >
433           *
434         </em>
435         <HelpTooltip
436           className="spacer-left"
437           overlay={
438             <FormattedMessage
439               defaultMessage="settings.pr_decoration.binding.form.github.repository.help"
440               id="settings.pr_decoration.binding.form.github.repository.help"
441               values={
442                 Object {
443                   "example": "SonarSource/sonarqube",
444                 }
445               }
446             />
447           }
448           placement="right"
449         />
450       </label>
451       <input
452         className="input-super-large"
453         id="github.repository"
454         maxLength={256}
455         name="github.repository"
456         onChange={[Function]}
457         type="text"
458         value="account/repo"
459       />
460     </div>
461     <div
462       className="form-field"
463     >
464       <label
465         className="display-flex-center"
466         htmlFor="github.summary_comment_setting"
467       >
468         settings.pr_decoration.binding.form.github.summary_comment_setting
469         <HelpTooltip
470           className="spacer-left"
471           overlay={
472             <FormattedMessage
473               defaultMessage="settings.pr_decoration.binding.form.github.summary_comment_setting.help"
474               id="settings.pr_decoration.binding.form.github.summary_comment_setting.help"
475               values={Object {}}
476             />
477           }
478           placement="right"
479         />
480       </label>
481       <InputForBoolean
482         isDefault={true}
483         name="github.summary_comment_setting"
484         onChange={[Function]}
485         value={true}
486       />
487     </div>
488     <div
489       className="display-flex-center"
490     >
491       <DeferredSpinner
492         className="spacer-right"
493         loading={false}
494         timeout={100}
495       />
496       <Button
497         className="spacer-right"
498         onClick={[MockFunction]}
499       >
500         <span
501           data-test="project-settings__alm-reset"
502         >
503           reset_verb
504         </span>
505       </Button>
506     </div>
507   </form>
508 </div>
509 `;
510
511 exports[`should render optional fields correctly 1`] = `
512 <div>
513   <header
514     className="page-header"
515   >
516     <h1
517       className="page-title"
518     >
519       settings.pr_decoration.binding.title
520     </h1>
521   </header>
522   <div
523     className="markdown small spacer-top big-spacer-bottom"
524   >
525     settings.pr_decoration.binding.description
526   </div>
527   <form
528     onSubmit={[Function]}
529   >
530     <div
531       className="form-field"
532     >
533       <label
534         htmlFor="name"
535       >
536         settings.pr_decoration.binding.form.name
537         <em
538           className="mandatory spacer-right"
539         >
540           *
541         </em>
542       </label>
543       <Select
544         autosize={true}
545         className="abs-width-400"
546         clearable={false}
547         id="name"
548         menuContainerStyle={
549           Object {
550             "maxWidth": "210%",
551             "width": "auto",
552           }
553         }
554         onChange={[Function]}
555         optionRenderer={[Function]}
556         options={
557           Array [
558             Object {
559               "alm": "gitlab",
560               "key": "key",
561               "url": "http://example.com",
562             },
563           ]
564         }
565         searchable={false}
566         value="key"
567         valueKey="key"
568         valueRenderer={[Function]}
569       />
570     </div>
571     <div
572       className="form-field"
573     >
574       <label
575         className="display-flex-center"
576         htmlFor="gitlab.repository"
577       >
578         settings.pr_decoration.binding.form.gitlab.repository
579         <HelpTooltip
580           className="spacer-left"
581           overlay={
582             <FormattedMessage
583               defaultMessage="settings.pr_decoration.binding.form.gitlab.repository.help"
584               id="settings.pr_decoration.binding.form.gitlab.repository.help"
585               values={Object {}}
586             />
587           }
588           placement="right"
589         />
590       </label>
591       <input
592         className="input-super-large"
593         id="gitlab.repository"
594         maxLength={256}
595         name="gitlab.repository"
596         onChange={[Function]}
597         type="text"
598         value=""
599       />
600     </div>
601     <div
602       className="display-flex-center"
603     >
604       <DeferredSpinner
605         className="spacer-right"
606         loading={false}
607         timeout={100}
608       />
609       <SubmitButton
610         className="spacer-right button-success"
611         disabled={true}
612       >
613         <span
614           data-test="project-settings__alm-save"
615         >
616           save
617         </span>
618       </SubmitButton>
619     </div>
620   </form>
621 </div>
622 `;
623
624 exports[`should render select options correctly 1`] = `
625 <span>
626   azure
627 </span>
628 `;
629
630 exports[`should render select options correctly 2`] = `
631 <React.Fragment>
632   <span>
633     github
634      — 
635   </span>
636   <span
637     className="text-muted"
638   >
639     gh.url.com
640   </span>
641 </React.Fragment>
642 `;
643
644 exports[`should render single instance correctly 1`] = `
645 <div>
646   <header
647     className="page-header"
648   >
649     <h1
650       className="page-title"
651     >
652       settings.pr_decoration.binding.title
653     </h1>
654   </header>
655   <div
656     className="markdown small spacer-top big-spacer-bottom"
657   >
658     settings.pr_decoration.binding.description
659   </div>
660   <form
661     onSubmit={[Function]}
662   >
663     <div
664       className="form-field"
665     >
666       <label
667         htmlFor="name"
668       >
669         settings.pr_decoration.binding.form.name
670         <em
671           className="mandatory spacer-right"
672         >
673           *
674         </em>
675       </label>
676       <Select
677         autosize={true}
678         className="abs-width-400"
679         clearable={false}
680         id="name"
681         menuContainerStyle={
682           Object {
683             "maxWidth": "210%",
684             "width": "auto",
685           }
686         }
687         onChange={[Function]}
688         optionRenderer={[Function]}
689         options={
690           Array [
691             Object {
692               "alm": "github",
693               "key": "single",
694               "url": "http://single.url",
695             },
696           ]
697         }
698         searchable={false}
699         value=""
700         valueKey="key"
701         valueRenderer={[Function]}
702       />
703     </div>
704     <div
705       className="display-flex-center"
706     >
707       <DeferredSpinner
708         className="spacer-right"
709         loading={false}
710         timeout={100}
711       />
712     </div>
713   </form>
714 </div>
715 `;