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