]> source.dussan.org Git - sonarqube.git/blob
82dda043b225f19afd6315ed432276532c0222d6
[sonarqube.git] /
1 // Jest Snapshot v1, https://goo.gl/fbAQLP
2
3 exports[`should render correctly: default 1`] = `
4 <div>
5   <CreateProjectPageHeader
6     title={
7       <span
8         className="text-middle display-flex-center"
9       >
10         <img
11           alt=""
12           className="spacer-right"
13           height={24}
14           src="/images/alm/github.svg"
15         />
16         onboarding.create_project.github.title
17       </span>
18     }
19   />
20   <AlmSettingsInstanceDropdown
21     almInstances={
22       Array [
23         Object {
24           "alm": "github",
25           "key": "key",
26         },
27         Object {
28           "alm": "github",
29           "key": "key",
30         },
31       ]
32     }
33     almKey="github"
34     onChangeConfig={[MockFunction]}
35   />
36   <DeferredSpinner
37     loading={false}
38   >
39     <div
40       className="form-field"
41     >
42       <label>
43         onboarding.create_project.github.choose_organization
44       </label>
45       <Alert
46         className="spacer-top"
47         variant="error"
48       >
49         onboarding.create_project.github.no_orgs
50       </Alert>
51     </div>
52   </DeferredSpinner>
53 </div>
54 `;
55
56 exports[`should render correctly: error 1`] = `
57 <div>
58   <CreateProjectPageHeader
59     title={
60       <span
61         className="text-middle display-flex-center"
62       >
63         <img
64           alt=""
65           className="spacer-right"
66           height={24}
67           src="/images/alm/github.svg"
68         />
69         onboarding.create_project.github.title
70       </span>
71     }
72   />
73   <AlmSettingsInstanceDropdown
74     almInstances={
75       Array [
76         Object {
77           "alm": "github",
78           "key": "key",
79         },
80         Object {
81           "alm": "github",
82           "key": "key",
83         },
84       ]
85     }
86     almKey="github"
87     onChangeConfig={[MockFunction]}
88   />
89 </div>
90 `;
91
92 exports[`should render correctly: error for admin 1`] = `
93 <div>
94   <CreateProjectPageHeader
95     title={
96       <span
97         className="text-middle display-flex-center"
98       >
99         <img
100           alt=""
101           className="spacer-right"
102           height={24}
103           src="/images/alm/github.svg"
104         />
105         onboarding.create_project.github.title
106       </span>
107     }
108   />
109   <AlmSettingsInstanceDropdown
110     almInstances={
111       Array [
112         Object {
113           "alm": "github",
114           "key": "key",
115         },
116         Object {
117           "alm": "github",
118           "key": "key",
119         },
120       ]
121     }
122     almKey="github"
123     onChangeConfig={[MockFunction]}
124   />
125 </div>
126 `;
127
128 exports[`should render correctly: loading 1`] = `<DeferredSpinner />`;
129
130 exports[`should render correctly: no repositories 1`] = `
131 <div>
132   <CreateProjectPageHeader
133     additionalActions={
134       <div
135         className="display-flex-center pull-right"
136       >
137         <DeferredSpinner
138           className="spacer-right"
139           loading={false}
140         />
141         <Button
142           className="button-large button-primary"
143           disabled={true}
144           onClick={[MockFunction]}
145         >
146           onboarding.create_project.import_selected_repo
147         </Button>
148       </div>
149     }
150     title={
151       <span
152         className="text-middle display-flex-center"
153       >
154         <img
155           alt=""
156           className="spacer-right"
157           height={24}
158           src="/images/alm/github.svg"
159         />
160         onboarding.create_project.github.title
161       </span>
162     }
163   />
164   <AlmSettingsInstanceDropdown
165     almInstances={
166       Array [
167         Object {
168           "alm": "github",
169           "key": "key",
170         },
171         Object {
172           "alm": "github",
173           "key": "key",
174         },
175       ]
176     }
177     almKey="github"
178     onChangeConfig={[MockFunction]}
179   />
180   <DeferredSpinner
181     loading={false}
182   >
183     <div
184       className="form-field"
185     >
186       <label>
187         onboarding.create_project.github.choose_organization
188       </label>
189       <Select
190         className="input-super-large"
191         onChange={[Function]}
192         options={
193           Array [
194             Object {
195               "label": "org1",
196               "value": "o1",
197             },
198             Object {
199               "label": "org2",
200               "value": "o2",
201             },
202           ]
203         }
204         value={
205           Object {
206             "label": "org2",
207             "value": "o2",
208           }
209         }
210       />
211     </div>
212   </DeferredSpinner>
213 </div>
214 `;
215
216 exports[`should render correctly: organizations 1`] = `
217 <div>
218   <CreateProjectPageHeader
219     title={
220       <span
221         className="text-middle display-flex-center"
222       >
223         <img
224           alt=""
225           className="spacer-right"
226           height={24}
227           src="/images/alm/github.svg"
228         />
229         onboarding.create_project.github.title
230       </span>
231     }
232   />
233   <AlmSettingsInstanceDropdown
234     almInstances={
235       Array [
236         Object {
237           "alm": "github",
238           "key": "key",
239         },
240         Object {
241           "alm": "github",
242           "key": "key",
243         },
244       ]
245     }
246     almKey="github"
247     onChangeConfig={[MockFunction]}
248   />
249   <DeferredSpinner
250     loading={false}
251   >
252     <div
253       className="form-field"
254     >
255       <label>
256         onboarding.create_project.github.choose_organization
257       </label>
258       <Select
259         className="input-super-large"
260         onChange={[Function]}
261         options={
262           Array [
263             Object {
264               "label": "org1",
265               "value": "o1",
266             },
267             Object {
268               "label": "org2",
269               "value": "o2",
270             },
271           ]
272         }
273         value={null}
274       />
275     </div>
276   </DeferredSpinner>
277 </div>
278 `;
279
280 exports[`should render correctly: repositories 1`] = `
281 <div>
282   <CreateProjectPageHeader
283     additionalActions={
284       <div
285         className="display-flex-center pull-right"
286       >
287         <DeferredSpinner
288           className="spacer-right"
289           loading={false}
290         />
291         <Button
292           className="button-large button-primary"
293           disabled={false}
294           onClick={[MockFunction]}
295         >
296           onboarding.create_project.import_selected_repo
297         </Button>
298       </div>
299     }
300     title={
301       <span
302         className="text-middle display-flex-center"
303       >
304         <img
305           alt=""
306           className="spacer-right"
307           height={24}
308           src="/images/alm/github.svg"
309         />
310         onboarding.create_project.github.title
311       </span>
312     }
313   />
314   <AlmSettingsInstanceDropdown
315     almInstances={
316       Array [
317         Object {
318           "alm": "github",
319           "key": "key",
320         },
321         Object {
322           "alm": "github",
323           "key": "key",
324         },
325       ]
326     }
327     almKey="github"
328     onChangeConfig={[MockFunction]}
329   />
330   <DeferredSpinner
331     loading={false}
332   >
333     <div
334       className="form-field"
335     >
336       <label>
337         onboarding.create_project.github.choose_organization
338       </label>
339       <Select
340         className="input-super-large"
341         onChange={[Function]}
342         options={
343           Array [
344             Object {
345               "label": "org1",
346               "value": "o1",
347             },
348             Object {
349               "label": "org2",
350               "value": "o2",
351             },
352           ]
353         }
354         value={
355           Object {
356             "label": "org2",
357             "value": "o2",
358           }
359         }
360       />
361     </div>
362   </DeferredSpinner>
363   <div
364     className="boxed-group padded display-flex-wrap"
365   >
366     <div
367       className="width-100"
368     >
369       <SearchBox
370         className="big-spacer-bottom"
371         onChange={[MockFunction]}
372         placeholder="onboarding.create_project.search_repositories"
373         value=""
374       />
375     </div>
376     <Radio
377       checked={false}
378       className="spacer-top spacer-bottom padded create-project-github-repository"
379       disabled={false}
380       key="repo1"
381       onCheck={[MockFunction]}
382       value="repo1"
383     >
384       <div
385         className="big overflow-hidden max-width-100"
386         title="repository 1"
387       >
388         <div
389           className="text-ellipsis"
390         >
391           repository 1
392         </div>
393         <a
394           className="notice small display-flex-center little-spacer-top"
395           href="https://github.com/owner/repo1"
396           onClick={[Function]}
397           rel="noopener noreferrer"
398           target="_blank"
399         >
400           onboarding.create_project.see_on_github
401         </a>
402       </div>
403     </Radio>
404     <Radio
405       checked={true}
406       className="spacer-top spacer-bottom padded create-project-github-repository"
407       disabled={true}
408       key="repo2"
409       onCheck={[MockFunction]}
410       value="repo2"
411     >
412       <div
413         className="big overflow-hidden max-width-100"
414         title="repository 1"
415       >
416         <div
417           className="text-ellipsis"
418         >
419           <div
420             className="display-flex-center max-width-100"
421           >
422             <ForwardRef(Link)
423               className="display-flex-center max-width-60"
424               to={
425                 Object {
426                   "pathname": "/dashboard",
427                   "search": "?id=repo2",
428                 }
429               }
430             >
431               <QualifierIcon
432                 className="spacer-right"
433                 qualifier="TRK"
434               />
435               <span
436                 className="text-ellipsis"
437               >
438                 repository 1
439               </span>
440             </ForwardRef(Link)>
441             <em
442               className="display-flex-center small big-spacer-left flex-0"
443             >
444               <span
445                 className="text-muted-2"
446               >
447                 onboarding.create_project.repository_imported
448               </span>
449               <CheckIcon
450                 className="little-spacer-left"
451                 fill="#00aa00"
452                 size={12}
453               />
454             </em>
455           </div>
456         </div>
457         <a
458           className="notice small display-flex-center little-spacer-top"
459           href="https://github.com/owner/repo1"
460           onClick={[Function]}
461           rel="noopener noreferrer"
462           target="_blank"
463         >
464           onboarding.create_project.see_on_github
465         </a>
466       </div>
467     </Radio>
468     <Radio
469       checked={true}
470       className="spacer-top spacer-bottom padded create-project-github-repository"
471       disabled={false}
472       key="repo3"
473       onCheck={[MockFunction]}
474       value="repo3"
475     >
476       <div
477         className="big overflow-hidden max-width-100"
478         title="repository 1"
479       >
480         <div
481           className="text-ellipsis"
482         >
483           repository 1
484         </div>
485         <a
486           className="notice small display-flex-center little-spacer-top"
487           href="https://github.com/owner/repo1"
488           onClick={[Function]}
489           rel="noopener noreferrer"
490           target="_blank"
491         >
492           onboarding.create_project.see_on_github
493         </a>
494       </div>
495     </Radio>
496     <div
497       className="display-flex-justify-center width-100"
498     >
499       <ListFooter
500         count={3}
501         loadMore={[MockFunction]}
502         loading={false}
503         total={0}
504       />
505     </div>
506   </div>
507 </div>
508 `;