Skip to content

Commit 6471081

Browse files
Add rustdoc-gui test to ensure sidebars share the same image
1 parent dd579cc commit 6471081

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tests/rustdoc-gui/sidebar.goml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,14 @@ assert-position-false: (".sidebar-crate > h2 > a", {"x": -3})
199199
drag-and-drop: ((205, 100), (108, 100))
200200
assert-position: (".sidebar-crate > h2 > a", {"x": -3})
201201

202+
// Check that the mobile sidebar and the source sidebar use the same icon.
203+
store-css: (".mobile-topbar .sidebar-menu-toggle::before", {"content": image_url})
204+
// Then we go to a source page.
205+
click: ".main-heading .src"
206+
debug: true
207+
assert-css: ("#sidebar-button a::before", {"content": |image_url|})
208+
debug: false
209+
202210
// Configuration option to show TOC in sidebar.
203211
set-local-storage: {"rustdoc-hide-toc": "true"}
204212
go-to: "file://" + |DOC_PATH| + "/test_docs/enum.WhoLetTheDogOut.html"

0 commit comments

Comments
 (0)