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