]> source.dussan.org Git - sonarqube.git/blob
16e3977d2254677d69b5406ca38f28f358b9760f
[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: submitting 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       <GithubForm
376         formData={
377           {
378             "appId": "123456",
379             "clientId": "client1",
380             "clientSecret": "**clientsecret**",
381             "key": "key",
382             "privateKey": "asdf1234",
383             "url": "http://github.enterprise.com",
384             "webhookSecret": "verySecretText!!",
385           }
386         }
387         onFieldChange={[MockFunction]}
388       />
389     </div>
390     <div
391       className="modal-foot"
392     >
393       <SubmitButton
394         disabled={true}
395       >
396         settings.almintegration.form.save
397         <DeferredSpinner
398           className="spacer-left"
399           loading={true}
400         />
401       </SubmitButton>
402       <ResetButtonLink
403         onClick={[MockFunction]}
404       >
405         cancel
406       </ResetButtonLink>
407     </div>
408   </form>
409 </Modal>
410 `;
411
412 exports[`should render correctly: with validation error 1`] = `
413 <Modal
414   contentLabel="settings.almintegration.form.header.create"
415   onRequestClose={[MockFunction]}
416   shouldCloseOnOverlayClick={false}
417   size="medium"
418 >
419   <form
420     className="views-form"
421     onSubmit={[Function]}
422   >
423     <div
424       className="modal-head"
425     >
426       <h2>
427         settings.almintegration.form.header.create
428       </h2>
429     </div>
430     <div
431       className="modal-body modal-container"
432     >
433       <GithubForm
434         formData={
435           {
436             "appId": "123456",
437             "clientId": "client1",
438             "clientSecret": "**clientsecret**",
439             "key": "key",
440             "privateKey": "asdf1234",
441             "url": "http://github.enterprise.com",
442             "webhookSecret": "verySecretText!!",
443           }
444         }
445         onFieldChange={[MockFunction]}
446       />
447       <Alert
448         variant="error"
449       >
450         <p
451           className="spacer-bottom"
452         >
453           settings.almintegration.configuration_invalid
454         </p>
455         <ul
456           className="list-styled"
457         >
458           <li>
459             this is a validation error
460           </li>
461         </ul>
462       </Alert>
463     </div>
464     <div
465       className="modal-foot"
466     >
467       <SubmitButton
468         disabled={true}
469       >
470         settings.almintegration.form.save
471         <DeferredSpinner
472           className="spacer-left"
473           loading={false}
474         />
475       </SubmitButton>
476       <ResetButtonLink
477         onClick={[MockFunction]}
478       >
479         cancel
480       </ResetButtonLink>
481     </div>
482   </form>
483 </Modal>
484 `;