]> git.lizzy.rs Git - rust.git/blob - src/test/rustdoc-gui/sidebar-source-code-display.goml
Rollup merge of #95547 - RalfJung:ptr-int-transmutes, r=scottmcm
[rust.git] / src / test / rustdoc-gui / sidebar-source-code-display.goml
1 // This test ensures that the elements in the sidebar are displayed correctly.
2 javascript: false
3 goto: file://|DOC_PATH|/src/test_docs/lib.rs.html
4 // Since the javascript is disabled, there shouldn't be a toggle.
5 assert-false: "#sidebar-toggle"
6 // For some reason, we need to wait a bit here because it seems like the transition on opacity
7 // is being applied whereas it can't be reproduced in a browser...
8 wait-for-css: (".sidebar > *", {"visibility": "hidden", "opacity": 0})
9
10 // Let's retry with javascript enabled.
11 javascript: true
12 reload:
13 wait-for: "#sidebar-toggle"
14 assert-css: ("#sidebar-toggle", {"visibility": "visible", "opacity": 1})
15 assert-css: (".sidebar > *:not(#sidebar-toggle)", {"visibility": "hidden", "opacity": 0})
16 // Let's expand the sidebar now.
17 click: "#sidebar-toggle"
18 // Because of the transition CSS, better wait a second before checking.
19 wait-for-css: ("#sidebar-toggle", {"visibility": "visible", "opacity": 1})
20 assert-css: (".sidebar > *:not(#sidebar-toggle)", {"visibility": "visible", "opacity": 1})