Skip to content

Commit

Permalink
Add test for sidebar display value on mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez authored and pietroalbini committed Jul 26, 2021
1 parent e722a08 commit 2818e74
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/test/rustdoc-gui/sidebar-mobile.goml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// This test ensure that the sidebar isn't "hidden" on mobile but instead moved out of the viewport.
// This is especially important for devices for "text-first" content (like for users with
// sight issues).
goto: file://|DOC_PATH|/test_docs/struct.Foo.html
// Switching to "mobile view" by reducing the width to 600px.
size: (600, 600)
assert-css: (".sidebar-elems", {"display": "block", "left": "-246px"})
// Opening the sidebar menu.
click: ".sidebar-menu"
assert-css: (".sidebar-elems", {"display": "block", "left": "0px"})

0 comments on commit 2818e74

Please sign in to comment.