]> source.dussan.org Git - sonarqube.git/blob
8ab91f7af9a9802b963dcd48037b890c035b5dfa
[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       />
70     </div>
71   </form>
72 </div>
73 `;
74
75 exports[`should display action state correctly 2`] = `
76 <div>
77   <header
78     className="page-header"
79   >
80     <h1
81       className="page-title"
82     >
83       settings.pr_decoration.binding.title
84     </h1>
85   </header>
86   <div
87     className="markdown small spacer-top big-spacer-bottom"
88   >
89     settings.pr_decoration.binding.description
90   </div>
91   <form
92     onSubmit={[Function]}
93   >
94     <div
95       className="form-field"
96     >
97       <label
98         htmlFor="name"
99       >
100         settings.pr_decoration.binding.form.name
101         <em
102           className="mandatory spacer-right"
103         >
104           *
105         </em>
106       </label>
107       <Select
108         autosize={true}
109         className="abs-width-400"
110         clearable={false}
111         id="name"
112         menuContainerStyle={
113           Object {
114             "maxWidth": "210%",
115             "width": "auto",
116           }
117         }
118         onChange={[Function]}
119         optionRenderer={[Function]}
120         options={
121           Array [
122             Object {
123               "alm": "github",
124               "key": "key",
125               "url": "http://url.com",
126             },
127           ]
128         }
129         searchable={false}
130         value=""
131         valueKey="key"
132         valueRenderer={[Function]}
133       />
134     </div>
135     <div
136       className="display-flex-center"
137     >
138       <DeferredSpinner
139         className="spacer-right"
140         loading={false}
141       />
142       <span
143         className="text-success"
144       >
145         <AlertSuccessIcon
146           className="spacer-right"
147         />
148         settings.state.saved
149       </span>
150     </div>
151   </form>
152 </div>
153 `;
154
155 exports[`should display action state correctly 3`] = `
156 <div>
157   <header
158     className="page-header"
159   >
160     <h1
161       className="page-title"
162     >
163       settings.pr_decoration.binding.title
164     </h1>
165   </header>
166   <div
167     className="markdown small spacer-top big-spacer-bottom"
168   >
169     settings.pr_decoration.binding.description
170   </div>
171   <form
172     onSubmit={[Function]}
173   >
174     <div
175       className="form-field"
176     >
177       <label
178         htmlFor="name"
179       >
180         settings.pr_decoration.binding.form.name
181         <em
182           className="mandatory spacer-right"
183         >
184           *
185         </em>
186       </label>
187       <Select
188         autosize={true}
189         className="abs-width-400"
190         clearable={false}
191         id="name"
192         menuContainerStyle={
193           Object {
194             "maxWidth": "210%",
195             "width": "auto",
196           }
197         }
198         onChange={[Function]}
199         optionRenderer={[Function]}
200         options={
201           Array [
202             Object {
203               "alm": "github",
204               "key": "key",
205               "url": "http://url.com",
206             },
207           ]
208         }
209         searchable={false}
210         value=""
211         valueKey="key"
212         valueRenderer={[Function]}
213       />
214     </div>
215     <div
216       className="display-flex-center"
217     >
218       <DeferredSpinner
219         className="spacer-right"
220         loading={false}
221       />
222     </div>
223   </form>
224 </div>
225 `;
226
227 exports[`should render correctly 1`] = `<DeferredSpinner />`;
228
229 exports[`should render correctly 2`] = `
230 <div>
231   <Alert
232     className="spacer-top huge-spacer-bottom"
233     variant="info"
234   >
235     <FormattedMessage
236       defaultMessage="settings.pr_decoration.binding.no_bindings"
237       id="settings.pr_decoration.binding.no_bindings"
238       values={
239         Object {
240           "link": <Link
241             onlyActiveOnIndex={false}
242             style={Object {}}
243             to="/documentation/analysis/pull-request/#pr-decoration"
244           >
245             learn_more
246           </Link>,
247         }
248       }
249     />
250   </Alert>
251 </div>
252 `;
253
254 exports[`should render multiple instances correctly 1`] = `
255 <div>
256   <header
257     className="page-header"
258   >
259     <h1
260       className="page-title"
261     >
262       settings.pr_decoration.binding.title
263     </h1>
264   </header>
265   <div
266     className="markdown small spacer-top big-spacer-bottom"
267   >
268     settings.pr_decoration.binding.description
269   </div>
270   <form
271     onSubmit={[Function]}
272   >
273     <div
274       className="form-field"
275     >
276       <label
277         htmlFor="name"
278       >
279         settings.pr_decoration.binding.form.name
280         <em
281           className="mandatory spacer-right"
282         >
283           *
284         </em>
285       </label>
286       <Select
287         autosize={true}
288         className="abs-width-400"
289         clearable={false}
290         id="name"
291         menuContainerStyle={
292           Object {
293             "maxWidth": "210%",
294             "width": "auto",
295           }
296         }
297         onChange={[Function]}
298         optionRenderer={[Function]}
299         options={
300           Array [
301             Object {
302               "alm": "github",
303               "key": "i1",
304               "url": "http://github.enterprise.com",
305             },
306             Object {
307               "alm": "github",
308               "key": "i2",
309               "url": "http://github.enterprise.com",
310             },
311             Object {
312               "alm": "bitbucket",
313               "key": "i3",
314               "url": "http://bbs.enterprise.com",
315             },
316             Object {
317               "alm": "azure",
318               "key": "i4",
319             },
320           ]
321         }
322         searchable={false}
323         value=""
324         valueKey="key"
325         valueRenderer={[Function]}
326       />
327     </div>
328     <div
329       className="display-flex-center"
330     >
331       <DeferredSpinner
332         className="spacer-right"
333         loading={false}
334       />
335     </div>
336   </form>
337 </div>
338 `;
339
340 exports[`should render multiple instances correctly 2`] = `
341 <div>
342   <header
343     className="page-header"
344   >
345     <h1
346       className="page-title"
347     >
348       settings.pr_decoration.binding.title
349     </h1>
350   </header>
351   <div
352     className="markdown small spacer-top big-spacer-bottom"
353   >
354     settings.pr_decoration.binding.description
355   </div>
356   <form
357     onSubmit={[Function]}
358   >
359     <div
360       className="form-field"
361     >
362       <label
363         htmlFor="name"
364       >
365         settings.pr_decoration.binding.form.name
366         <em
367           className="mandatory spacer-right"
368         >
369           *
370         </em>
371       </label>
372       <Select
373         autosize={true}
374         className="abs-width-400"
375         clearable={false}
376         id="name"
377         menuContainerStyle={
378           Object {
379             "maxWidth": "210%",
380             "width": "auto",
381           }
382         }
383         onChange={[Function]}
384         optionRenderer={[Function]}
385         options={
386           Array [
387             Object {
388               "alm": "github",
389               "key": "i1",
390               "url": "http://github.enterprise.com",
391             },
392             Object {
393               "alm": "github",
394               "key": "i2",
395               "url": "http://github.enterprise.com",
396             },
397             Object {
398               "alm": "bitbucket",
399               "key": "i3",
400               "url": "http://bbs.enterprise.com",
401             },
402             Object {
403               "alm": "azure",
404               "key": "i4",
405             },
406           ]
407         }
408         searchable={false}
409         value="i1"
410         valueKey="key"
411         valueRenderer={[Function]}
412       />
413     </div>
414     <AlmSpecificForm
415       alm="github"
416       formData={
417         Object {
418           "key": "i1",
419           "repository": "account/repo",
420         }
421       }
422       monorepoEnabled={false}
423       onFieldChange={[MockFunction]}
424     />
425     <div
426       className="display-flex-center"
427     >
428       <DeferredSpinner
429         className="spacer-right"
430         loading={false}
431       />
432       <Button
433         className="spacer-right"
434         onClick={[MockFunction]}
435       >
436         <span
437           data-test="project-settings__alm-reset"
438         >
439           reset_verb
440         </span>
441       </Button>
442     </div>
443   </form>
444 </div>
445 `;
446
447 exports[`should render select options correctly 1`] = `
448 <span>
449   azure
450 </span>
451 `;
452
453 exports[`should render select options correctly 2`] = `
454 <React.Fragment>
455   <span>
456     github
457      — 
458   </span>
459   <span
460     className="text-muted"
461   >
462     gh.url.com
463   </span>
464 </React.Fragment>
465 `;
466
467 exports[`should render single instance correctly 1`] = `
468 <div>
469   <header
470     className="page-header"
471   >
472     <h1
473       className="page-title"
474     >
475       settings.pr_decoration.binding.title
476     </h1>
477   </header>
478   <div
479     className="markdown small spacer-top big-spacer-bottom"
480   >
481     settings.pr_decoration.binding.description
482   </div>
483   <form
484     onSubmit={[Function]}
485   >
486     <div
487       className="form-field"
488     >
489       <label
490         htmlFor="name"
491       >
492         settings.pr_decoration.binding.form.name
493         <em
494           className="mandatory spacer-right"
495         >
496           *
497         </em>
498       </label>
499       <Select
500         autosize={true}
501         className="abs-width-400"
502         clearable={false}
503         id="name"
504         menuContainerStyle={
505           Object {
506             "maxWidth": "210%",
507             "width": "auto",
508           }
509         }
510         onChange={[Function]}
511         optionRenderer={[Function]}
512         options={
513           Array [
514             Object {
515               "alm": "github",
516               "key": "single",
517               "url": "http://single.url",
518             },
519           ]
520         }
521         searchable={false}
522         value=""
523         valueKey="key"
524         valueRenderer={[Function]}
525       />
526     </div>
527     <div
528       className="display-flex-center"
529     >
530       <DeferredSpinner
531         className="spacer-right"
532         loading={false}
533       />
534     </div>
535   </form>
536 </div>
537 `;