about summary refs log tree commit diff
path: root/src/test/rustdoc-gui
diff options
context:
space:
mode:
authorJacob Hoffman-Andrews <github@hoffman-andrews.com>2022-01-18 22:05:17 -0800
committerJacob Hoffman-Andrews <github@hoffman-andrews.com>2022-01-19 12:45:16 -0800
commit801ac0e24ff6269fe71d22d29b8482e2117b2f82 (patch)
treec7cf64d1ae73ab13367d82608b497de4b429c8fd /src/test/rustdoc-gui
parente5e2b0be26ea177527b60d355bd8f56cd473bd00 (diff)
downloadrust-801ac0e24ff6269fe71d22d29b8482e2117b2f82.tar.gz
rust-801ac0e24ff6269fe71d22d29b8482e2117b2f82.zip
Fix scroll offset when jumping to internal id
Diffstat (limited to 'src/test/rustdoc-gui')
-rw-r--r--src/test/rustdoc-gui/sidebar-mobile.goml6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/test/rustdoc-gui/sidebar-mobile.goml b/src/test/rustdoc-gui/sidebar-mobile.goml
index 547eb3fd1b3..680822b6ecb 100644
--- a/src/test/rustdoc-gui/sidebar-mobile.goml
+++ b/src/test/rustdoc-gui/sidebar-mobile.goml
@@ -29,3 +29,9 @@ assert-css: (".sidebar", {"display": "block", "left": "-1000px"})
 
 // Check that the topbar is visible
 assert-property: (".mobile-topbar", {"clientHeight": "45"})
+
+// Check that clicking an element from the sidebar scrolls to the right place
+// so the target is not obscured by the topbar.
+click: ".sidebar-menu-toggle"
+click: ".sidebar-links a"
+assert-position: ("#method\.must_use", {"y": 45})