]> git.lizzy.rs Git - rust.git/blob - src/test/rustdoc-gui/search-no-result.goml
Rollup merge of #104335 - Nilstrieb:macrowo, r=compiler-errors
[rust.git] / src / test / rustdoc-gui / search-no-result.goml
1 // The goal of this test is to check the color of the "no result" links.
2 goto: "file://" + |DOC_PATH| + "/lib2/index.html?search=sdkfskjfsdks"
3 show-text: true
4
5 define-function: (
6     "check-no-result",
7     (theme, link, link_hover),
8     [
9         // Changing theme.
10         ("local-storage", {"rustdoc-theme": |theme|, "rustdoc-use-system-theme": "false"}),
11         ("reload"),
12         ("wait-for", "#results"),
13         ("assert", ".search-failed.active"),
14         ("assert-css", ("#results a", {"color": |link|}, ALL)),
15         ("move-cursor-to", "#results a"),
16         ("assert-css", ("#results a:hover", {"color": |link_hover|})),
17         // Moving the cursor to some other place to not create issues with next function run.
18         ("move-cursor-to", ".search-input"),
19     ]
20 )
21
22 call-function: ("check-no-result", {
23     "theme": "ayu",
24     "link": "rgb(57, 175, 215)",
25     "link_hover": "rgb(57, 175, 215)",
26 })
27 call-function: ("check-no-result", {
28     "theme": "dark",
29     "link": "rgb(210, 153, 29)",
30     "link_hover": "rgb(210, 153, 29)",
31 })
32 call-function: ("check-no-result", {
33     "theme": "light",
34     "link": "rgb(56, 115, 173)",
35     "link_hover": "rgb(56, 115, 173)",
36 })