2022-11-10 17:51:08 +00:00
|
|
|
// The goal of this test is to check the color of the "no result" links.
|
2024-04-05 19:38:55 +00:00
|
|
|
include: "utils.goml"
|
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",
|
2024-04-01 19:11:22 +00:00
|
|
|
[theme, link, link_hover],
|
2023-01-06 14:18:51 +00:00
|
|
|
block {
|
2024-04-05 19:38:55 +00:00
|
|
|
call-function: ("switch-theme", {"theme": |theme|})
|
2023-01-06 14:18:51 +00:00
|
|
|
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",
|
2023-09-10 12:10:10 +00:00
|
|
|
"link": "#39afd7",
|
|
|
|
"link_hover": "#39afd7",
|
2022-11-10 17:51:08 +00:00
|
|
|
})
|
|
|
|
call-function: ("check-no-result", {
|
|
|
|
"theme": "dark",
|
2023-09-10 12:10:10 +00:00
|
|
|
"link": "#d2991d",
|
|
|
|
"link_hover": "#d2991d",
|
2022-11-10 17:51:08 +00:00
|
|
|
})
|
|
|
|
call-function: ("check-no-result", {
|
|
|
|
"theme": "light",
|
2023-09-10 12:10:10 +00:00
|
|
|
"link": "#3873ad",
|
|
|
|
"link_hover": "#3873ad",
|
2022-11-10 17:51:08 +00:00
|
|
|
})
|