]> source.dussan.org Git - sonarqube.git/blob
4e2ba5f9db31ab8f983b28e4f0e70cddc279a3ff
[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     <a
79       aria-label="projects.facets.label_text_x.projects.facets.languages.Java"
80       className="facet search-navigator-facet projects-facet active"
81       data-key="java"
82       href="#"
83       key="java"
84       onClick={[Function]}
85     >
86       <span
87         className="facet-name"
88       >
89         <SearchableFilterOption
90           option={
91             Object {
92               "key": "java",
93               "name": "Java",
94             }
95           }
96           optionKey="java"
97         />
98       </span>
99       <span
100         className="facet-stat"
101       >
102         39
103       </span>
104     </a>
105     <a
106       aria-label="projects.facets.label_text_x.projects.facets.languages.C#"
107       className="facet search-navigator-facet projects-facet active"
108       data-key="cs"
109       href="#"
110       key="cs"
111       onClick={[Function]}
112     >
113       <span
114         className="facet-name"
115       >
116         <SearchableFilterOption
117           option={
118             Object {
119               "key": "cs",
120               "name": "C#",
121             }
122           }
123           optionKey="cs"
124         />
125       </span>
126       <span
127         className="facet-stat"
128       >
129         4
130       </span>
131     </a>
132     <a
133       aria-label="projects.facets.label_text_x.projects.facets.languages.JavaScript"
134       className="facet search-navigator-facet projects-facet"
135       data-key="js"
136       href="#"
137       key="js"
138       onClick={[Function]}
139     >
140       <span
141         className="facet-name"
142       >
143         <SearchableFilterOption
144           option={
145             Object {
146               "key": "js",
147               "name": "JavaScript",
148             }
149           }
150           optionKey="js"
151         />
152       </span>
153       <span
154         className="facet-stat"
155       >
156         1
157       </span>
158     </a>
159   </div>
160   <SearchableFilterFooter
161     onQueryChange={[MockFunction]}
162     options={
163       Array [
164         Object {
165           "label": "Flex",
166           "value": "flex",
167         },
168         Object {
169           "label": "PHP",
170           "value": "php",
171         },
172         Object {
173           "label": "Python",
174           "value": "py",
175         },
176       ]
177     }
178     property="languages"
179     query={
180       Object {
181         "languages": Array [
182           "java",
183           "cs",
184         ],
185       }
186     }
187   />
188 </div>
189 `;
190
191 exports[`should render the languages without the ones in the facet 1`] = `
192 <Filter
193   facet={
194     Object {
195       "cs": 4,
196       "java": 39,
197       "js": 1,
198     }
199   }
200   footer={
201     <SearchableFilterFooter
202       onQueryChange={[MockFunction]}
203       options={
204         Array [
205           Object {
206             "label": "Flex",
207             "value": "flex",
208           },
209           Object {
210             "label": "PHP",
211             "value": "php",
212           },
213           Object {
214             "label": "Python",
215             "value": "py",
216           },
217         ]
218       }
219       property="languages"
220       query={
221         Object {
222           "languages": null,
223         }
224       }
225     />
226   }
227   header={
228     <FilterHeader
229       name="projects.facets.languages"
230     />
231   }
232   onQueryChange={[MockFunction]}
233   options={
234     Array [
235       "java",
236       "cs",
237       "js",
238     ]
239   }
240   property="languages"
241   renderAccessibleLabel={[Function]}
242   renderOption={[Function]}
243 />
244 `;