2021-02-25 21:05:02 +00:00
|
|
|
// Check that the various shortcuts are working.
|
2023-04-11 17:11:34 +00:00
|
|
|
go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
|
2021-02-25 21:05:02 +00:00
|
|
|
// We first check that the search input isn't already focused.
|
|
|
|
assert-false: "input.search-input:focus"
|
|
|
|
press-key: "s"
|
|
|
|
assert: "input.search-input:focus"
|
|
|
|
press-key: "Escape"
|
|
|
|
assert-false: "input.search-input:focus"
|
|
|
|
// We now check for the help popup.
|
|
|
|
press-key: "?"
|
2022-06-20 14:29:16 +00:00
|
|
|
assert-css: ("#help-button .popover", {"display": "block"})
|
2021-02-25 21:05:02 +00:00
|
|
|
press-key: "Escape"
|
2022-06-20 14:29:16 +00:00
|
|
|
assert-css: ("#help-button .popover", {"display": "none"})
|
2022-10-20 09:34:40 +00:00
|
|
|
// Checking doc collapse and expand.
|
|
|
|
// It should be displaying a "-":
|
|
|
|
assert-text: ("#toggle-all-docs", "[\u2212]")
|
|
|
|
press-key: "-"
|
|
|
|
wait-for-text: ("#toggle-all-docs", "[+]")
|
|
|
|
assert-attribute: ("#toggle-all-docs", {"class": "will-expand"})
|
|
|
|
// Pressing it again shouldn't do anything.
|
|
|
|
press-key: "-"
|
|
|
|
assert-text: ("#toggle-all-docs", "[+]")
|
|
|
|
assert-attribute: ("#toggle-all-docs", {"class": "will-expand"})
|
|
|
|
// Expanding now.
|
|
|
|
press-key: "+"
|
|
|
|
wait-for-text: ("#toggle-all-docs", "[\u2212]")
|
|
|
|
assert-attribute: ("#toggle-all-docs", {"class": ""})
|
|
|
|
// Pressing it again shouldn't do anything.
|
|
|
|
press-key: "+"
|
|
|
|
assert-text: ("#toggle-all-docs", "[\u2212]")
|
|
|
|
assert-attribute: ("#toggle-all-docs", {"class": ""})
|