]> source.dussan.org Git - sonarqube.git/blob
aa7d7f0de0d6b1787354eb84690c62459bdf9d04
[sonarqube.git] /
1 // Jest Snapshot v1, https://goo.gl/fbAQLP
2
3 exports[`renders correctly: all permissions 1`] = `
4 <Fragment>
5   <ActionsDropdown
6     className=""
7     label="quality_profiles.actions.name.JavaScript"
8   >
9     <ActionsDropdownItem
10       className="it__quality-profiles__activate-more-rules"
11       to={
12         {
13           "pathname": "/coding_rules",
14           "search": "?qprofile=key&activation=false",
15         }
16       }
17     >
18       quality_profiles.activate_more_rules
19     </ActionsDropdownItem>
20     <ActionsDropdownItem
21       className="it__quality-profiles__backup"
22       download="key.xml"
23       to="/api/qualityprofiles/backup?language=js&qualityProfile=name"
24     >
25       backup_verb
26     </ActionsDropdownItem>
27     <ActionsDropdownItem
28       className="it__quality-profiles__compare"
29       to={
30         {
31           "pathname": "/profiles/compare",
32           "search": "?language=js&name=name",
33         }
34       }
35     >
36       compare
37     </ActionsDropdownItem>
38     <ActionsDropdownItem
39       className="it__quality-profiles__extend"
40       onClick={[Function]}
41       tooltipOverlay="quality_profiles.extend_help.name"
42       tooltipPlacement="left"
43     >
44       extend
45     </ActionsDropdownItem>
46     <ActionsDropdownItem
47       className="it__quality-profiles__copy"
48       onClick={[Function]}
49       tooltipOverlay="quality_profiles.copy_help.name"
50       tooltipPlacement="left"
51     >
52       copy
53     </ActionsDropdownItem>
54     <ActionsDropdownItem
55       className="it__quality-profiles__rename"
56       onClick={[Function]}
57     >
58       rename
59     </ActionsDropdownItem>
60     <ActionsDropdownItem
61       className="it__quality-profiles__set-as-default"
62       onClick={[Function]}
63     >
64       set_as_default
65     </ActionsDropdownItem>
66     <ActionsDropdownDivider />
67     <ActionsDropdownItem
68       className="it__quality-profiles__delete"
69       destructive={true}
70       onClick={[Function]}
71     >
72       delete
73     </ActionsDropdownItem>
74   </ActionsDropdown>
75 </Fragment>
76 `;
77
78 exports[`renders correctly: copy modal 1`] = `
79 <Fragment>
80   <ActionsDropdown
81     className=""
82     label="quality_profiles.actions.name.JavaScript"
83   >
84     <ActionsDropdownItem
85       className="it__quality-profiles__backup"
86       download="key.xml"
87       to="/api/qualityprofiles/backup?language=js&qualityProfile=name"
88     >
89       backup_verb
90     </ActionsDropdownItem>
91     <ActionsDropdownItem
92       className="it__quality-profiles__compare"
93       to={
94         {
95           "pathname": "/profiles/compare",
96           "search": "?language=js&name=name",
97         }
98       }
99     >
100       compare
101     </ActionsDropdownItem>
102   </ActionsDropdown>
103   <ProfileModalForm
104     action="COPY"
105     loading={false}
106     onClose={[Function]}
107     onSubmit={[Function]}
108     profile={
109       {
110         "activeDeprecatedRuleCount": 0,
111         "activeRuleCount": 68,
112         "childrenCount": 0,
113         "depth": 0,
114         "isBuiltIn": false,
115         "isDefault": false,
116         "isInherited": false,
117         "key": "key",
118         "language": "js",
119         "languageName": "JavaScript",
120         "name": "name",
121         "projectCount": 3,
122         "rulesUpdatedAt": "2017-06-28T12:58:44+0000",
123       }
124     }
125   />
126 </Fragment>
127 `;
128
129 exports[`renders correctly: delete modal 1`] = `
130 <Fragment>
131   <ActionsDropdown
132     className=""
133     label="quality_profiles.actions.name.JavaScript"
134   >
135     <ActionsDropdownItem
136       className="it__quality-profiles__backup"
137       download="key.xml"
138       to="/api/qualityprofiles/backup?language=js&qualityProfile=name"
139     >
140       backup_verb
141     </ActionsDropdownItem>
142     <ActionsDropdownItem
143       className="it__quality-profiles__compare"
144       to={
145         {
146           "pathname": "/profiles/compare",
147           "search": "?language=js&name=name",
148         }
149       }
150     >
151       compare
152     </ActionsDropdownItem>
153   </ActionsDropdown>
154   <DeleteProfileForm
155     loading={false}
156     onClose={[Function]}
157     onDelete={[Function]}
158     profile={
159       {
160         "activeDeprecatedRuleCount": 0,
161         "activeRuleCount": 68,
162         "childrenCount": 0,
163         "depth": 0,
164         "isBuiltIn": false,
165         "isDefault": false,
166         "isInherited": false,
167         "key": "key",
168         "language": "js",
169         "languageName": "JavaScript",
170         "name": "name",
171         "projectCount": 3,
172         "rulesUpdatedAt": "2017-06-28T12:58:44+0000",
173       }
174     }
175   />
176 </Fragment>
177 `;
178
179 exports[`renders correctly: edit only 1`] = `
180 <Fragment>
181   <ActionsDropdown
182     className=""
183     label="quality_profiles.actions.name.JavaScript"
184   >
185     <ActionsDropdownItem
186       className="it__quality-profiles__activate-more-rules"
187       to={
188         {
189           "pathname": "/coding_rules",
190           "search": "?qprofile=key&activation=false",
191         }
192       }
193     >
194       quality_profiles.activate_more_rules
195     </ActionsDropdownItem>
196     <ActionsDropdownItem
197       className="it__quality-profiles__backup"
198       download="key.xml"
199       to="/api/qualityprofiles/backup?language=js&qualityProfile=name"
200     >
201       backup_verb
202     </ActionsDropdownItem>
203     <ActionsDropdownItem
204       className="it__quality-profiles__compare"
205       to={
206         {
207           "pathname": "/profiles/compare",
208           "search": "?language=js&name=name",
209         }
210       }
211     >
212       compare
213     </ActionsDropdownItem>
214     <ActionsDropdownItem
215       className="it__quality-profiles__rename"
216       onClick={[Function]}
217     >
218       rename
219     </ActionsDropdownItem>
220   </ActionsDropdown>
221 </Fragment>
222 `;
223
224 exports[`renders correctly: extend modal 1`] = `
225 <Fragment>
226   <ActionsDropdown
227     className=""
228     label="quality_profiles.actions.name.JavaScript"
229   >
230     <ActionsDropdownItem
231       className="it__quality-profiles__backup"
232       download="key.xml"
233       to="/api/qualityprofiles/backup?language=js&qualityProfile=name"
234     >
235       backup_verb
236     </ActionsDropdownItem>
237     <ActionsDropdownItem
238       className="it__quality-profiles__compare"
239       to={
240         {
241           "pathname": "/profiles/compare",
242           "search": "?language=js&name=name",
243         }
244       }
245     >
246       compare
247     </ActionsDropdownItem>
248   </ActionsDropdown>
249   <ProfileModalForm
250     action="EXTEND"
251     loading={false}
252     onClose={[Function]}
253     onSubmit={[Function]}
254     profile={
255       {
256         "activeDeprecatedRuleCount": 0,
257         "activeRuleCount": 68,
258         "childrenCount": 0,
259         "depth": 0,
260         "isBuiltIn": false,
261         "isDefault": false,
262         "isInherited": false,
263         "key": "key",
264         "language": "js",
265         "languageName": "JavaScript",
266         "name": "name",
267         "projectCount": 3,
268         "rulesUpdatedAt": "2017-06-28T12:58:44+0000",
269       }
270     }
271   />
272 </Fragment>
273 `;
274
275 exports[`renders correctly: no permissions 1`] = `
276 <Fragment>
277   <ActionsDropdown
278     className=""
279     label="quality_profiles.actions.name.JavaScript"
280   >
281     <ActionsDropdownItem
282       className="it__quality-profiles__backup"
283       download="key.xml"
284       to="/api/qualityprofiles/backup?language=js&qualityProfile=name"
285     >
286       backup_verb
287     </ActionsDropdownItem>
288     <ActionsDropdownItem
289       className="it__quality-profiles__compare"
290       to={
291         {
292           "pathname": "/profiles/compare",
293           "search": "?language=js&name=name",
294         }
295       }
296     >
297       compare
298     </ActionsDropdownItem>
299   </ActionsDropdown>
300 </Fragment>
301 `;
302
303 exports[`renders correctly: rename modal 1`] = `
304 <Fragment>
305   <ActionsDropdown
306     className=""
307     label="quality_profiles.actions.name.JavaScript"
308   >
309     <ActionsDropdownItem
310       className="it__quality-profiles__backup"
311       download="key.xml"
312       to="/api/qualityprofiles/backup?language=js&qualityProfile=name"
313     >
314       backup_verb
315     </ActionsDropdownItem>
316     <ActionsDropdownItem
317       className="it__quality-profiles__compare"
318       to={
319         {
320           "pathname": "/profiles/compare",
321           "search": "?language=js&name=name",
322         }
323       }
324     >
325       compare
326     </ActionsDropdownItem>
327   </ActionsDropdown>
328   <ProfileModalForm
329     action="RENAME"
330     loading={false}
331     onClose={[Function]}
332     onSubmit={[Function]}
333     profile={
334       {
335         "activeDeprecatedRuleCount": 0,
336         "activeRuleCount": 68,
337         "childrenCount": 0,
338         "depth": 0,
339         "isBuiltIn": false,
340         "isDefault": false,
341         "isInherited": false,
342         "key": "key",
343         "language": "js",
344         "languageName": "JavaScript",
345         "name": "name",
346         "projectCount": 3,
347         "rulesUpdatedAt": "2017-06-28T12:58:44+0000",
348       }
349     }
350   />
351 </Fragment>
352 `;
353
354 exports[`should not allow to set a profile as the default if the profile has no active rules 1`] = `
355 <Fragment>
356   <ActionsDropdown
357     className=""
358     label="quality_profiles.actions.name.JavaScript"
359   >
360     <ActionsDropdownItem
361       className="it__quality-profiles__backup"
362       download="key.xml"
363       to="/api/qualityprofiles/backup?language=js&qualityProfile=name"
364     >
365       backup_verb
366     </ActionsDropdownItem>
367     <ActionsDropdownItem
368       className="it__quality-profiles__compare"
369       to={
370         {
371           "pathname": "/profiles/compare",
372           "search": "?language=js&name=name",
373         }
374       }
375     >
376       compare
377     </ActionsDropdownItem>
378     <li>
379       <Tooltip
380         overlay="quality_profiles.cannot_set_default_no_rules"
381         placement="left"
382       >
383         <span
384           className="it__quality-profiles__set-as-default text-muted-2"
385         >
386           set_as_default
387         </span>
388       </Tooltip>
389     </li>
390   </ActionsDropdown>
391 </Fragment>
392 `;