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