fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1// Check that the various shortcuts are working. 2go-to: "file://" + |DOC_PATH| + "/test_docs/index.html" 3// We first check that the search input isn't already focused. 4assert-false: "input.search-input:focus" 5press-key: "s" 6assert: "input.search-input:focus" 7press-key: "Escape" 8assert-false: "input.search-input:focus" 9// We now check for the help popup. 10press-key: "?" 11assert-css: ("#help-button .popover", {"display": "block"}) 12press-key: "Escape" 13assert-css: ("#help-button .popover", {"display": "none"}) 14// Checking doc collapse and expand. 15// It should be displaying a "-": 16assert-text: ("#toggle-all-docs", "[−]") 17press-key: "-" 18wait-for-text: ("#toggle-all-docs", "[+]") 19assert-attribute: ("#toggle-all-docs", {"class": "will-expand"}) 20// Pressing it again shouldn't do anything. 21press-key: "-" 22assert-text: ("#toggle-all-docs", "[+]") 23assert-attribute: ("#toggle-all-docs", {"class": "will-expand"}) 24// Expanding now. 25press-key: "+" 26wait-for-text: ("#toggle-all-docs", "[−]") 27assert-attribute: ("#toggle-all-docs", {"class": ""}) 28// Pressing it again shouldn't do anything. 29press-key: "+" 30assert-text: ("#toggle-all-docs", "[−]") 31assert-attribute: ("#toggle-all-docs", {"class": ""})