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