]> source.dussan.org Git - sonarqube.git/blob
d603a20a60f11c463b6d5abbd1968b24560b227f
[sonarqube.git] /
1 // Jest Snapshot v1, https://goo.gl/fbAQLP
2
3 exports[`should not render the users organizations when they are not activated 1`] = `
4 <li
5   className="dropdown js-user-authenticated open"
6 >
7   <a
8     className="dropdown-toggle navbar-avatar"
9     href="#"
10     onClick={[Function]}
11   >
12     <Connect(Avatar)
13       hash="abcd1234"
14       name="foo"
15       size={24}
16     />
17   </a>
18   <ul
19     className="dropdown-menu dropdown-menu-right"
20   >
21     <li
22       className="dropdown-item"
23     >
24       <div
25         className="text-ellipsis text-muted"
26         title="foo"
27       >
28         <strong>
29           foo
30         </strong>
31       </div>
32       <div
33         className="little-spacer-top text-ellipsis text-muted"
34         title="foo@bar.baz"
35       >
36         foo@bar.baz
37       </div>
38     </li>
39     <li
40       className="divider"
41     />
42     <li>
43       <Link
44         onClick={[Function]}
45         onlyActiveOnIndex={false}
46         style={Object {}}
47         to="/account"
48       >
49         my_account.page
50       </Link>
51     </li>
52     <li>
53       <a
54         href="#"
55         onClick={[Function]}
56       >
57         layout.logout
58       </a>
59     </li>
60   </ul>
61 </li>
62 `;
63
64 exports[`should render the right interface for anonymous user 1`] = `
65 <li>
66   <a
67     className="navbar-login"
68     href="#"
69     onClick={[Function]}
70   >
71     layout.login
72   </a>
73 </li>
74 `;
75
76 exports[`should render the right interface for logged in user 1`] = `
77 <li
78   className="dropdown js-user-authenticated open"
79 >
80   <a
81     className="dropdown-toggle navbar-avatar"
82     href="#"
83     onClick={[Function]}
84   >
85     <Connect(Avatar)
86       hash="abcd1234"
87       name="foo"
88       size={24}
89     />
90   </a>
91   <ul
92     className="dropdown-menu dropdown-menu-right"
93   >
94     <li
95       className="dropdown-item"
96     >
97       <div
98         className="text-ellipsis text-muted"
99         title="foo"
100       >
101         <strong>
102           foo
103         </strong>
104       </div>
105       <div
106         className="little-spacer-top text-ellipsis text-muted"
107         title="foo@bar.baz"
108       >
109         foo@bar.baz
110       </div>
111     </li>
112     <li
113       className="divider"
114     />
115     <li>
116       <Link
117         onClick={[Function]}
118         onlyActiveOnIndex={false}
119         style={Object {}}
120         to="/account"
121       >
122         my_account.page
123       </Link>
124     </li>
125     <li>
126       <a
127         href="#"
128         onClick={[Function]}
129       >
130         layout.logout
131       </a>
132     </li>
133   </ul>
134 </li>
135 `;
136
137 exports[`should render the users organizations 1`] = `
138 <li
139   className="dropdown js-user-authenticated open"
140 >
141   <a
142     className="dropdown-toggle navbar-avatar"
143     href="#"
144     onClick={[Function]}
145   >
146     <Connect(Avatar)
147       hash="abcd1234"
148       name="foo"
149       size={24}
150     />
151   </a>
152   <ul
153     className="dropdown-menu dropdown-menu-right"
154   >
155     <li
156       className="dropdown-item"
157     >
158       <div
159         className="text-ellipsis text-muted"
160         title="foo"
161       >
162         <strong>
163           foo
164         </strong>
165       </div>
166       <div
167         className="little-spacer-top text-ellipsis text-muted"
168         title="foo@bar.baz"
169       >
170         foo@bar.baz
171       </div>
172     </li>
173     <li
174       className="divider"
175     />
176     <li>
177       <Link
178         onClick={[Function]}
179         onlyActiveOnIndex={false}
180         style={Object {}}
181         to="/account"
182       >
183         my_account.page
184       </Link>
185     </li>
186     <li
187       className="divider"
188       role="separator"
189     />
190     <li>
191       <Link
192         onClick={[Function]}
193         onlyActiveOnIndex={false}
194         style={Object {}}
195         to="/account/organizations"
196       >
197         my_organizations
198       </Link>
199     </li>
200     <li
201       key="bar"
202     >
203       <OrganizationLink
204         onClick={[Function]}
205         organization={
206           Object {
207             "key": "bar",
208             "name": "bar",
209           }
210         }
211       >
212         <OrganizationIcon />
213         <span
214           className="spacer-left"
215         >
216           bar
217         </span>
218       </OrganizationLink>
219     </li>
220     <li
221       key="foo"
222     >
223       <OrganizationLink
224         onClick={[Function]}
225         organization={
226           Object {
227             "key": "foo",
228             "name": "Foo",
229           }
230         }
231       >
232         <OrganizationIcon />
233         <span
234           className="spacer-left"
235         >
236           Foo
237         </span>
238       </OrganizationLink>
239     </li>
240     <li
241       key="myorg"
242     >
243       <OrganizationLink
244         onClick={[Function]}
245         organization={
246           Object {
247             "key": "myorg",
248             "name": "MyOrg",
249           }
250         }
251       >
252         <OrganizationIcon />
253         <span
254           className="spacer-left"
255         >
256           MyOrg
257         </span>
258       </OrganizationLink>
259     </li>
260     <li
261       className="divider"
262       role="separator"
263     />
264     <li>
265       <a
266         href="#"
267         onClick={[Function]}
268       >
269         layout.logout
270       </a>
271     </li>
272   </ul>
273 </li>
274 `;
275
276 exports[`should update the component correctly when the user changes to anonymous 1`] = `
277 <li
278   className="dropdown js-user-authenticated open"
279 >
280   <a
281     className="dropdown-toggle navbar-avatar"
282     href="#"
283     onClick={[Function]}
284   >
285     <Connect(Avatar)
286       hash="abcd1234"
287       name="foo"
288       size={24}
289     />
290   </a>
291   <ul
292     className="dropdown-menu dropdown-menu-right"
293   >
294     <li
295       className="dropdown-item"
296     >
297       <div
298         className="text-ellipsis text-muted"
299         title="foo"
300       >
301         <strong>
302           foo
303         </strong>
304       </div>
305       <div
306         className="little-spacer-top text-ellipsis text-muted"
307         title="foo@bar.baz"
308       >
309         foo@bar.baz
310       </div>
311     </li>
312     <li
313       className="divider"
314     />
315     <li>
316       <Link
317         onClick={[Function]}
318         onlyActiveOnIndex={false}
319         style={Object {}}
320         to="/account"
321       >
322         my_account.page
323       </Link>
324     </li>
325     <li>
326       <a
327         href="#"
328         onClick={[Function]}
329       >
330         layout.logout
331       </a>
332     </li>
333   </ul>
334 </li>
335 `;
336
337 exports[`should update the component correctly when the user changes to anonymous 2`] = `
338 <li>
339   <a
340     className="navbar-login"
341     href="#"
342     onClick={[Function]}
343   >
344     layout.login
345   </a>
346 </li>
347 `;