2022-11-10 11:51:08 -06:00
|
|
|
// The goal of this test is to check the color of the "no result" links.
|
2023-04-11 12:11:34 -05:00
|
|
|
go-to: "file://" + |DOC_PATH| + "/lib2/index.html?search=sdkfskjfsdks"
|
2022-11-10 11:51:08 -06:00
|
|
|
show-text: true
|
|
|
|
|
|
|
|
define-function: (
|
|
|
|
"check-no-result",
|
|
|
|
(theme, link, link_hover),
|
2023-01-06 08:18:51 -06:00
|
|
|
block {
|
2022-11-10 11:51:08 -06:00
|
|
|
// Changing theme.
|
2023-04-11 12:11:34 -05:00
|
|
|
set-local-storage: {"rustdoc-theme": |theme|, "rustdoc-use-system-theme": "false"}
|
2023-01-06 08:18:51 -06:00
|
|
|
reload:
|
|
|
|
wait-for: "#results"
|
|
|
|
assert: ".search-failed.active"
|
|
|
|
assert-css: ("#results a", {"color": |link|}, ALL)
|
|
|
|
move-cursor-to: "#results a"
|
|
|
|
assert-css: ("#results a:hover", {"color": |link_hover|})
|
2022-11-10 11:51:08 -06:00
|
|
|
// Moving the cursor to some other place to not create issues with next function run.
|
2023-01-06 08:18:51 -06:00
|
|
|
move-cursor-to: ".search-input"
|
|
|
|
},
|
2022-11-10 11:51:08 -06:00
|
|
|
)
|
|
|
|
|
|
|
|
call-function: ("check-no-result", {
|
|
|
|
"theme": "ayu",
|
2023-09-10 07:10:10 -05:00
|
|
|
"link": "#39afd7",
|
|
|
|
"link_hover": "#39afd7",
|
2022-11-10 11:51:08 -06:00
|
|
|
})
|
|
|
|
call-function: ("check-no-result", {
|
|
|
|
"theme": "dark",
|
2023-09-10 07:10:10 -05:00
|
|
|
"link": "#d2991d",
|
|
|
|
"link_hover": "#d2991d",
|
2022-11-10 11:51:08 -06:00
|
|
|
})
|
|
|
|
call-function: ("check-no-result", {
|
|
|
|
"theme": "light",
|
2023-09-10 07:10:10 -05:00
|
|
|
"link": "#3873ad",
|
|
|
|
"link_hover": "#3873ad",
|
2022-11-10 11:51:08 -06:00
|
|
|
})
|