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