@@ -26,6 +26,7 @@ wait-for-css: (".sidebar", {"width": "300px"})
2626assert-local-storage: {"rustdoc-source-sidebar-show": "true"}
2727click: ".sidebar a.selected"
2828goto: file://|DOC_PATH|/src/test_docs/lib.rs.html
29+ wait-for-css: (".sidebar", {"width": "300px"})
2930assert-local-storage: {"rustdoc-source-sidebar-show": "true"}
3031
3132// Now we check the display of the sidebar items.
@@ -169,8 +170,16 @@ assert-window-property: {"pageYOffset": "2519"}
169170// you click one of them, you probably want to actually see the file's contents, and not just
170171// make it the current selection.
171172click: "#sidebar-toggle"
172- wait-for-css: (". sidebar", {"width ": "500px "})
173+ wait-for-css: ("#source- sidebar", {"visibility ": "visible "})
173174assert-local-storage: {"rustdoc-source-sidebar-show": "true"}
174175click: ".sidebar a.selected"
175176goto: 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"})
176182assert-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