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 // To be SURE that the search will be run.
12 wait-for: "//a[@class='result-import']"
14 "//a[@class='result-import']",
15 {"href": "../test_docs/index.html#reexport.TheStdReexport"},
17 assert-text: ("//a[@class='result-import']", "test_docs::TheStdReexport")
18 click: "//a[@class='result-import']"
19 // We check that it has the background modified thanks to the focus.
20 wait-for-css: ("//*[@id='reexport.TheStdReexport']", {"background-color": "rgb(73, 74, 61)"})
22 // We now check that the alias is working as well on the reexport.
23 // To be SURE that the search will be run.
25 write: (".search-input", "AliasForTheStdReexport")
26 wait-for: "//a[@class='result-import']"
28 "//a[@class='result-import']",
29 "AliasForTheStdReexport - see test_docs::TheStdReexport",
31 // Same thing again, we click on it to ensure the background is once again set as expected.
32 click: "//a[@class='result-import']"
33 wait-for-css: ("//*[@id='reexport.TheStdReexport']", {"background-color": "rgb(73, 74, 61)"})