Skip to content

Commit 48dd9ab

Browse files
committed
rustdoc: add test cases for mile wide bar
1 parent 3924493 commit 48dd9ab

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

tests/rustdoc-gui/huge-logo.goml

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ set-window-size: (1280, 1024)
77
assert-property: (".sidebar-crate .logo-container", {"offsetWidth": "96", "offsetHeight": 48})
88
// offsetWidth = width of sidebar, offsetHeight = height + top padding
99
assert-property: (".sidebar-crate .logo-container img", {"offsetWidth": "48", "offsetHeight": 64})
10+
assert-css: (".sidebar-crate .logo-container img", {"border-top-width": "16px", "margin-top": "-16px"})
1011

1112
set-window-size: (400, 600)
1213
// offset = size + margin

tests/rustdoc-gui/sidebar.goml

+5
Original file line numberDiff line numberDiff line change
@@ -179,3 +179,8 @@ assert-property: (".sidebar .sidebar-crate h2 a", {
179179
"offsetTop": |index_sidebar_y|,
180180
"offsetLeft": |index_sidebar_x|,
181181
})
182+
183+
// Check that the sidebar links touch the left side of the box
184+
go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
185+
assert-position: (".sidebar .block a", {"x": -4})
186+
assert-position: (".sidebar-crate > h2 > a", {"x": -3})

0 commit comments

Comments
 (0)