]> source.dussan.org Git - sonarqube.git/blob
25ae668483f318a7669e5d1b4560e7d7214fbaf1
[sonarqube.git] /
1 // Jest Snapshot v1, https://goo.gl/fbAQLP
2
3 exports[`should render correctly: changed value 1`] = `
4 <div
5   className="settings-definition settings-definition-changed"
6   data-key="foo"
7 >
8   <div
9     className="settings-definition-left"
10   >
11     <h3
12       className="settings-definition-name"
13     />
14     <div
15       className="settings-definition-key note little-spacer-top"
16     >
17       settings.key_x.foo
18     </div>
19   </div>
20   <div
21     className="settings-definition-right"
22   >
23     <div
24       className="settings-definition-state"
25     />
26     <form
27       onSubmit={[Function]}
28     >
29       <Input
30         hasValueChanged={true}
31         onCancel={[MockFunction]}
32         onChange={[MockFunction]}
33         onSave={[MockFunction]}
34         setting={
35           Object {
36             "definition": Object {
37               "category": "foo category",
38               "fields": Array [],
39               "key": "foo",
40               "options": Array [],
41               "subCategory": "foo subCat",
42             },
43             "hasValue": false,
44             "key": "foo",
45           }
46         }
47         value="new value"
48       />
49       <DefinitionActions
50         changedValue="new value"
51         hasError={false}
52         hasValueChanged={true}
53         isDefault={false}
54         onCancel={[MockFunction]}
55         onReset={[MockFunction]}
56         onSave={[MockFunction]}
57         setting={
58           Object {
59             "definition": Object {
60               "category": "foo category",
61               "fields": Array [],
62               "key": "foo",
63               "options": Array [],
64               "subCategory": "foo subCat",
65             },
66             "hasValue": false,
67             "key": "foo",
68           }
69         }
70       />
71     </form>
72   </div>
73 </div>
74 `;
75
76 exports[`should render correctly: in error 1`] = `
77 <div
78   className="settings-definition"
79   data-key="foo"
80 >
81   <div
82     className="settings-definition-left"
83   >
84     <h3
85       className="settings-definition-name"
86     />
87     <div
88       className="settings-definition-key note little-spacer-top"
89     >
90       settings.key_x.foo
91     </div>
92   </div>
93   <div
94     className="settings-definition-right"
95   >
96     <div
97       className="settings-definition-state"
98     >
99       <span
100         className="text-danger"
101       >
102         <AlertErrorIcon
103           className="spacer-right"
104         />
105         <span>
106           settings.state.validation_failed.validation message
107         </span>
108       </span>
109     </div>
110     <form
111       onSubmit={[Function]}
112     >
113       <Input
114         hasValueChanged={false}
115         onCancel={[MockFunction]}
116         onChange={[MockFunction]}
117         onSave={[MockFunction]}
118         setting={
119           Object {
120             "definition": Object {
121               "category": "foo category",
122               "fields": Array [],
123               "key": "foo",
124               "options": Array [],
125               "subCategory": "foo subCat",
126             },
127             "hasValue": false,
128             "key": "foo",
129           }
130         }
131       />
132       <DefinitionActions
133         hasError={true}
134         hasValueChanged={false}
135         isDefault={false}
136         onCancel={[MockFunction]}
137         onReset={[MockFunction]}
138         onSave={[MockFunction]}
139         setting={
140           Object {
141             "definition": Object {
142               "category": "foo category",
143               "fields": Array [],
144               "key": "foo",
145               "options": Array [],
146               "subCategory": "foo subCat",
147             },
148             "hasValue": false,
149             "key": "foo",
150           }
151         }
152       />
153     </form>
154   </div>
155 </div>
156 `;
157
158 exports[`should render correctly: loading 1`] = `
159 <div
160   className="settings-definition"
161   data-key="foo"
162 >
163   <div
164     className="settings-definition-left"
165   >
166     <h3
167       className="settings-definition-name"
168     />
169     <div
170       className="settings-definition-key note little-spacer-top"
171     >
172       settings.key_x.foo
173     </div>
174   </div>
175   <div
176     className="settings-definition-right"
177   >
178     <div
179       className="settings-definition-state"
180     >
181       <span
182         className="text-info"
183       >
184         <i
185           className="spinner spacer-right"
186         />
187         settings.state.saving
188       </span>
189     </div>
190     <form
191       onSubmit={[Function]}
192     >
193       <Input
194         hasValueChanged={false}
195         onCancel={[MockFunction]}
196         onChange={[MockFunction]}
197         onSave={[MockFunction]}
198         setting={
199           Object {
200             "definition": Object {
201               "category": "foo category",
202               "fields": Array [],
203               "key": "foo",
204               "options": Array [],
205               "subCategory": "foo subCat",
206             },
207             "hasValue": false,
208             "key": "foo",
209           }
210         }
211       />
212       <DefinitionActions
213         hasError={false}
214         hasValueChanged={false}
215         isDefault={false}
216         onCancel={[MockFunction]}
217         onReset={[MockFunction]}
218         onSave={[MockFunction]}
219         setting={
220           Object {
221             "definition": Object {
222               "category": "foo category",
223               "fields": Array [],
224               "key": "foo",
225               "options": Array [],
226               "subCategory": "foo subCat",
227             },
228             "hasValue": false,
229             "key": "foo",
230           }
231         }
232       />
233     </form>
234   </div>
235 </div>
236 `;
237
238 exports[`should render correctly: original value 1`] = `
239 <div
240   className="settings-definition"
241   data-key="foo"
242 >
243   <div
244     className="settings-definition-left"
245   >
246     <h3
247       className="settings-definition-name"
248     />
249     <div
250       className="settings-definition-key note little-spacer-top"
251     >
252       settings.key_x.foo
253     </div>
254   </div>
255   <div
256     className="settings-definition-right"
257   >
258     <div
259       className="settings-definition-state"
260     />
261     <form
262       onSubmit={[Function]}
263     >
264       <Input
265         hasValueChanged={false}
266         onCancel={[MockFunction]}
267         onChange={[MockFunction]}
268         onSave={[MockFunction]}
269         setting={
270           Object {
271             "definition": Object {
272               "category": "foo category",
273               "fields": Array [],
274               "key": "foo",
275               "options": Array [],
276               "subCategory": "foo subCat",
277             },
278             "hasValue": true,
279             "key": "foo",
280             "value": "original value",
281           }
282         }
283         value="original value"
284       />
285       <DefinitionActions
286         hasError={false}
287         hasValueChanged={false}
288         isDefault={false}
289         onCancel={[MockFunction]}
290         onReset={[MockFunction]}
291         onSave={[MockFunction]}
292         setting={
293           Object {
294             "definition": Object {
295               "category": "foo category",
296               "fields": Array [],
297               "key": "foo",
298               "options": Array [],
299               "subCategory": "foo subCat",
300             },
301             "hasValue": true,
302             "key": "foo",
303             "value": "original value",
304           }
305         }
306       />
307     </form>
308   </div>
309 </div>
310 `;
311
312 exports[`should render correctly: success 1`] = `
313 <div
314   className="settings-definition"
315   data-key="foo"
316 >
317   <div
318     className="settings-definition-left"
319   >
320     <h3
321       className="settings-definition-name"
322     />
323     <div
324       className="settings-definition-key note little-spacer-top"
325     >
326       settings.key_x.foo
327     </div>
328   </div>
329   <div
330     className="settings-definition-right"
331   >
332     <div
333       className="settings-definition-state"
334     >
335       <span
336         className="text-success"
337       >
338         <AlertSuccessIcon
339           className="spacer-right"
340         />
341         settings.state.saved
342       </span>
343     </div>
344     <form
345       onSubmit={[Function]}
346     >
347       <Input
348         hasValueChanged={false}
349         onCancel={[MockFunction]}
350         onChange={[MockFunction]}
351         onSave={[MockFunction]}
352         setting={
353           Object {
354             "definition": Object {
355               "category": "foo category",
356               "fields": Array [],
357               "key": "foo",
358               "options": Array [],
359               "subCategory": "foo subCat",
360             },
361             "hasValue": false,
362             "key": "foo",
363           }
364         }
365       />
366       <DefinitionActions
367         hasError={false}
368         hasValueChanged={false}
369         isDefault={false}
370         onCancel={[MockFunction]}
371         onReset={[MockFunction]}
372         onSave={[MockFunction]}
373         setting={
374           Object {
375             "definition": Object {
376               "category": "foo category",
377               "fields": Array [],
378               "key": "foo",
379               "options": Array [],
380               "subCategory": "foo subCat",
381             },
382             "hasValue": false,
383             "key": "foo",
384           }
385         }
386       />
387     </form>
388   </div>
389 </div>
390 `;
391
392 exports[`should render correctly: with description 1`] = `
393 <div
394   className="settings-definition"
395   data-key="foo"
396 >
397   <div
398     className="settings-definition-left"
399   >
400     <h3
401       className="settings-definition-name"
402     />
403     <div
404       className="markdown small spacer-top"
405       dangerouslySetInnerHTML={
406         Object {
407           "__html": "description",
408         }
409       }
410     />
411     <div
412       className="settings-definition-key note little-spacer-top"
413     >
414       settings.key_x.foo
415     </div>
416   </div>
417   <div
418     className="settings-definition-right"
419   >
420     <div
421       className="settings-definition-state"
422     />
423     <form
424       onSubmit={[Function]}
425     >
426       <Input
427         hasValueChanged={false}
428         onCancel={[MockFunction]}
429         onChange={[MockFunction]}
430         onSave={[MockFunction]}
431         setting={
432           Object {
433             "definition": Object {
434               "category": "foo category",
435               "description": "description",
436               "fields": Array [],
437               "key": "foo",
438               "options": Array [],
439               "subCategory": "foo subCat",
440             },
441             "hasValue": false,
442             "key": "foo",
443           }
444         }
445       />
446       <DefinitionActions
447         hasError={false}
448         hasValueChanged={false}
449         isDefault={false}
450         onCancel={[MockFunction]}
451         onReset={[MockFunction]}
452         onSave={[MockFunction]}
453         setting={
454           Object {
455             "definition": Object {
456               "category": "foo category",
457               "description": "description",
458               "fields": Array [],
459               "key": "foo",
460               "options": Array [],
461               "subCategory": "foo subCat",
462             },
463             "hasValue": false,
464             "key": "foo",
465           }
466         }
467       />
468     </form>
469   </div>
470 </div>
471 `;