@@ -26,6 +26,7 @@ wait-for-css: (".sidebar", {"width": "300px"})
26
26
assert-local-storage: {"rustdoc-source-sidebar-show": "true"}
27
27
click: ".sidebar a.selected"
28
28
goto: file://|DOC_PATH|/src/test_docs/lib.rs.html
29
+ wait-for-css: (".sidebar", {"width": "300px"})
29
30
assert-local-storage: {"rustdoc-source-sidebar-show": "true"}
30
31
31
32
// Now we check the display of the sidebar items.
@@ -169,8 +170,16 @@ assert-window-property: {"pageYOffset": "2519"}
169
170
// you click one of them, you probably want to actually see the file's contents, and not just
170
171
// make it the current selection.
171
172
click: "#sidebar-toggle"
172
- wait-for-css: (". sidebar", {"width ": "500px "})
173
+ wait-for-css: ("#source- sidebar", {"visibility ": "visible "})
173
174
assert-local-storage: {"rustdoc-source-sidebar-show": "true"}
174
175
click: ".sidebar a.selected"
175
176
goto: file://|DOC_PATH|/src/test_docs/lib.rs.html
177
+ wait-for-css: ("#source-sidebar", {"visibility": "hidden"})
178
+ assert-local-storage: {"rustdoc-source-sidebar-show": "false"}
179
+ // Resize back to desktop size, to check that the sidebar doesn't spontaneously open.
180
+ size: (1000, 1000)
181
+ wait-for-css: ("#source-sidebar", {"visibility": "hidden"})
176
182
assert-local-storage: {"rustdoc-source-sidebar-show": "false"}
183
+ click: "#sidebar-toggle"
184
+ wait-for-css: ("#source-sidebar", {"visibility": "visible"})
185
+ assert-local-storage: {"rustdoc-source-sidebar-show": "true"}
0 commit comments