rust/tests/rustdoc-gui/globals.goml
binarycat 00c104225f rustdoc: make srcIndex no longer a global variable
this is one-time initialization data, it can just
be a function parameter.

we also move the json parsing into createSrcSidebar
to save a few bytes.
2025-06-16 20:22:24 -05:00

22 lines
731 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}
// Form input
go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
write-into: (".search-input", "Foo")
press-key: 'Enter'
wait-for: "#search-tabs"
assert-window-property-false: {"searchIndex": 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: {"searchIndex": null}