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