]> source.dussan.org Git - sonarqube.git/blob
76e6f318f7d5828ff18b3d60cb91fad2eafaeaed
[sonarqube.git] /
1 // Jest Snapshot v1, https://goo.gl/fbAQLP
2
3 exports[`should render correctly 1`] = `
4 <Modal
5   contentLabel="settings.almintegration.form.header.create"
6   onRequestClose={[MockFunction]}
7   shouldCloseOnOverlayClick={false}
8   size="medium"
9 >
10   <form
11     className="views-form"
12     onSubmit={[Function]}
13   >
14     <div
15       className="modal-head"
16     >
17       <h2>
18         settings.almintegration.form.header.create
19       </h2>
20     </div>
21     <div
22       className="modal-body modal-container"
23     >
24       <GithubForm
25         formData={
26           {
27             "appId": "123456",
28             "clientId": "client1",
29             "clientSecret": "**clientsecret**",
30             "key": "key",
31             "privateKey": "asdf1234",
32             "url": "http://github.enterprise.com",
33             "webhookSecret": "verySecretText!!",
34           }
35         }
36         onFieldChange={[MockFunction]}
37       />
38     </div>
39     <div
40       className="modal-foot"
41     >
42       <SubmitButton
43         disabled={true}
44       >
45         settings.almintegration.form.save
46         <DeferredSpinner
47           className="spacer-left"
48           loading={false}
49         />
50       </SubmitButton>
51       <ResetButtonLink
52         onClick={[MockFunction]}
53       >
54         cancel
55       </ResetButtonLink>
56     </div>
57   </form>
58 </Modal>
59 `;
60
61 exports[`should render correctly for azure 1`] = `
62 <Modal
63   contentLabel="settings.almintegration.form.header.create"
64   onRequestClose={[MockFunction]}
65   shouldCloseOnOverlayClick={false}
66   size="medium"
67 >
68   <form
69     className="views-form"
70     onSubmit={[Function]}
71   >
72     <div
73       className="modal-head"
74     >
75       <h2>
76         settings.almintegration.form.header.create
77       </h2>
78     </div>
79     <div
80       className="modal-body modal-container"
81     >
82       <AzureForm
83         formData={
84           {
85             "appId": "123456",
86             "clientId": "client1",
87             "clientSecret": "**clientsecret**",
88             "key": "key",
89             "privateKey": "asdf1234",
90             "url": "http://github.enterprise.com",
91             "webhookSecret": "verySecretText!!",
92           }
93         }
94         onFieldChange={[MockFunction]}
95       />
96     </div>
97     <div
98       className="modal-foot"
99     >
100       <SubmitButton
101         disabled={true}
102       >
103         settings.almintegration.form.save
104         <DeferredSpinner
105           className="spacer-left"
106           loading={false}
107         />
108       </SubmitButton>
109       <ResetButtonLink
110         onClick={[MockFunction]}
111       >
112         cancel
113       </ResetButtonLink>
114     </div>
115   </form>
116 </Modal>
117 `;
118
119 exports[`should render correctly for bitbucket 1`] = `
120 <Modal
121   contentLabel="settings.almintegration.form.header.create"
122   onRequestClose={[MockFunction]}
123   shouldCloseOnOverlayClick={false}
124   size="medium"
125 >
126   <form
127     className="views-form"
128     onSubmit={[Function]}
129   >
130     <div
131       className="modal-head"
132     >
133       <h2>
134         settings.almintegration.form.header.create
135       </h2>
136     </div>
137     <div
138       className="modal-body modal-container"
139     >
140       <BitbucketForm
141         formData={
142           {
143             "appId": "123456",
144             "clientId": "client1",
145             "clientSecret": "**clientsecret**",
146             "key": "key",
147             "privateKey": "asdf1234",
148             "url": "http://github.enterprise.com",
149             "webhookSecret": "verySecretText!!",
150           }
151         }
152         isUpdate={false}
153         onFieldChange={[MockFunction]}
154         onVariantChange={[MockFunction]}
155         variant="bitbucket"
156       />
157     </div>
158     <div
159       className="modal-foot"
160     >
161       <SubmitButton
162         disabled={true}
163       >
164         settings.almintegration.form.save
165         <DeferredSpinner
166           className="spacer-left"
167           loading={false}
168         />
169       </SubmitButton>
170       <ResetButtonLink
171         onClick={[MockFunction]}
172       >
173         cancel
174       </ResetButtonLink>
175     </div>
176   </form>
177 </Modal>
178 `;
179
180 exports[`should render correctly for github 1`] = `
181 <Modal
182   contentLabel="settings.almintegration.form.header.create"
183   onRequestClose={[MockFunction]}
184   shouldCloseOnOverlayClick={false}
185   size="medium"
186 >
187   <form
188     className="views-form"
189     onSubmit={[Function]}
190   >
191     <div
192       className="modal-head"
193     >
194       <h2>
195         settings.almintegration.form.header.create
196       </h2>
197     </div>
198     <div
199       className="modal-body modal-container"
200     >
201       <GithubForm
202         formData={
203           {
204             "appId": "123456",
205             "clientId": "client1",
206             "clientSecret": "**clientsecret**",
207             "key": "key",
208             "privateKey": "asdf1234",
209             "url": "http://github.enterprise.com",
210             "webhookSecret": "verySecretText!!",
211           }
212         }
213         onFieldChange={[MockFunction]}
214       />
215     </div>
216     <div
217       className="modal-foot"
218     >
219       <SubmitButton
220         disabled={true}
221       >
222         settings.almintegration.form.save
223         <DeferredSpinner
224           className="spacer-left"
225           loading={false}
226         />
227       </SubmitButton>
228       <ResetButtonLink
229         onClick={[MockFunction]}
230       >
231         cancel
232       </ResetButtonLink>
233     </div>
234   </form>
235 </Modal>
236 `;
237
238 exports[`should render correctly for gitlab 1`] = `
239 <Modal
240   contentLabel="settings.almintegration.form.header.create"
241   onRequestClose={[MockFunction]}
242   shouldCloseOnOverlayClick={false}
243   size="medium"
244 >
245   <form
246     className="views-form"
247     onSubmit={[Function]}
248   >
249     <div
250       className="modal-head"
251     >
252       <h2>
253         settings.almintegration.form.header.create
254       </h2>
255     </div>
256     <div
257       className="modal-body modal-container"
258     >
259       <GitlabForm
260         formData={
261           {
262             "appId": "123456",
263             "clientId": "client1",
264             "clientSecret": "**clientsecret**",
265             "key": "key",
266             "privateKey": "asdf1234",
267             "url": "http://github.enterprise.com",
268             "webhookSecret": "verySecretText!!",
269           }
270         }
271         onFieldChange={[MockFunction]}
272       />
273     </div>
274     <div
275       className="modal-foot"
276     >
277       <SubmitButton
278         disabled={true}
279       >
280         settings.almintegration.form.save
281         <DeferredSpinner
282           className="spacer-left"
283           loading={false}
284         />
285       </SubmitButton>
286       <ResetButtonLink
287         onClick={[MockFunction]}
288       >
289         cancel
290       </ResetButtonLink>
291     </div>
292   </form>
293 </Modal>
294 `;
295
296 exports[`should render correctly: editing 1`] = `
297 <Modal
298   contentLabel="settings.almintegration.form.header.edit"
299   onRequestClose={[MockFunction]}
300   shouldCloseOnOverlayClick={false}
301   size="medium"
302 >
303   <form
304     className="views-form"
305     onSubmit={[Function]}
306   >
307     <div
308       className="modal-head"
309     >
310       <h2>
311         settings.almintegration.form.header.edit
312       </h2>
313     </div>
314     <div
315       className="modal-body modal-container"
316     >
317       <GithubForm
318         formData={
319           {
320             "appId": "123456",
321             "clientId": "client1",
322             "clientSecret": "**clientsecret**",
323             "key": "key",
324             "privateKey": "asdf1234",
325             "url": "http://github.enterprise.com",
326             "webhookSecret": "verySecretText!!",
327           }
328         }
329         onFieldChange={[MockFunction]}
330       />
331     </div>
332     <div
333       className="modal-foot"
334     >
335       <SubmitButton
336         disabled={true}
337       >
338         settings.almintegration.form.save
339         <DeferredSpinner
340           className="spacer-left"
341           loading={false}
342         />
343       </SubmitButton>
344       <ResetButtonLink
345         onClick={[MockFunction]}
346       >
347         cancel
348       </ResetButtonLink>
349     </div>
350   </form>
351 </Modal>
352 `;
353
354 exports[`should render correctly: second instance 1`] = `
355 <Modal
356   contentLabel="settings.almintegration.form.header.create"
357   onRequestClose={[MockFunction]}
358   shouldCloseOnOverlayClick={false}
359   size="medium"
360 >
361   <form
362     className="views-form"
363     onSubmit={[Function]}
364   >
365     <div
366       className="modal-head"
367     >
368       <h2>
369         settings.almintegration.form.header.create
370       </h2>
371     </div>
372     <div
373       className="modal-body modal-container"
374     >
375       <Alert
376         className="big-spacer-bottom"
377         variant="warning"
378       >
379         settings.almintegration.form.second_instance_warning
380       </Alert>
381       <GithubForm
382         formData={
383           {
384             "appId": "123456",
385             "clientId": "client1",
386             "clientSecret": "**clientsecret**",
387             "key": "key",
388             "privateKey": "asdf1234",
389             "url": "http://github.enterprise.com",
390             "webhookSecret": "verySecretText!!",
391           }
392         }
393         onFieldChange={[MockFunction]}
394       />
395     </div>
396     <div
397       className="modal-foot"
398     >
399       <SubmitButton
400         disabled={true}
401       >
402         settings.almintegration.form.save
403         <DeferredSpinner
404           className="spacer-left"
405           loading={false}
406         />
407       </SubmitButton>
408       <ResetButtonLink
409         onClick={[MockFunction]}
410       >
411         cancel
412       </ResetButtonLink>
413     </div>
414   </form>
415 </Modal>
416 `;
417
418 exports[`should render correctly: submitting 1`] = `
419 <Modal
420   contentLabel="settings.almintegration.form.header.create"
421   onRequestClose={[MockFunction]}
422   shouldCloseOnOverlayClick={false}
423   size="medium"
424 >
425   <form
426     className="views-form"
427     onSubmit={[Function]}
428   >
429     <div
430       className="modal-head"
431     >
432       <h2>
433         settings.almintegration.form.header.create
434       </h2>
435     </div>
436     <div
437       className="modal-body modal-container"
438     >
439       <GithubForm
440         formData={
441           {
442             "appId": "123456",
443             "clientId": "client1",
444             "clientSecret": "**clientsecret**",
445             "key": "key",
446             "privateKey": "asdf1234",
447             "url": "http://github.enterprise.com",
448             "webhookSecret": "verySecretText!!",
449           }
450         }
451         onFieldChange={[MockFunction]}
452       />
453     </div>
454     <div
455       className="modal-foot"
456     >
457       <SubmitButton
458         disabled={true}
459       >
460         settings.almintegration.form.save
461         <DeferredSpinner
462           className="spacer-left"
463           loading={true}
464         />
465       </SubmitButton>
466       <ResetButtonLink
467         onClick={[MockFunction]}
468       >
469         cancel
470       </ResetButtonLink>
471     </div>
472   </form>
473 </Modal>
474 `;
475
476 exports[`should render correctly: with validation error 1`] = `
477 <Modal
478   contentLabel="settings.almintegration.form.header.create"
479   onRequestClose={[MockFunction]}
480   shouldCloseOnOverlayClick={false}
481   size="medium"
482 >
483   <form
484     className="views-form"
485     onSubmit={[Function]}
486   >
487     <div
488       className="modal-head"
489     >
490       <h2>
491         settings.almintegration.form.header.create
492       </h2>
493     </div>
494     <div
495       className="modal-body modal-container"
496     >
497       <GithubForm
498         formData={
499           {
500             "appId": "123456",
501             "clientId": "client1",
502             "clientSecret": "**clientsecret**",
503             "key": "key",
504             "privateKey": "asdf1234",
505             "url": "http://github.enterprise.com",
506             "webhookSecret": "verySecretText!!",
507           }
508         }
509         onFieldChange={[MockFunction]}
510       />
511       <Alert
512         variant="error"
513       >
514         <p
515           className="spacer-bottom"
516         >
517           settings.almintegration.configuration_invalid
518         </p>
519         <ul
520           className="list-styled"
521         >
522           <li>
523             this is a validation error
524           </li>
525         </ul>
526       </Alert>
527     </div>
528     <div
529       className="modal-foot"
530     >
531       <SubmitButton
532         disabled={true}
533       >
534         settings.almintegration.form.save
535         <DeferredSpinner
536           className="spacer-left"
537           loading={false}
538         />
539       </SubmitButton>
540       <ResetButtonLink
541         onClick={[MockFunction]}
542       >
543         cancel
544       </ResetButtonLink>
545     </div>
546   </form>
547 </Modal>
548 `;