2021-07-15 20:12:28 +00:00
|
|
|
// 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"})
|
2021-07-16 15:04:49 +00:00
|
|
|
// Closing the sidebar menu.
|
|
|
|
click: ".sidebar-menu"
|
|
|
|
assert-css: (".sidebar-elems", {"display": "block", "left": "-246px"})
|
|
|
|
// Force the sidebar open by focusing a link inside it.
|
|
|
|
// This makes it easier for keyboard users to get to it.
|
|
|
|
focus: ".sidebar-title"
|
|
|
|
assert-css: (".sidebar-elems", {"display": "block", "left": "0px"})
|
|
|
|
// When we tab out of the sidebar, close it.
|
|
|
|
focus: ".search-input"
|
|
|
|
assert-css: (".sidebar-elems", {"display": "block", "left": "-246px"})
|