Skip to content

Commit

Permalink
Rollup merge of rust-lang#118988 - notriddle:notriddle/varconst, r=Gu…
Browse files Browse the repository at this point in the history
…illaumeGomez

rustdoc: add regression test for JS data file loading

Follow up for rust-lang#118961
  • Loading branch information
matthiaskrgr authored Dec 15, 2023
2 parents b9d5ff7 + 6bbbff5 commit 7587b05
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions tests/rustdoc-gui/globals.goml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// 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: "#src-sidebar-toggle"
wait-for: "#src-sidebar details"
assert-window-property-false: {"srcIndex": null}
assert-window-property: {"searchIndex": null}

0 comments on commit 7587b05

Please sign in to comment.