2021-02-25 15:05:02 -06:00
|
|
|
// Check that the various shortcuts are working.
|
2023-04-11 12:11:34 -05:00
|
|
|
go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
|
2021-02-25 15:05:02 -06: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 09:29:16 -05:00
|
|
|
assert-css: ("#help-button .popover", {"display": "block"})
|
2021-02-25 15:05:02 -06:00
|
|
|
press-key: "Escape"
|
2022-06-20 09:29:16 -05:00
|
|
|
assert-css: ("#help-button .popover", {"display": "none"})
|
2022-10-20 04:34:40 -05: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": ""})
|