]> source.dussan.org Git - sonarqube.git/blob
ca075b1de558d98d9b5ad8dcba482c608234823c
[sonarqube.git] /
1 // Jest Snapshot v1, https://goo.gl/fbAQLP
2
3 exports[`should render the languages facet with the selected languages 1`] = `
4 <Filter
5   facet={
6     {
7       "cs": 4,
8       "java": 39,
9       "js": 1,
10     }
11   }
12   footer={
13     <SearchableFilterFooter
14       onQueryChange={[MockFunction]}
15       options={
16         [
17           {
18             "label": "Flex",
19             "value": "flex",
20           },
21           {
22             "label": "PHP",
23             "value": "php",
24           },
25           {
26             "label": "Python",
27             "value": "py",
28           },
29         ]
30       }
31       property="languages"
32       query={
33         {
34           "languages": [
35             "java",
36             "cs",
37           ],
38         }
39       }
40     />
41   }
42   header={
43     <FilterHeader
44       name="projects.facets.languages"
45     />
46   }
47   onQueryChange={[MockFunction]}
48   options={
49     [
50       "java",
51       "cs",
52       "js",
53     ]
54   }
55   property="languages"
56   renderAccessibleLabel={[Function]}
57   renderOption={[Function]}
58   value={
59     [
60       "java",
61       "cs",
62     ]
63   }
64 />
65 `;
66
67 exports[`should render the languages facet with the selected languages 2`] = `
68 <div
69   className="search-navigator-facet-box"
70   data-key="languages"
71 >
72   <FilterHeader
73     name="projects.facets.languages"
74   />
75   <ul
76     className="search-navigator-facet-list projects-facet-list"
77   >
78     <li
79       className="active"
80       key="java"
81     >
82       <button
83         aria-checked={true}
84         aria-label="projects.facets.label_text_x.projects.facets.languages.Java"
85         className="facet search-navigator-facet projects-facet button-link active"
86         data-key="java"
87         onClick={[Function]}
88         role="checkbox"
89         tabIndex={0}
90         type="button"
91       >
92         <span
93           className="facet-name"
94         >
95           <SearchableFilterOption
96             option={
97               {
98                 "key": "java",
99                 "name": "Java",
100               }
101             }
102             optionKey="java"
103           />
104         </span>
105         <span
106           className="facet-stat"
107         >
108           39
109         </span>
110       </button>
111     </li>
112     <li
113       className="active"
114       key="cs"
115     >
116       <button
117         aria-checked={true}
118         aria-label="projects.facets.label_text_x.projects.facets.languages.C#"
119         className="facet search-navigator-facet projects-facet button-link active"
120         data-key="cs"
121         onClick={[Function]}
122         role="checkbox"
123         tabIndex={0}
124         type="button"
125       >
126         <span
127           className="facet-name"
128         >
129           <SearchableFilterOption
130             option={
131               {
132                 "key": "cs",
133                 "name": "C#",
134               }
135             }
136             optionKey="cs"
137           />
138         </span>
139         <span
140           className="facet-stat"
141         >
142           4
143         </span>
144       </button>
145     </li>
146     <li
147       className=""
148       key="js"
149     >
150       <button
151         aria-checked={false}
152         aria-label="projects.facets.label_text_x.projects.facets.languages.JavaScript"
153         className="facet search-navigator-facet projects-facet button-link"
154         data-key="js"
155         onClick={[Function]}
156         role="checkbox"
157         tabIndex={0}
158         type="button"
159       >
160         <span
161           className="facet-name"
162         >
163           <SearchableFilterOption
164             option={
165               {
166                 "key": "js",
167                 "name": "JavaScript",
168               }
169             }
170             optionKey="js"
171           />
172         </span>
173         <span
174           className="facet-stat"
175         >
176           1
177         </span>
178       </button>
179     </li>
180   </ul>
181   <SearchableFilterFooter
182     onQueryChange={[MockFunction]}
183     options={
184       [
185         {
186           "label": "Flex",
187           "value": "flex",
188         },
189         {
190           "label": "PHP",
191           "value": "php",
192         },
193         {
194           "label": "Python",
195           "value": "py",
196         },
197       ]
198     }
199     property="languages"
200     query={
201       {
202         "languages": [
203           "java",
204           "cs",
205         ],
206       }
207     }
208   />
209 </div>
210 `;
211
212 exports[`should render the languages without the ones in the facet 1`] = `
213 <Filter
214   facet={
215     {
216       "cs": 4,
217       "java": 39,
218       "js": 1,
219     }
220   }
221   footer={
222     <SearchableFilterFooter
223       onQueryChange={[MockFunction]}
224       options={
225         [
226           {
227             "label": "Flex",
228             "value": "flex",
229           },
230           {
231             "label": "PHP",
232             "value": "php",
233           },
234           {
235             "label": "Python",
236             "value": "py",
237           },
238         ]
239       }
240       property="languages"
241       query={
242         {
243           "languages": null,
244         }
245       }
246     />
247   }
248   header={
249     <FilterHeader
250       name="projects.facets.languages"
251     />
252   }
253   onQueryChange={[MockFunction]}
254   options={
255     [
256       "java",
257       "cs",
258       "js",
259     ]
260   }
261   property="languages"
262   renderAccessibleLabel={[Function]}
263   renderOption={[Function]}
264 />
265 `;