]> source.dussan.org Git - sonarqube.git/blob
d39ae29d2d9e189255214326e00f4d44cfc7720a
[sonarqube.git] /
1 // Jest Snapshot v1, https://goo.gl/fbAQLP
2
3 exports[`should render correctly: loading 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/azure.svg"
32         />
33         onboarding.create_project.azure.title
34       </span>
35     }
36   />
37   <i
38     className="spinner"
39   />
40 </Fragment>
41 `;
42
43 exports[`should render correctly: no settings 1`] = `
44 <Fragment>
45   <CreateProjectPageHeader
46     title={
47       <span
48         className="text-middle"
49       >
50         <img
51           alt=""
52           className="spacer-right"
53           height="24"
54           src="/images/alm/azure.svg"
55         />
56         onboarding.create_project.azure.title
57       </span>
58     }
59   />
60   <WrongBindingCountAlert
61     alm="azure"
62     canAdmin={true}
63   />
64 </Fragment>
65 `;
66
67 exports[`should render correctly: project list 1`] = `
68 <Fragment>
69   <CreateProjectPageHeader
70     additionalActions={
71       <div
72         className="display-flex-center pull-right"
73       >
74         <DeferredSpinner
75           className="spacer-right"
76           loading={false}
77         />
78         <Button
79           className="button-large button-primary"
80           disabled={true}
81           onClick={[MockFunction]}
82         >
83           onboarding.create_project.import_selected_repo
84         </Button>
85       </div>
86     }
87     title={
88       <span
89         className="text-middle"
90       >
91         <img
92           alt=""
93           className="spacer-right"
94           height="24"
95           src="/images/alm/azure.svg"
96         />
97         onboarding.create_project.azure.title
98       </span>
99     }
100   />
101   <div
102     className="huge-spacer-bottom"
103   >
104     <SearchBox
105       onChange={[MockFunction]}
106       placeholder="onboarding.create_project.search_projects_repositories"
107     />
108   </div>
109   <DeferredSpinner
110     loading={false}
111   >
112     <AzureProjectsList
113       importing={false}
114       loadingRepositories={Object {}}
115       onOpenProject={[MockFunction]}
116       onSelectRepository={[MockFunction]}
117       projects={
118         Array [
119           Object {
120             "description": "Azure Project",
121             "name": "azure-project-1",
122           },
123         ]
124       }
125       repositories={
126         Object {
127           "azure-project-1": Array [
128             Object {
129               "name": "Azure repo 1",
130               "projectName": "Azure Project",
131             },
132           ],
133         }
134       }
135     />
136   </DeferredSpinner>
137 </Fragment>
138 `;
139
140 exports[`should render correctly: setting missing url, admin 1`] = `
141 <Fragment>
142   <CreateProjectPageHeader
143     additionalActions={false}
144     title={
145       <span
146         className="text-middle"
147       >
148         <img
149           alt=""
150           className="spacer-right"
151           height="24"
152           src="/images/alm/azure.svg"
153         />
154         onboarding.create_project.azure.title
155       </span>
156     }
157   />
158   <Alert
159     variant="error"
160   >
161     <FormattedMessage
162       defaultMessage="onboarding.create_project.azure.no_url.admin"
163       id="onboarding.create_project.azure.no_url.admin"
164       values={
165         Object {
166           "alm": "onboarding.alm.azure",
167           "url": <Link
168             to={
169               Object {
170                 "pathname": "/admin/settings",
171                 "search": "?category=almintegration",
172               }
173             }
174           >
175             settings.page
176           </Link>,
177         }
178       }
179     />
180   </Alert>
181 </Fragment>
182 `;
183
184 exports[`should render correctly: setting missing url, not admin 1`] = `
185 <Fragment>
186   <CreateProjectPageHeader
187     title={
188       <span
189         className="text-middle"
190       >
191         <img
192           alt=""
193           className="spacer-right"
194           height="24"
195           src="/images/alm/azure.svg"
196         />
197         onboarding.create_project.azure.title
198       </span>
199     }
200   />
201   <Alert
202     variant="error"
203   >
204     onboarding.create_project.azure.no_url
205   </Alert>
206 </Fragment>
207 `;
208
209 exports[`should render correctly: token form 1`] = `
210 <Fragment>
211   <CreateProjectPageHeader
212     additionalActions={false}
213     title={
214       <span
215         className="text-middle"
216       >
217         <img
218           alt=""
219           className="spacer-right"
220           height="24"
221           src="/images/alm/azure.svg"
222         />
223         onboarding.create_project.azure.title
224       </span>
225     }
226   />
227   <div
228     className="display-flex-justify-center"
229   >
230     <AzurePersonalAccessTokenForm
231       almSetting={
232         Object {
233           "alm": "azure",
234           "key": "key",
235           "url": "https://azure.company.com",
236         }
237       }
238       onPersonalAccessTokenCreate={[MockFunction]}
239       submitting={false}
240       validationFailed={false}
241     />
242   </div>
243 </Fragment>
244 `;