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