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