]> source.dussan.org Git - sonarqube.git/blob
fdfa7f616bfbd031053f9391b8a62970115f1a87
[sonarqube.git] /
1 // Jest Snapshot v1, https://goo.gl/fbAQLP
2
3 exports[`should render maximum 10 languages in the searchbox results 1`] = `
4 <Filter
5   facet={
6     Object {
7       "cs": 4,
8       "g": 1,
9       "java": 39,
10       "js": 1,
11     }
12   }
13   footer={
14     <SearchableFilterFooter
15       isFavorite={true}
16       options={
17         Array [
18           Object {
19             "label": "Flex",
20             "value": "flex",
21           },
22           Object {
23             "label": "PHP",
24             "value": "php",
25           },
26           Object {
27             "label": "Python",
28             "value": "py",
29           },
30           Object {
31             "label": "c",
32             "value": "c",
33           },
34           Object {
35             "label": "d",
36             "value": "d",
37           },
38           Object {
39             "label": "e",
40             "value": "e",
41           },
42           Object {
43             "label": "f",
44             "value": "f",
45           },
46           Object {
47             "label": "h",
48             "value": "h",
49           },
50           Object {
51             "label": "i",
52             "value": "i",
53           },
54           Object {
55             "label": "k",
56             "value": "k",
57           },
58         ]
59       }
60       property="languages"
61       query={
62         Object {
63           "languages": Array [
64             "java",
65             "g",
66           ],
67         }
68       }
69       router={
70         Object {
71           "push": [Function],
72         }
73       }
74     />
75   }
76   getFacetValueForOption={[Function]}
77   halfWidth={false}
78   header={
79     <FilterHeader
80       name="projects.facets.languages"
81     />
82   }
83   isFavorite={true}
84   options={
85     Array [
86       "java",
87       "cs",
88       "g",
89       "js",
90     ]
91   }
92   property="languages"
93   query={
94     Object {
95       "languages": Array [
96         "java",
97         "g",
98       ],
99     }
100   }
101   renderOption={[Function]}
102   value={
103     Array [
104       "java",
105       "g",
106     ]
107   }
108 />
109 `;
110
111 exports[`should render the languages facet with the selected languages 1`] = `
112 <Filter
113   facet={
114     Object {
115       "cs": 4,
116       "java": 39,
117       "js": 1,
118     }
119   }
120   footer={
121     <SearchableFilterFooter
122       isFavorite={true}
123       options={
124         Array [
125           Object {
126             "label": "Flex",
127             "value": "flex",
128           },
129           Object {
130             "label": "PHP",
131             "value": "php",
132           },
133           Object {
134             "label": "Python",
135             "value": "py",
136           },
137         ]
138       }
139       property="languages"
140       query={
141         Object {
142           "languages": Array [
143             "java",
144             "cs",
145           ],
146         }
147       }
148       router={
149         Object {
150           "push": [Function],
151         }
152       }
153     />
154   }
155   getFacetValueForOption={[Function]}
156   halfWidth={false}
157   header={
158     <FilterHeader
159       name="projects.facets.languages"
160     />
161   }
162   isFavorite={true}
163   options={
164     Array [
165       "java",
166       "cs",
167       "js",
168     ]
169   }
170   property="languages"
171   query={
172     Object {
173       "languages": Array [
174         "java",
175         "cs",
176       ],
177     }
178   }
179   renderOption={[Function]}
180   value={
181     Array [
182       "java",
183       "cs",
184     ]
185   }
186 />
187 `;
188
189 exports[`should render the languages facet with the selected languages 2`] = `
190 <div
191   className="search-navigator-facet-box"
192   data-key="languages"
193 >
194   <FilterHeader
195     name="projects.facets.languages"
196   />
197   <div
198     className="search-navigator-facet-list"
199   >
200     <Link
201       className="facet search-navigator-facet projects-facet active"
202       data-key="java"
203       onClick={[Function]}
204       onlyActiveOnIndex={false}
205       style={Object {}}
206       to={
207         Object {
208           "pathname": "/projects/favorite",
209           "query": Object {
210             "languages": "cs",
211           },
212         }
213       }
214     >
215       <span
216         className="facet-name"
217       >
218         <SearchableFilterOption
219           option={
220             Object {
221               "key": "java",
222               "name": "Java",
223             }
224           }
225           optionKey="java"
226         />
227       </span>
228       <span
229         className="facet-stat"
230       >
231         39
232       </span>
233     </Link>
234     <Link
235       className="facet search-navigator-facet projects-facet active"
236       data-key="cs"
237       onClick={[Function]}
238       onlyActiveOnIndex={false}
239       style={Object {}}
240       to={
241         Object {
242           "pathname": "/projects/favorite",
243           "query": Object {
244             "languages": "java",
245           },
246         }
247       }
248     >
249       <span
250         className="facet-name"
251       >
252         <SearchableFilterOption
253           option={
254             Object {
255               "key": "cs",
256               "name": "C#",
257             }
258           }
259           optionKey="cs"
260         />
261       </span>
262       <span
263         className="facet-stat"
264       >
265         4
266       </span>
267     </Link>
268     <Link
269       className="facet search-navigator-facet projects-facet"
270       data-key="js"
271       onClick={[Function]}
272       onlyActiveOnIndex={false}
273       style={Object {}}
274       to={
275         Object {
276           "pathname": "/projects/favorite",
277           "query": Object {
278             "languages": "java,cs,js",
279           },
280         }
281       }
282     >
283       <span
284         className="facet-name"
285       >
286         <SearchableFilterOption
287           option={
288             Object {
289               "key": "js",
290               "name": "JavaScript",
291             }
292           }
293           optionKey="js"
294         />
295       </span>
296       <span
297         className="facet-stat"
298       >
299         1
300       </span>
301     </Link>
302   </div>
303   <SearchableFilterFooter
304     isFavorite={true}
305     options={
306       Array [
307         Object {
308           "label": "Flex",
309           "value": "flex",
310         },
311         Object {
312           "label": "PHP",
313           "value": "php",
314         },
315         Object {
316           "label": "Python",
317           "value": "py",
318         },
319       ]
320     }
321     property="languages"
322     query={
323       Object {
324         "languages": Array [
325           "java",
326           "cs",
327         ],
328       }
329     }
330     router={
331       Object {
332         "push": [Function],
333       }
334     }
335   />
336 </div>
337 `;
338
339 exports[`should render the languages without the ones in the facet 1`] = `
340 <Filter
341   facet={
342     Object {
343       "cs": 4,
344       "java": 39,
345       "js": 1,
346     }
347   }
348   footer={
349     <SearchableFilterFooter
350       options={
351         Array [
352           Object {
353             "label": "Flex",
354             "value": "flex",
355           },
356           Object {
357             "label": "PHP",
358             "value": "php",
359           },
360           Object {
361             "label": "Python",
362             "value": "py",
363           },
364         ]
365       }
366       property="languages"
367       query={
368         Object {
369           "languages": null,
370         }
371       }
372       router={
373         Object {
374           "push": [Function],
375         }
376       }
377     />
378   }
379   getFacetValueForOption={[Function]}
380   halfWidth={false}
381   header={
382     <FilterHeader
383       name="projects.facets.languages"
384     />
385   }
386   options={
387     Array [
388       "java",
389       "cs",
390       "js",
391     ]
392   }
393   property="languages"
394   query={
395     Object {
396       "languages": null,
397     }
398   }
399   renderOption={[Function]}
400 />
401 `;