]> source.dussan.org Git - sonarqube.git/blob
5b0b50bc580539c63cc8f18f708c2cc0adb7fd31
[sonarqube.git] /
1 // Jest Snapshot v1, https://goo.gl/fbAQLP
2
3 exports[`should render correctly: default 1`] = `
4 <Fragment>
5   <CreateProjectPageHeader
6     additionalActions={
7       <div
8         className="display-flex-center pull-right"
9       >
10         <DeferredSpinner
11           className="spacer-right"
12           loading={false}
13           timeout={100}
14         />
15         <Button
16           className="button-large button-primary"
17           disabled={true}
18           onClick={[MockFunction]}
19         >
20           onboarding.create_project.import_selected_repo
21         </Button>
22       </div>
23     }
24     title={
25       <span
26         className="text-middle"
27       >
28         <img
29           alt=""
30           className="spacer-right"
31           height="24"
32           src="/images/alm/bitbucket.svg"
33         />
34         onboarding.create_project.from_bbs
35       </span>
36     }
37   />
38   <BitbucketImportRepositoryForm
39     disableRepositories={false}
40     onSearch={[MockFunction]}
41     onSelectRepository={[MockFunction]}
42     projectRepositories={
43       Object {
44         "foo": Object {
45           "allShown": true,
46           "repositories": Array [
47             Object {
48               "id": 1,
49               "name": "Repo",
50               "projectKey": "project",
51               "slug": "project__repo",
52             },
53           ],
54         },
55       }
56     }
57     projects={
58       Array [
59         Object {
60           "id": 1,
61           "key": "foo",
62           "name": "Project",
63         },
64       ]
65     }
66     searching={false}
67   />
68 </Fragment>
69 `;
70
71 exports[`should render correctly: importing 1`] = `
72 <Fragment>
73   <CreateProjectPageHeader
74     additionalActions={
75       <div
76         className="display-flex-center pull-right"
77       >
78         <DeferredSpinner
79           className="spacer-right"
80           loading={true}
81           timeout={100}
82         />
83         <Button
84           className="button-large button-primary"
85           disabled={true}
86           onClick={[MockFunction]}
87         >
88           onboarding.create_project.import_selected_repo
89         </Button>
90       </div>
91     }
92     title={
93       <span
94         className="text-middle"
95       >
96         <img
97           alt=""
98           className="spacer-right"
99           height="24"
100           src="/images/alm/bitbucket.svg"
101         />
102         onboarding.create_project.from_bbs
103       </span>
104     }
105   />
106   <BitbucketImportRepositoryForm
107     disableRepositories={true}
108     onSearch={[MockFunction]}
109     onSelectRepository={[MockFunction]}
110     projectRepositories={
111       Object {
112         "foo": Object {
113           "allShown": true,
114           "repositories": Array [
115             Object {
116               "id": 1,
117               "name": "Repo",
118               "projectKey": "project",
119               "slug": "project__repo",
120             },
121           ],
122         },
123       }
124     }
125     projects={
126       Array [
127         Object {
128           "id": 1,
129           "key": "foo",
130           "name": "Project",
131         },
132       ]
133     }
134     searching={false}
135   />
136 </Fragment>
137 `;
138
139 exports[`should render correctly: invalid config, admin user 1`] = `
140 <Fragment>
141   <CreateProjectPageHeader
142     additionalActions={
143       <div
144         className="display-flex-center pull-right"
145       >
146         <DeferredSpinner
147           className="spacer-right"
148           loading={false}
149           timeout={100}
150         />
151         <Button
152           className="button-large button-primary"
153           disabled={true}
154           onClick={[MockFunction]}
155         >
156           onboarding.create_project.import_selected_repo
157         </Button>
158       </div>
159     }
160     title={
161       <span
162         className="text-middle"
163       >
164         <img
165           alt=""
166           className="spacer-right"
167           height="24"
168           src="/images/alm/bitbucket.svg"
169         />
170         onboarding.create_project.from_bbs
171       </span>
172     }
173   />
174   <Alert
175     variant="error"
176   >
177     <FormattedMessage
178       defaultMessage="onboarding.create_project.no_bbs_binding.admin"
179       id="onboarding.create_project.no_bbs_binding.admin"
180       values={
181         Object {
182           "url": <Link
183             onlyActiveOnIndex={false}
184             style={Object {}}
185             to={
186               Object {
187                 "pathname": "/admin/settings",
188                 "query": Object {
189                   "category": "almintegration",
190                 },
191               }
192             }
193           >
194             settings.page
195           </Link>,
196         }
197       }
198     />
199   </Alert>
200 </Fragment>
201 `;
202
203 exports[`should render correctly: invalid config, regular user 1`] = `
204 <Fragment>
205   <CreateProjectPageHeader
206     additionalActions={
207       <div
208         className="display-flex-center pull-right"
209       >
210         <DeferredSpinner
211           className="spacer-right"
212           loading={false}
213           timeout={100}
214         />
215         <Button
216           className="button-large button-primary"
217           disabled={true}
218           onClick={[MockFunction]}
219         >
220           onboarding.create_project.import_selected_repo
221         </Button>
222       </div>
223     }
224     title={
225       <span
226         className="text-middle"
227       >
228         <img
229           alt=""
230           className="spacer-right"
231           height="24"
232           src="/images/alm/bitbucket.svg"
233         />
234         onboarding.create_project.from_bbs
235       </span>
236     }
237   />
238   <Alert
239     variant="error"
240   >
241     onboarding.create_project.no_bbs_binding
242   </Alert>
243 </Fragment>
244 `;
245
246 exports[`should render correctly: loading 1`] = `
247 <Fragment>
248   <CreateProjectPageHeader
249     additionalActions={
250       <div
251         className="display-flex-center pull-right"
252       >
253         <DeferredSpinner
254           className="spacer-right"
255           loading={false}
256           timeout={100}
257         />
258         <Button
259           className="button-large button-primary"
260           disabled={true}
261           onClick={[MockFunction]}
262         >
263           onboarding.create_project.import_selected_repo
264         </Button>
265       </div>
266     }
267     title={
268       <span
269         className="text-middle"
270       >
271         <img
272           alt=""
273           className="spacer-right"
274           height="24"
275           src="/images/alm/bitbucket.svg"
276         />
277         onboarding.create_project.from_bbs
278       </span>
279     }
280   />
281   <i
282     className="spinner"
283   />
284 </Fragment>
285 `;
286
287 exports[`should render correctly: pat form 1`] = `
288 <Fragment>
289   <CreateProjectPageHeader
290     additionalActions={false}
291     title={
292       <span
293         className="text-middle"
294       >
295         <img
296           alt=""
297           className="spacer-right"
298           height="24"
299           src="/images/alm/bitbucket.svg"
300         />
301         onboarding.create_project.from_bbs
302       </span>
303     }
304   />
305   <BitbucketPersonalAccessTokenForm
306     bitbucketSetting={
307       Object {
308         "alm": "bitbucket",
309         "key": "key",
310       }
311     }
312     onPersonalAccessTokenCreate={[MockFunction]}
313     validationFailed={false}
314   />
315 </Fragment>
316 `;
317
318 exports[`should render correctly: selected repo 1`] = `
319 <Fragment>
320   <CreateProjectPageHeader
321     additionalActions={
322       <div
323         className="display-flex-center pull-right"
324       >
325         <DeferredSpinner
326           className="spacer-right"
327           loading={false}
328           timeout={100}
329         />
330         <Button
331           className="button-large button-primary"
332           disabled={false}
333           onClick={[MockFunction]}
334         >
335           onboarding.create_project.import_selected_repo
336         </Button>
337       </div>
338     }
339     title={
340       <span
341         className="text-middle"
342       >
343         <img
344           alt=""
345           className="spacer-right"
346           height="24"
347           src="/images/alm/bitbucket.svg"
348         />
349         onboarding.create_project.from_bbs
350       </span>
351     }
352   />
353   <BitbucketImportRepositoryForm
354     disableRepositories={false}
355     onSearch={[MockFunction]}
356     onSelectRepository={[MockFunction]}
357     projectRepositories={
358       Object {
359         "foo": Object {
360           "allShown": true,
361           "repositories": Array [
362             Object {
363               "id": 1,
364               "name": "Repo",
365               "projectKey": "project",
366               "slug": "project__repo",
367             },
368           ],
369         },
370       }
371     }
372     projects={
373       Array [
374         Object {
375           "id": 1,
376           "key": "foo",
377           "name": "Project",
378         },
379       ]
380     }
381     searching={false}
382     selectedRepository={
383       Object {
384         "id": 1,
385         "name": "Repo",
386         "projectKey": "project",
387         "slug": "project__repo",
388       }
389     }
390   />
391 </Fragment>
392 `;