]> source.dussan.org Git - sonarqube.git/blob
b987913a570db98e74a508dbeaae39381cd395f1
[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="bordered"
6 >
7   <div
8     className="big-padded"
9   >
10     <DeferredSpinner
11       loading={false}
12     >
13       <div
14         className="spacer-bottom text-right"
15       >
16         <withAppStateContext(CreationTooltip)
17           alm="azure"
18           preventCreation={false}
19         >
20           <Button
21             data-test="settings__alm-create"
22             disabled={false}
23             onClick={[MockFunction]}
24           >
25             settings.almintegration.create
26           </Button>
27         </withAppStateContext(CreationTooltip)>
28       </div>
29       <AlmBindingDefinitionBox
30         alm="azure"
31         branchesEnabled={true}
32         definition={
33           Object {
34             "key": "key",
35             "personalAccessToken": "asdf1234",
36           }
37         }
38         key="key"
39         multipleDefinitions={false}
40         onCheck={[MockFunction]}
41         onDelete={[MockFunction]}
42         onEdit={[MockFunction]}
43       />
44     </DeferredSpinner>
45   </div>
46   <div
47     className="huge-spacer-top huge-spacer-bottom bordered-top"
48   />
49   <div
50     className="big-padded"
51   >
52     <CategoryDefinitionsList
53       category="almintegration"
54       definitions={Array []}
55       subCategory="azure"
56     />
57   </div>
58 </div>
59 `;
60
61 exports[`should render correctly for multi-ALM binding: loaded 1`] = `
62 <div
63   className="bordered"
64 >
65   <div
66     className="big-padded"
67   >
68     <DeferredSpinner
69       loading={false}
70     >
71       <div
72         className="spacer-bottom text-right"
73       >
74         <withAppStateContext(CreationTooltip)
75           alm="azure"
76           preventCreation={false}
77         >
78           <Button
79             data-test="settings__alm-create"
80             disabled={false}
81             onClick={[MockFunction]}
82           >
83             settings.almintegration.create
84           </Button>
85         </withAppStateContext(CreationTooltip)>
86       </div>
87       <AlmBindingDefinitionBox
88         alm="azure"
89         branchesEnabled={true}
90         definition={
91           Object {
92             "key": "key",
93             "personalAccessToken": "asdf1234",
94           }
95         }
96         key="key"
97         multipleDefinitions={false}
98         onCheck={[MockFunction]}
99         onDelete={[MockFunction]}
100         onEdit={[MockFunction]}
101       />
102     </DeferredSpinner>
103   </div>
104   <div
105     className="huge-spacer-top huge-spacer-bottom bordered-top"
106   />
107   <div
108     className="big-padded"
109   >
110     <CategoryDefinitionsList
111       category="almintegration"
112       definitions={Array []}
113       subCategory="azure"
114     />
115   </div>
116 </div>
117 `;
118
119 exports[`should render correctly for multi-ALM binding: loading ALM definitions 1`] = `
120 <div
121   className="bordered"
122 >
123   <div
124     className="big-padded"
125   >
126     <DeferredSpinner
127       loading={true}
128     >
129       <div
130         className="spacer-bottom text-right"
131       >
132         <withAppStateContext(CreationTooltip)
133           alm="azure"
134           preventCreation={false}
135         >
136           <Button
137             data-test="settings__alm-create"
138             disabled={false}
139             onClick={[MockFunction]}
140           >
141             settings.almintegration.create
142           </Button>
143         </withAppStateContext(CreationTooltip)>
144       </div>
145       <AlmBindingDefinitionBox
146         alm="azure"
147         branchesEnabled={true}
148         definition={
149           Object {
150             "key": "key",
151             "personalAccessToken": "asdf1234",
152           }
153         }
154         key="key"
155         multipleDefinitions={false}
156         onCheck={[MockFunction]}
157         onDelete={[MockFunction]}
158         onEdit={[MockFunction]}
159       />
160     </DeferredSpinner>
161   </div>
162   <div
163     className="huge-spacer-top huge-spacer-bottom bordered-top"
164   />
165   <div
166     className="big-padded"
167   >
168     <CategoryDefinitionsList
169       category="almintegration"
170       definitions={Array []}
171       subCategory="azure"
172     />
173   </div>
174 </div>
175 `;
176
177 exports[`should render correctly for multi-ALM binding: loading project count 1`] = `
178 <div
179   className="bordered"
180 >
181   <div
182     className="big-padded"
183   >
184     <DeferredSpinner
185       loading={false}
186     >
187       <div
188         className="spacer-bottom text-right"
189       >
190         <withAppStateContext(CreationTooltip)
191           alm="azure"
192           preventCreation={true}
193         >
194           <Button
195             data-test="settings__alm-create"
196             disabled={true}
197             onClick={[MockFunction]}
198           >
199             settings.almintegration.create
200           </Button>
201         </withAppStateContext(CreationTooltip)>
202       </div>
203       <AlmBindingDefinitionBox
204         alm="azure"
205         branchesEnabled={true}
206         definition={
207           Object {
208             "key": "key",
209             "personalAccessToken": "asdf1234",
210           }
211         }
212         key="key"
213         multipleDefinitions={false}
214         onCheck={[MockFunction]}
215         onDelete={[MockFunction]}
216         onEdit={[MockFunction]}
217       />
218     </DeferredSpinner>
219   </div>
220   <div
221     className="huge-spacer-top huge-spacer-bottom bordered-top"
222   />
223   <div
224     className="big-padded"
225   >
226     <CategoryDefinitionsList
227       category="almintegration"
228       definitions={Array []}
229       subCategory="azure"
230     />
231   </div>
232 </div>
233 `;
234
235 exports[`should render correctly for single-ALM binding 1`] = `
236 <div
237   className="bordered"
238 >
239   <div
240     className="big-padded"
241   >
242     <DeferredSpinner
243       loading={true}
244     >
245       <div
246         className="spacer-bottom text-right"
247       >
248         <withAppStateContext(CreationTooltip)
249           alm="azure"
250           preventCreation={true}
251         >
252           <Button
253             data-test="settings__alm-create"
254             disabled={true}
255             onClick={[MockFunction]}
256           >
257             settings.almintegration.create
258           </Button>
259         </withAppStateContext(CreationTooltip)>
260       </div>
261       <AlmBindingDefinitionBox
262         alm="azure"
263         branchesEnabled={true}
264         definition={
265           Object {
266             "key": "key",
267             "personalAccessToken": "asdf1234",
268           }
269         }
270         key="key"
271         multipleDefinitions={false}
272         onCheck={[MockFunction]}
273         onDelete={[MockFunction]}
274         onEdit={[MockFunction]}
275       />
276     </DeferredSpinner>
277   </div>
278   <div
279     className="huge-spacer-top huge-spacer-bottom bordered-top"
280   />
281   <div
282     className="big-padded"
283   >
284     <CategoryDefinitionsList
285       category="almintegration"
286       definitions={Array []}
287       subCategory="azure"
288     />
289   </div>
290 </div>
291 `;
292
293 exports[`should render correctly for single-ALM binding 2`] = `
294 <div
295   className="bordered"
296 >
297   <div
298     className="big-padded"
299   >
300     <DeferredSpinner
301       loading={false}
302     >
303       <div
304         className="spacer-bottom text-right"
305       >
306         <withAppStateContext(CreationTooltip)
307           alm="azure"
308           preventCreation={true}
309         >
310           <Button
311             data-test="settings__alm-create"
312             disabled={true}
313             onClick={[MockFunction]}
314           >
315             settings.almintegration.create
316           </Button>
317         </withAppStateContext(CreationTooltip)>
318       </div>
319       <AlmBindingDefinitionBox
320         alm="azure"
321         branchesEnabled={true}
322         definition={
323           Object {
324             "key": "key",
325             "personalAccessToken": "asdf1234",
326           }
327         }
328         key="key"
329         multipleDefinitions={false}
330         onCheck={[MockFunction]}
331         onDelete={[MockFunction]}
332         onEdit={[MockFunction]}
333       />
334     </DeferredSpinner>
335   </div>
336   <div
337     className="huge-spacer-top huge-spacer-bottom bordered-top"
338   />
339   <div
340     className="big-padded"
341   >
342     <CategoryDefinitionsList
343       category="almintegration"
344       definitions={Array []}
345       subCategory="azure"
346     />
347   </div>
348 </div>
349 `;
350
351 exports[`should render correctly for single-ALM binding 3`] = `
352 <div
353   className="bordered"
354 >
355   <div
356     className="big-padded"
357   >
358     <DeferredSpinner
359       loading={false}
360     >
361       <div
362         className="spacer-bottom text-right"
363       >
364         <withAppStateContext(CreationTooltip)
365           alm="azure"
366           preventCreation={true}
367         >
368           <Button
369             data-test="settings__alm-create"
370             disabled={true}
371             onClick={[MockFunction]}
372           >
373             settings.almintegration.create
374           </Button>
375         </withAppStateContext(CreationTooltip)>
376       </div>
377       <AlmBindingDefinitionBox
378         alm="azure"
379         branchesEnabled={true}
380         definition={
381           Object {
382             "key": "key",
383             "personalAccessToken": "asdf1234",
384           }
385         }
386         key="key"
387         multipleDefinitions={false}
388         onCheck={[MockFunction]}
389         onDelete={[MockFunction]}
390         onEdit={[MockFunction]}
391       />
392     </DeferredSpinner>
393   </div>
394   <div
395     className="huge-spacer-top huge-spacer-bottom bordered-top"
396   />
397   <div
398     className="big-padded"
399   >
400     <CategoryDefinitionsList
401       category="almintegration"
402       definitions={Array []}
403       subCategory="azure"
404     />
405   </div>
406 </div>
407 `;
408
409 exports[`should render correctly with validation: create a first 1`] = `
410 <div
411   className="bordered"
412 >
413   <div
414     className="big-padded"
415   >
416     <DeferredSpinner
417       loading={false}
418     >
419       <p
420         className="spacer-top"
421       >
422         settings.almintegration.empty.azure
423       </p>
424       <div
425         className="big-spacer-top"
426       >
427         <withAppStateContext(CreationTooltip)
428           alm="azure"
429           preventCreation={false}
430         >
431           <Button
432             data-test="settings__alm-create"
433             disabled={false}
434             onClick={[MockFunction]}
435           >
436             settings.almintegration.create
437           </Button>
438         </withAppStateContext(CreationTooltip)>
439       </div>
440     </DeferredSpinner>
441   </div>
442   <div
443     className="huge-spacer-top huge-spacer-bottom bordered-top"
444   />
445   <div
446     className="big-padded"
447   >
448     <CategoryDefinitionsList
449       category="almintegration"
450       definitions={Array []}
451       subCategory="azure"
452     />
453   </div>
454 </div>
455 `;
456
457 exports[`should render correctly with validation: create a second 1`] = `
458 <div
459   className="bordered"
460 >
461   <div
462     className="big-padded"
463   >
464     <DeferredSpinner
465       loading={false}
466     >
467       <div
468         className="spacer-bottom text-right"
469       >
470         <withAppStateContext(CreationTooltip)
471           alm="azure"
472           preventCreation={false}
473         >
474           <Button
475             data-test="settings__alm-create"
476             disabled={false}
477             onClick={[MockFunction]}
478           >
479             settings.almintegration.create
480           </Button>
481         </withAppStateContext(CreationTooltip)>
482       </div>
483       <AlmBindingDefinitionBox
484         alm="azure"
485         branchesEnabled={true}
486         definition={
487           Object {
488             "appId": "123456",
489             "clientId": "client1",
490             "clientSecret": "**clientsecret**",
491             "key": "key",
492             "privateKey": "asdf1234",
493             "url": "http://github.enterprise.com",
494           }
495         }
496         key="key"
497         multipleDefinitions={false}
498         onCheck={[MockFunction]}
499         onDelete={[MockFunction]}
500         onEdit={[MockFunction]}
501       />
502     </DeferredSpinner>
503   </div>
504   <div
505     className="huge-spacer-top huge-spacer-bottom bordered-top"
506   />
507   <div
508     className="big-padded"
509   >
510     <CategoryDefinitionsList
511       category="almintegration"
512       definitions={Array []}
513       subCategory="azure"
514     />
515   </div>
516 </div>
517 `;
518
519 exports[`should render correctly with validation: default 1`] = `
520 <div
521   className="bordered"
522 >
523   <div
524     className="big-padded"
525   >
526     <DeferredSpinner
527       loading={false}
528     >
529       <div
530         className="spacer-bottom text-right"
531       >
532         <withAppStateContext(CreationTooltip)
533           alm="azure"
534           preventCreation={false}
535         >
536           <Button
537             data-test="settings__alm-create"
538             disabled={false}
539             onClick={[MockFunction]}
540           >
541             settings.almintegration.create
542           </Button>
543         </withAppStateContext(CreationTooltip)>
544       </div>
545       <AlmBindingDefinitionBox
546         alm="azure"
547         branchesEnabled={true}
548         definition={
549           Object {
550             "appId": "123456",
551             "clientId": "client1",
552             "clientSecret": "**clientsecret**",
553             "key": "key",
554             "privateKey": "asdf1234",
555             "url": "http://github.enterprise.com",
556           }
557         }
558         key="key"
559         multipleDefinitions={false}
560         onCheck={[MockFunction]}
561         onDelete={[MockFunction]}
562         onEdit={[MockFunction]}
563       />
564     </DeferredSpinner>
565   </div>
566   <div
567     className="huge-spacer-top huge-spacer-bottom bordered-top"
568   />
569   <div
570     className="big-padded"
571   >
572     <CategoryDefinitionsList
573       category="almintegration"
574       definitions={Array []}
575       subCategory="azure"
576     />
577   </div>
578 </div>
579 `;
580
581 exports[`should render correctly with validation: empty 1`] = `
582 <div
583   className="bordered"
584 >
585   <div
586     className="big-padded"
587   >
588     <DeferredSpinner
589       loading={false}
590     >
591       <p
592         className="spacer-top"
593       >
594         settings.almintegration.empty.azure
595       </p>
596       <div
597         className="big-spacer-top"
598       >
599         <withAppStateContext(CreationTooltip)
600           alm="azure"
601           preventCreation={false}
602         >
603           <Button
604             data-test="settings__alm-create"
605             disabled={false}
606             onClick={[MockFunction]}
607           >
608             settings.almintegration.create
609           </Button>
610         </withAppStateContext(CreationTooltip)>
611       </div>
612     </DeferredSpinner>
613   </div>
614   <div
615     className="huge-spacer-top huge-spacer-bottom bordered-top"
616   />
617   <div
618     className="big-padded"
619   >
620     <CategoryDefinitionsList
621       category="almintegration"
622       definitions={Array []}
623       subCategory="azure"
624     />
625   </div>
626 </div>
627 `;
628
629 exports[`should render correctly with validation: pass the correct key for bitbucket cloud 1`] = `
630 <div
631   className="bordered"
632 >
633   <div
634     className="big-padded"
635   >
636     <DeferredSpinner
637       loading={false}
638     >
639       <div
640         className="spacer-bottom text-right"
641       >
642         <withAppStateContext(CreationTooltip)
643           alm="bitbucket"
644           preventCreation={false}
645         >
646           <Button
647             data-test="settings__alm-create"
648             disabled={false}
649             onClick={[MockFunction]}
650           >
651             settings.almintegration.create
652           </Button>
653         </withAppStateContext(CreationTooltip)>
654       </div>
655       <AlmBindingDefinitionBox
656         alm="bitbucketcloud"
657         branchesEnabled={true}
658         definition={
659           Object {
660             "clientId": "client1",
661             "clientSecret": "**clientsecret**",
662             "key": "key",
663             "workspace": "workspace",
664           }
665         }
666         key="key"
667         multipleDefinitions={false}
668         onCheck={[MockFunction]}
669         onDelete={[MockFunction]}
670         onEdit={[MockFunction]}
671       />
672     </DeferredSpinner>
673   </div>
674   <div
675     className="huge-spacer-top huge-spacer-bottom bordered-top"
676   />
677   <div
678     className="big-padded"
679   >
680     <CategoryDefinitionsList
681       category="almintegration"
682       definitions={Array []}
683       subCategory="bitbucket"
684     />
685   </div>
686 </div>
687 `;