2022-05-05 14:56:40 -05:00
|
|
|
// Checks that the reexports are present in the search index, can have
|
|
|
|
// doc aliases and are highligted when their ID is the hash of the page.
|
2023-04-11 12:11:34 -05:00
|
|
|
go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
|
|
|
|
set-local-storage: {"rustdoc-theme": "dark", "rustdoc-use-system-theme": "false"}
|
2022-05-05 14:56:40 -05:00
|
|
|
reload:
|
|
|
|
// First we check that the reexport has the correct ID and no background color.
|
|
|
|
assert-text: ("//*[@id='reexport.TheStdReexport']", "pub use ::std as TheStdReexport;")
|
|
|
|
assert-css: ("//*[@id='reexport.TheStdReexport']", {"background-color": "rgba(0, 0, 0, 0)"})
|
2024-04-01 14:11:22 -05:00
|
|
|
write-into: (".search-input", "TheStdReexport")
|
2022-07-16 06:53:43 -05:00
|
|
|
// To be SURE that the search will be run.
|
|
|
|
press-key: 'Enter'
|
2022-05-05 14:56:40 -05:00
|
|
|
wait-for: "//a[@class='result-import']"
|
|
|
|
assert-attribute: (
|
|
|
|
"//a[@class='result-import']",
|
|
|
|
{"href": "../test_docs/index.html#reexport.TheStdReexport"},
|
|
|
|
)
|
2023-06-03 09:22:19 -05:00
|
|
|
assert-text: ("a.result-import .result-name", "re-export test_docs::TheStdReexport")
|
2022-05-05 14:56:40 -05:00
|
|
|
click: "//a[@class='result-import']"
|
|
|
|
// We check that it has the background modified thanks to the focus.
|
2023-06-10 07:38:08 -05:00
|
|
|
wait-for-css: ("//*[@id='reexport.TheStdReexport']", {"background-color": "#494a3d"})
|
2022-05-05 14:56:40 -05:00
|
|
|
|
|
|
|
// We now check that the alias is working as well on the reexport.
|
2022-07-16 06:53:43 -05:00
|
|
|
// To be SURE that the search will be run.
|
|
|
|
press-key: 'Enter'
|
2024-04-01 14:11:22 -05:00
|
|
|
write-into: (".search-input", "AliasForTheStdReexport")
|
2022-05-05 14:56:40 -05:00
|
|
|
wait-for: "//a[@class='result-import']"
|
|
|
|
assert-text: (
|
2023-05-18 09:16:13 -05:00
|
|
|
"a.result-import .result-name",
|
2023-07-18 07:22:37 -05:00
|
|
|
"re-export AliasForTheStdReexport - see test_docs::TheStdReexport",
|
2022-05-05 14:56:40 -05:00
|
|
|
)
|
|
|
|
// Same thing again, we click on it to ensure the background is once again set as expected.
|
|
|
|
click: "//a[@class='result-import']"
|
2023-06-10 07:38:08 -05:00
|
|
|
wait-for-css: ("//*[@id='reexport.TheStdReexport']", {"background-color": "#494a3d"})
|