]> git.lizzy.rs Git - rust.git/blob - src/test/rustdoc-gui/shortcuts.goml
Rollup merge of #91834 - GuillaumeGomez:improve-gui-test-readability, r=jsha
[rust.git] / src / test / rustdoc-gui / shortcuts.goml
1 // Check that the various shortcuts are working.
2 goto: file://|DOC_PATH|/test_docs/index.html
3 // We first check that the search input isn't already focused.
4 assert-false: "input.search-input:focus"
5 press-key: "s"
6 assert: "input.search-input:focus"
7 press-key: "Escape"
8 assert-false: "input.search-input:focus"
9 // We now check for the help popup.
10 press-key: "?"
11 assert-css: ("#help", {"display": "flex"})
12 assert-false: "#help.hidden"
13 press-key: "Escape"
14 assert-css: ("#help.hidden", {"display": "none"})
15 // Check for the themes list.
16 assert-css: ("#theme-choices", {"display": "none"})
17 press-key: "t"
18 assert-css: ("#theme-choices", {"display": "block"})
19 press-key: "t"
20 // We ensure that 't' hides back the menu.
21 assert-css: ("#theme-choices", {"display": "none"})
22 press-key: "t"
23 assert-css: ("#theme-choices", {"display": "block"})
24 press-key: "Escape"
25 // We ensure that 'Escape' hides the menu too.
26 assert-css: ("#theme-choices", {"display": "none"})