diff options
| author | Jacob Hoffman-Andrews <github@hoffman-andrews.com> | 2022-01-11 18:27:44 -0800 |
|---|---|---|
| committer | Jacob Hoffman-Andrews <github@hoffman-andrews.com> | 2022-01-17 12:01:35 -0800 |
| commit | b71f1fb0027cf49909d8597fcc90a77d5f573cc3 (patch) | |
| tree | c75adb3b42fe251979f062d197ed0e7f2ef1bf99 /src/test | |
| parent | ee5d8d37baaf5b5a81a98396952839c73ae41c68 (diff) | |
Hide mobile sidebar on some clicks
When the user clicks outside the sidebar, the sidebar should close. Also, when the user clicks an internal link in the sidebar, it should close.
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/rustdoc-gui/sidebar-mobile.goml | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/test/rustdoc-gui/sidebar-mobile.goml b/src/test/rustdoc-gui/sidebar-mobile.goml index 7138f916675..eecd584bca9 100644 --- a/src/test/rustdoc-gui/sidebar-mobile.goml +++ b/src/test/rustdoc-gui/sidebar-mobile.goml @@ -18,3 +18,11 @@ 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"}) + +// Open the sidebar menu. +click: ".sidebar-menu" +assert-css: (".sidebar-elems", {"left": "0px"}) + +// Click elsewhere. +click: "body" +assert-css: (".sidebar-elems", {"left": "-246px"}) |
