Skip to content

Commit 8f5404d

Browse files
Update GUI tests for logo display on very small screens
1 parent 906bdd3 commit 8f5404d

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

tests/rustdoc-gui/huge-logo.goml

+3-1
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,6 @@ size: (1280, 1024)
1818
assert-property: (".sub-logo-container", {"offsetWidth": "60", "offsetHeight": 60})
1919

2020
size: (400, 600)
21-
assert-property: (".sub-logo-container", {"offsetWidth": "35", "offsetHeight": 35})
21+
// 43 because 35px + 8px of margin
22+
assert-css: (".sub-logo-container > img", {"margin-bottom": "8px"})
23+
assert-property: (".sub-logo-container", {"offsetWidth": "35", "offsetHeight": 43})

tests/rustdoc-gui/source-code-page.goml

+5
Original file line numberDiff line numberDiff line change
@@ -216,3 +216,8 @@ call-function: ("check-sidebar-dir-entry", {
216216
"x": 0,
217217
"y": |source_sidebar_title_y| + |source_sidebar_title_height| + 6,
218218
})
219+
220+
// Now we check that the logo has a bottom margin so it's not stuck to the search input.
221+
assert-css: (".sub-logo-container > img", {"margin-bottom": "8px"})
222+
store-property: (logo_height, ".sub-logo-container", "clientHeight")
223+
assert-position: (".search-form", {"y": |logo_height| + 8})

0 commit comments

Comments
 (0)