rust/tests/rustdoc-gui/globals.goml
Michael Howell 859bbc5def rustdoc: clean up source sidebar hide button
This is a redesign of the feature, with parts pulled from
https://github.com/rust-lang/rust/pull/119049
but with a button that looks more like a button and matches the
one used on other sidebar pages.
2023-12-17 23:06:31 -07:00

25 lines
861 B
Plaintext

// Make sure search stores its data in `window`
// It needs to use a global to avoid racing on search-index.js and search.js
// https://github.com/rust-lang/rust/pull/118961
// URL query
go-to: "file://" + |DOC_PATH| + "/test_docs/index.html?search=sa'%3Bda'%3Bds"
wait-for: "#search-tabs"
assert-window-property-false: {"searchIndex": null}
assert-window-property: {"srcIndex": null}
// Form input
go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
write: (".search-input", "Foo")
press-key: 'Enter'
wait-for: "#search-tabs"
assert-window-property-false: {"searchIndex": null}
assert-window-property: {"srcIndex": null}
// source sidebar
go-to: "file://" + |DOC_PATH| + "/src/test_docs/lib.rs.html"
click: "#sidebar-button"
wait-for: "#src-sidebar details"
assert-window-property-false: {"srcIndex": null}
assert-window-property: {"searchIndex": null}