https://github.com/rust-lang/mdBook/pull/2608 accidentally broke the search "S" keybinding by using the wrong capitalization.
30 lines
997 B
Text
30 lines
997 B
Text
// This tests basic search behavior.
|
|
|
|
go-to: |DOC_PATH| + "index.html"
|
|
|
|
define-function: (
|
|
"open-search",
|
|
[],
|
|
block {
|
|
assert-css: ("#search-wrapper", {"display": "none"})
|
|
press-key: 's'
|
|
wait-for-css-false: ("#search-wrapper", {"display": "none"})
|
|
}
|
|
)
|
|
|
|
call-function: ("open-search", {})
|
|
assert-text: ("#searchresults-header", "")
|
|
write: "strikethrough"
|
|
wait-for-text: ("#searchresults-header", "2 search results for 'strikethrough':")
|
|
// Close the search display
|
|
press-key: 'Escape'
|
|
wait-for-css: ("#search-wrapper", {"display": "none"})
|
|
// Reopening the search should show the last value
|
|
call-function: ("open-search", {})
|
|
assert-text: ("#searchresults-header", "2 search results for 'strikethrough':")
|
|
// Navigate to a sub-chapter
|
|
go-to: "./individual/strikethrough.html"
|
|
assert-text: ("#searchresults-header", "")
|
|
call-function: ("open-search", {})
|
|
write: "strikethrough"
|
|
wait-for-text: ("#searchresults-header", "2 search results for 'strikethrough':")
|