]> source.dussan.org Git - sonarqube.git/blob
2072f4e88158ed64524ba794cf3f3b35b90625b6
[sonarqube.git] /
1 // Jest Snapshot v1, https://goo.gl/fbAQLP
2
3 exports[`should render correctly: bitbucket 1`] = `
4 <div
5   className="display-flex-start"
6 >
7   <form
8     className="width-50"
9     onSubmit={[Function]}
10   >
11     <h2
12       className="big"
13     >
14       onboarding.create_project.pat_form.title.bitbucket
15     </h2>
16     <p
17       className="big-spacer-top big-spacer-bottom"
18     >
19       onboarding.create_project.pat_form.help.bitbucket
20     </p>
21     <ValidationInput
22       error="onboarding.create_project.pat_incorrect.bitbucket"
23       id="personal_access_token_validation"
24       isInvalid={false}
25       isValid={false}
26       label="onboarding.create_project.enter_pat"
27       required={true}
28     >
29       <input
30         autoFocus={true}
31         className="input-super-large is-invalid"
32         id="personal_access_token"
33         minLength={1}
34         onChange={[Function]}
35         type="text"
36         value=""
37       />
38     </ValidationInput>
39     <ValidationInput
40       error="onboarding.create_project.pat_incorrect.bitbucket"
41       id="personal_access_token_submit"
42       isInvalid={true}
43       isValid={false}
44       label={null}
45     >
46       <SubmitButton
47         disabled={true}
48       >
49         save
50       </SubmitButton>
51       <DeferredSpinner
52         className="spacer-left"
53         loading={false}
54       />
55     </ValidationInput>
56   </form>
57   <Alert
58     className="big-spacer-left width-50"
59     display="block"
60     variant="info"
61   >
62     <h3>
63       onboarding.create_project.pat_help.title
64     </h3>
65     <p
66       className="big-spacer-top big-spacer-bottom"
67     >
68       <FormattedMessage
69         defaultMessage="onboarding.create_project.pat_help.bitbucket.instructions"
70         id="onboarding.create_project.pat_help.instructions"
71         values={
72           Object {
73             "button": <strong>
74               onboarding.create_project.pat_help.bitbucket.instructions.button
75             </strong>,
76             "menu": <strong>
77               onboarding.create_project.pat_help.bitbucket.instructions.menu
78             </strong>,
79           }
80         }
81       />
82     </p>
83     <div
84       className="text-middle"
85     >
86       <img
87         alt=""
88         className="spacer-right"
89         height="16"
90         src="/images/alm/bitbucket.svg"
91       />
92       <a
93         href="http://www.example.com/account"
94         rel="noopener noreferrer"
95         target="_blank"
96       >
97         onboarding.create_project.pat_help.link
98       </a>
99     </div>
100     <p
101       className="big-spacer-top big-spacer-bottom"
102     >
103       onboarding.create_project.pat_help.instructions2.bitbucket
104     </p>
105     <ul>
106       <li>
107         <FormattedMessage
108           defaultMessage="onboarding.create_project.pat_help.bbs_permission_projects"
109           id="onboarding.create_project.pat_help.bbs_permission_projects"
110           values={
111             Object {
112               "perm": <strong>
113                 onboarding.create_project.pat_help.read_permission
114               </strong>,
115             }
116           }
117         />
118       </li>
119       <li>
120         <FormattedMessage
121           defaultMessage="onboarding.create_project.pat_help.bbs_permission_repos"
122           id="onboarding.create_project.pat_help.bbs_permission_repos"
123           values={
124             Object {
125               "perm": <strong>
126                 onboarding.create_project.pat_help.read_permission
127               </strong>,
128             }
129           }
130         />
131       </li>
132     </ul>
133   </Alert>
134 </div>
135 `;
136
137 exports[`should render correctly: bitbucket cloud 1`] = `
138 <div
139   className="display-flex-start"
140 >
141   <form
142     className="width-50"
143     onSubmit={[Function]}
144   >
145     <h2
146       className="big"
147     >
148       onboarding.create_project.pat_form.title.bitbucketcloud
149     </h2>
150     <p
151       className="big-spacer-top big-spacer-bottom"
152     >
153       onboarding.create_project.pat_form.help.bitbucketcloud
154     </p>
155     <ValidationInput
156       id="enter_username_validation"
157       isInvalid={false}
158       isValid={false}
159       label="onboarding.create_project.enter_username"
160       required={true}
161     >
162       <input
163         autoFocus={true}
164         className="input-super-large is-invalid"
165         id="username"
166         minLength={1}
167         name="username"
168         onChange={[Function]}
169         type="text"
170       />
171     </ValidationInput>
172     <ValidationInput
173       error="onboarding.create_project.pat_incorrect.bitbucketcloud"
174       id="personal_access_token_validation"
175       isInvalid={false}
176       isValid={false}
177       label="onboarding.create_project.enter_pat.bitbucketcloud"
178       required={true}
179     >
180       <input
181         autoFocus={false}
182         className="input-super-large is-invalid"
183         id="personal_access_token"
184         minLength={1}
185         onChange={[Function]}
186         type="text"
187         value=""
188       />
189     </ValidationInput>
190     <ValidationInput
191       error="onboarding.create_project.pat_incorrect.bitbucketcloud"
192       id="personal_access_token_submit"
193       isInvalid={true}
194       isValid={false}
195       label={null}
196     >
197       <SubmitButton
198         disabled={true}
199       >
200         save
201       </SubmitButton>
202       <DeferredSpinner
203         className="spacer-left"
204         loading={false}
205       />
206     </ValidationInput>
207   </form>
208   <Alert
209     className="big-spacer-left width-50"
210     display="block"
211     variant="info"
212   >
213     <h3>
214       onboarding.create_project.pat_help.instructions_username.bitbucketcloud.title
215     </h3>
216     <p
217       className="big-spacer-top big-spacer-bottom"
218     >
219       onboarding.create_project.pat_help.instructions_username.bitbucketcloud
220     </p>
221     <div
222       className="text-middle big-spacer-bottom"
223     >
224       <img
225         alt=""
226         className="spacer-right"
227         height="16"
228         src="/images/alm/bitbucket.svg"
229       />
230       <a
231         href="https://bitbucket.org/account/settings/"
232         rel="noopener noreferrer"
233         target="_blank"
234       >
235         onboarding.create_project.pat_help.instructions_username.bitbucketcloud.link
236       </a>
237     </div>
238     <h3>
239       onboarding.create_project.pat_help.bitbucketcloud.title
240     </h3>
241     <p
242       className="big-spacer-top big-spacer-bottom"
243     >
244       <FormattedMessage
245         defaultMessage="onboarding.create_project.pat_help.bitbucketcloud.instructions"
246         id="onboarding.create_project.pat_help.instructions"
247         values={
248           Object {
249             "alm": "onboarding.alm.bitbucketcloud",
250           }
251         }
252       />
253     </p>
254     <div
255       className="text-middle"
256     >
257       <img
258         alt=""
259         className="spacer-right"
260         height="16"
261         src="/images/alm/bitbucket.svg"
262       />
263       <a
264         href="https://bitbucket.org/account/settings/app-passwords/new"
265         rel="noopener noreferrer"
266         target="_blank"
267       >
268         onboarding.create_project.pat_help.bitbucketcloud.link
269       </a>
270     </div>
271     <p
272       className="big-spacer-top big-spacer-bottom"
273     >
274       onboarding.create_project.pat_help.instructions2.bitbucketcloud
275     </p>
276     <ul>
277       <li>
278         <FormattedMessage
279           defaultMessage="onboarding.create_project.pat_help.bbs_permission_repos"
280           id="onboarding.create_project.pat_help.bbs_permission_repos"
281           values={
282             Object {
283               "perm": <strong>
284                 onboarding.create_project.pat_help.read_permission
285               </strong>,
286             }
287           }
288         />
289       </li>
290     </ul>
291   </Alert>
292 </div>
293 `;
294
295 exports[`should render correctly: gitlab 1`] = `
296 <div
297   className="display-flex-start"
298 >
299   <form
300     className="width-50"
301     onSubmit={[Function]}
302   >
303     <h2
304       className="big"
305     >
306       onboarding.create_project.pat_form.title.gitlab
307     </h2>
308     <p
309       className="big-spacer-top big-spacer-bottom"
310     >
311       onboarding.create_project.pat_form.help.gitlab
312     </p>
313     <ValidationInput
314       error="onboarding.create_project.pat_incorrect.gitlab"
315       id="personal_access_token_validation"
316       isInvalid={false}
317       isValid={false}
318       label="onboarding.create_project.enter_pat"
319       required={true}
320     >
321       <input
322         autoFocus={true}
323         className="input-super-large is-invalid"
324         id="personal_access_token"
325         minLength={1}
326         onChange={[Function]}
327         type="text"
328         value=""
329       />
330     </ValidationInput>
331     <ValidationInput
332       error="onboarding.create_project.pat_incorrect.gitlab"
333       id="personal_access_token_submit"
334       isInvalid={true}
335       isValid={false}
336       label={null}
337     >
338       <SubmitButton
339         disabled={true}
340       >
341         save
342       </SubmitButton>
343       <DeferredSpinner
344         className="spacer-left"
345         loading={false}
346       />
347     </ValidationInput>
348   </form>
349   <Alert
350     className="big-spacer-left width-50"
351     display="block"
352     variant="info"
353   >
354     <h3>
355       onboarding.create_project.pat_help.title
356     </h3>
357     <p
358       className="big-spacer-top big-spacer-bottom"
359     >
360       <FormattedMessage
361         defaultMessage="onboarding.create_project.pat_help.instructions"
362         id="onboarding.create_project.pat_help.instructions"
363         values={
364           Object {
365             "alm": "onboarding.alm.gitlab",
366           }
367         }
368       />
369     </p>
370     <div
371       className="text-middle"
372     >
373       <img
374         alt=""
375         className="spacer-right"
376         height="16"
377         src="/images/alm/gitlab.svg"
378       />
379       <a
380         href="https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html"
381         rel="noopener noreferrer"
382         target="_blank"
383       >
384         onboarding.create_project.pat_help.link
385       </a>
386     </div>
387     <p
388       className="big-spacer-top big-spacer-bottom"
389     >
390       onboarding.create_project.pat_help.instructions2.gitlab
391     </p>
392     <ul>
393       <li
394         className="spacer-bottom"
395       >
396         <strong>
397           onboarding.create_project.pat_help.gitlab.read_api_permission
398         </strong>
399       </li>
400     </ul>
401   </Alert>
402 </div>
403 `;
404
405 exports[`should render correctly: gitlab with non-standard api path 1`] = `
406 <div
407   className="display-flex-start"
408 >
409   <form
410     className="width-50"
411     onSubmit={[Function]}
412   >
413     <h2
414       className="big"
415     >
416       onboarding.create_project.pat_form.title.gitlab
417     </h2>
418     <p
419       className="big-spacer-top big-spacer-bottom"
420     >
421       onboarding.create_project.pat_form.help.gitlab
422     </p>
423     <ValidationInput
424       error="onboarding.create_project.pat_incorrect.gitlab"
425       id="personal_access_token_validation"
426       isInvalid={false}
427       isValid={false}
428       label="onboarding.create_project.enter_pat"
429       required={true}
430     >
431       <input
432         autoFocus={true}
433         className="input-super-large is-invalid"
434         id="personal_access_token"
435         minLength={1}
436         onChange={[Function]}
437         type="text"
438         value=""
439       />
440     </ValidationInput>
441     <ValidationInput
442       error="onboarding.create_project.pat_incorrect.gitlab"
443       id="personal_access_token_submit"
444       isInvalid={true}
445       isValid={false}
446       label={null}
447     >
448       <SubmitButton
449         disabled={true}
450       >
451         save
452       </SubmitButton>
453       <DeferredSpinner
454         className="spacer-left"
455         loading={false}
456       />
457     </ValidationInput>
458   </form>
459   <Alert
460     className="big-spacer-left width-50"
461     display="block"
462     variant="info"
463   >
464     <h3>
465       onboarding.create_project.pat_help.title
466     </h3>
467     <p
468       className="big-spacer-top big-spacer-bottom"
469     >
470       <FormattedMessage
471         defaultMessage="onboarding.create_project.pat_help.instructions"
472         id="onboarding.create_project.pat_help.instructions"
473         values={
474           Object {
475             "alm": "onboarding.alm.gitlab",
476           }
477         }
478       />
479     </p>
480     <div
481       className="text-middle"
482     >
483       <img
484         alt=""
485         className="spacer-right"
486         height="16"
487         src="/images/alm/gitlab.svg"
488       />
489       <a
490         href="https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html"
491         rel="noopener noreferrer"
492         target="_blank"
493       >
494         onboarding.create_project.pat_help.link
495       </a>
496     </div>
497     <p
498       className="big-spacer-top big-spacer-bottom"
499     >
500       onboarding.create_project.pat_help.instructions2.gitlab
501     </p>
502     <ul>
503       <li
504         className="spacer-bottom"
505       >
506         <strong>
507           onboarding.create_project.pat_help.gitlab.read_api_permission
508         </strong>
509       </li>
510     </ul>
511   </Alert>
512 </div>
513 `;
514
515 exports[`should render correctly: no token needed 1`] = `
516 <DeferredSpinner
517   className="spacer-left"
518   loading={true}
519 />
520 `;
521
522 exports[`should show error when issue: issue submitting token 1`] = `
523 <div
524   className="display-flex-start"
525 >
526   <form
527     className="width-50"
528     onSubmit={[Function]}
529   >
530     <h2
531       className="big"
532     >
533       onboarding.create_project.pat_form.title.bitbucketcloud
534     </h2>
535     <p
536       className="big-spacer-top big-spacer-bottom"
537     >
538       onboarding.create_project.pat_form.help.bitbucketcloud
539     </p>
540     <ValidationInput
541       id="enter_username_validation"
542       isInvalid={false}
543       isValid={false}
544       label="onboarding.create_project.enter_username"
545       required={true}
546     >
547       <input
548         autoFocus={true}
549         className="input-super-large is-invalid"
550         id="username"
551         minLength={1}
552         name="username"
553         onChange={[Function]}
554         type="text"
555         value="username"
556       />
557     </ValidationInput>
558     <ValidationInput
559       error="default_error_message"
560       id="personal_access_token_validation"
561       isInvalid={false}
562       isValid={false}
563       label="onboarding.create_project.enter_pat.bitbucketcloud"
564       required={true}
565     >
566       <input
567         autoFocus={false}
568         className="input-super-large is-invalid"
569         id="personal_access_token"
570         minLength={1}
571         onChange={[Function]}
572         type="text"
573         value="token"
574       />
575     </ValidationInput>
576     <ValidationInput
577       error="default_error_message"
578       id="personal_access_token_submit"
579       isInvalid={true}
580       isValid={false}
581       label={null}
582     >
583       <SubmitButton
584         disabled={true}
585       >
586         save
587       </SubmitButton>
588       <DeferredSpinner
589         className="spacer-left"
590         loading={false}
591       />
592     </ValidationInput>
593   </form>
594   <Alert
595     className="big-spacer-left width-50"
596     display="block"
597     variant="info"
598   >
599     <h3>
600       onboarding.create_project.pat_help.instructions_username.bitbucketcloud.title
601     </h3>
602     <p
603       className="big-spacer-top big-spacer-bottom"
604     >
605       onboarding.create_project.pat_help.instructions_username.bitbucketcloud
606     </p>
607     <div
608       className="text-middle big-spacer-bottom"
609     >
610       <img
611         alt=""
612         className="spacer-right"
613         height="16"
614         src="/images/alm/bitbucket.svg"
615       />
616       <a
617         href="https://bitbucket.org/account/settings/"
618         rel="noopener noreferrer"
619         target="_blank"
620       >
621         onboarding.create_project.pat_help.instructions_username.bitbucketcloud.link
622       </a>
623     </div>
624     <h3>
625       onboarding.create_project.pat_help.bitbucketcloud.title
626     </h3>
627     <p
628       className="big-spacer-top big-spacer-bottom"
629     >
630       <FormattedMessage
631         defaultMessage="onboarding.create_project.pat_help.bitbucketcloud.instructions"
632         id="onboarding.create_project.pat_help.instructions"
633         values={
634           Object {
635             "alm": "onboarding.alm.bitbucketcloud",
636           }
637         }
638       />
639     </p>
640     <div
641       className="text-middle"
642     >
643       <img
644         alt=""
645         className="spacer-right"
646         height="16"
647         src="/images/alm/bitbucket.svg"
648       />
649       <a
650         href="https://bitbucket.org/account/settings/app-passwords/new"
651         rel="noopener noreferrer"
652         target="_blank"
653       >
654         onboarding.create_project.pat_help.bitbucketcloud.link
655       </a>
656     </div>
657     <p
658       className="big-spacer-top big-spacer-bottom"
659     >
660       onboarding.create_project.pat_help.instructions2.bitbucketcloud
661     </p>
662     <ul>
663       <li>
664         <FormattedMessage
665           defaultMessage="onboarding.create_project.pat_help.bbs_permission_repos"
666           id="onboarding.create_project.pat_help.bbs_permission_repos"
667           values={
668             Object {
669               "perm": <strong>
670                 onboarding.create_project.pat_help.read_permission
671               </strong>,
672             }
673           }
674         />
675       </li>
676     </ul>
677   </Alert>
678 </div>
679 `;