Update src/test/rustdoc-gui/sidebar-mobile-scroll.goml

Co-authored-by: Michael Howell <michael@notriddle.com>
This commit is contained in:
Jacob Hoffman-Andrews 2022-09-27 10:25:25 -07:00
parent 8846c0853d
commit b5b77a2959

View File

@ -6,7 +6,7 @@ assert-css: (".sidebar", {"display": "block", "left": "-1000px"})
// Scroll down.
scroll-to: "//h2[@id='blanket-implementations']"
assert-window-property: {"pageYOffset": "645"}
assert-window-property: {"pageYOffset": "639"}
// Open the sidebar menu.
click: ".sidebar-menu-toggle"
@ -21,11 +21,11 @@ assert-window-property: {"pageYOffset": "0"}
// Close the sidebar menu. Make sure the scroll position gets restored.
click: ".sidebar-menu-toggle"
wait-for-css: (".sidebar", {"left": "-1000px"})
assert-window-property: {"pageYOffset": "645"}
assert-window-property: {"pageYOffset": "639"}
// Now test that scrollability returns when the browser window is just resized.
click: ".sidebar-menu-toggle"
wait-for-css: (".sidebar", {"left": "0px"})
assert-window-property: {"pageYOffset": "0"}
size: (900, 600)
assert-window-property: {"pageYOffset": "645"}
assert-window-property: {"pageYOffset": "639"}