]> git.lizzy.rs Git - rust.git/blobdiff - src/test/rustdoc-gui/sidebar-mobile.goml
Rollup merge of #103382 - compiler-errors:anon-apit-lt-region-ice, r=cjgillot
[rust.git] / src / test / rustdoc-gui / sidebar-mobile.goml
index 4b3ec79273d4076a60a6aaf29f57917a173e8037..453873f1b81b6f36270e0f751bd7511d1fb797e8 100644 (file)
@@ -23,6 +23,11 @@ assert-css: (".sidebar", {"display": "block", "left": "-1000px"})
 click: ".sidebar-menu-toggle"
 assert-css: (".sidebar", {"left": "0px"})
 
+// Make sure the "struct Foo" header is hidden, since the mobile topbar already does it.
+assert-css: ("//nav[contains(@class, 'sidebar')]//h2/a[text()='Foo']/parent::h2", {"display": "none"})
+// Make sure the global navigation is still here.
+assert-css: ("//nav[contains(@class, 'sidebar')]//h2/a[text()='In test_docs']/parent::h2", {"display": "block"})
+
 // Click elsewhere.
 click: "body"
 assert-css: (".sidebar", {"display": "block", "left": "-1000px"})
@@ -39,7 +44,7 @@ assert-position: ("#method\.must_use", {"y": 45})
 // Check that the bottom-most item on the sidebar menu can be scrolled fully into view.
 click: ".sidebar-menu-toggle"
 scroll-to: ".block.keyword li:nth-child(1)"
-compare-elements-position-near: (".block.keyword li:nth-child(1)", ".mobile-topbar", {"y": 543})
+compare-elements-position-near: (".block.keyword li:nth-child(1)", ".mobile-topbar", {"y": 543.19})
 
 // Now checking the background color of the sidebar.
 show-text: true