2022-11-10 17:51:08 +00:00
|
|
|
// The goal of this test is to check the color of the "no result" links.
|
2023-04-11 17:11:34 +00:00
|
|
|
go-to: "file://" + |DOC_PATH| + "/lib2/index.html?search=sdkfskjfsdks"
|
2022-11-10 17:51:08 +00:00
|
|
|
show-text: true
|
|
|
|
|
|
|
|
define-function: (
|
|
|
|
"check-no-result",
|
|
|
|
(theme, link, link_hover),
|
2023-01-06 14:18:51 +00:00
|
|
|
block {
|
2022-11-10 17:51:08 +00:00
|
|
|
// Changing theme.
|
2023-04-11 17:11:34 +00:00
|
|
|
set-local-storage: {"rustdoc-theme": |theme|, "rustdoc-use-system-theme": "false"}
|
2023-01-06 14:18:51 +00: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 17:51:08 +00:00
|
|
|
// Moving the cursor to some other place to not create issues with next function run.
|
2023-01-06 14:18:51 +00:00
|
|
|
move-cursor-to: ".search-input"
|
|
|
|
},
|
2022-11-10 17:51:08 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
call-function: ("check-no-result", {
|
|
|
|
"theme": "ayu",
|
|
|
|
"link": "rgb(57, 175, 215)",
|
|
|
|
"link_hover": "rgb(57, 175, 215)",
|
|
|
|
})
|
|
|
|
call-function: ("check-no-result", {
|
|
|
|
"theme": "dark",
|
2022-11-11 19:39:20 +00:00
|
|
|
"link": "rgb(210, 153, 29)",
|
|
|
|
"link_hover": "rgb(210, 153, 29)",
|
2022-11-10 17:51:08 +00:00
|
|
|
})
|
|
|
|
call-function: ("check-no-result", {
|
|
|
|
"theme": "light",
|
|
|
|
"link": "rgb(56, 115, 173)",
|
|
|
|
"link_hover": "rgb(56, 115, 173)",
|
|
|
|
})
|