1 // This test ensure that the sidebar isn't "hidden" on mobile but instead moved out of the viewport.
2 // This is especially important for devices for "text-first" content (like for users with
4 goto: file://|DOC_PATH|/test_docs/struct.Foo.html
5 // Switching to "mobile view" by reducing the width to 600px.
7 assert-css: (".sidebar-elems", {"display": "block", "left": "-246px"})
8 // Opening the sidebar menu.
10 assert-css: (".sidebar-elems", {"display": "block", "left": "0px"})
11 // Closing the sidebar menu.
12 click: ".sidebar-menu"
13 assert-css: (".sidebar-elems", {"display": "block", "left": "-246px"})
14 // Force the sidebar open by focusing a link inside it.
15 // This makes it easier for keyboard users to get to it.
16 focus: ".sidebar-title a"
17 assert-css: (".sidebar-elems", {"display": "block", "left": "0px"})
18 // When we tab out of the sidebar, close it.
19 focus: ".search-input"
20 assert-css: (".sidebar-elems", {"display": "block", "left": "-246px"})