From 2818e74c38507525938aaa639eb7ad23f0b03efb Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Thu, 15 Jul 2021 22:12:28 +0200 Subject: [PATCH] Add test for sidebar display value on mobile --- src/test/rustdoc-gui/sidebar-mobile.goml | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 src/test/rustdoc-gui/sidebar-mobile.goml diff --git a/src/test/rustdoc-gui/sidebar-mobile.goml b/src/test/rustdoc-gui/sidebar-mobile.goml new file mode 100644 index 0000000000000..9a1442e48a9ea --- /dev/null +++ b/src/test/rustdoc-gui/sidebar-mobile.goml @@ -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"})