1 // Checks that the reexports are present in the search index, can have
2 // doc aliases and are highligted when their ID is the hash of the page.
3 goto: file://|DOC_PATH|/test_docs/index.html
4 local-storage: {"rustdoc-theme": "dark", "rustdoc-use-system-theme": "false"}
6 // First we check that the reexport has the correct ID and no background color.
7 assert-text: ("//*[@id='reexport.TheStdReexport']", "pub use ::std as TheStdReexport;")
8 assert-css: ("//*[@id='reexport.TheStdReexport']", {"background-color": "rgba(0, 0, 0, 0)"})
9 write: (".search-input", "TheStdReexport")
10 wait-for: "//a[@class='result-import']"
12 "//a[@class='result-import']",
13 {"href": "../test_docs/index.html#reexport.TheStdReexport"},
15 assert-text: ("//a[@class='result-import']", "test_docs::TheStdReexport")
16 click: "//a[@class='result-import']"
17 // We check that it has the background modified thanks to the focus.
18 wait-for-css: ("//*[@id='reexport.TheStdReexport']", {"background-color": "rgb(73, 74, 61)"})
20 // We now check that the alias is working as well on the reexport.
21 write: (".search-input", "AliasForTheStdReexport")
22 wait-for: "//a[@class='result-import']"
24 "//a[@class='result-import']",
25 "AliasForTheStdReexport - see test_docs::TheStdReexport",
27 // Same thing again, we click on it to ensure the background is once again set as expected.
28 click: "//a[@class='result-import']"
29 wait-for-css: ("//*[@id='reexport.TheStdReexport']", {"background-color": "rgb(73, 74, 61)"})