1 // Checking the colors of the search tab headers.
2 goto: "file://" + |DOC_PATH| + "/test_docs/fn.foo.html?search=something"
7 (theme, background, background_selected, background_hover, border_bottom,
8 border_bottom_selected, border_bottom_hover, border_top, border_top_selected,
12 local-storage: {"rustdoc-theme": |theme|, "rustdoc-use-system-theme": "false"}
15 // These two commands are used to be sure the search will be run.
16 focus: ".search-input"
19 wait-for: "#search-tabs"
20 assert-css: ("#search-tabs > button:not(.selected)", {
21 "background-color": |background|,
22 "border-bottom": |border_bottom|,
23 "border-top": |border_top|,
25 assert-css: ("#search-tabs > button.selected", {
26 "background-color": |background_selected|,
27 "border-bottom": |border_bottom_selected|,
28 "border-top": |border_top_selected|,
30 move-cursor-to: "#search-tabs > button:not(.selected)"
31 assert-css: ("#search-tabs > button:not(.selected):hover", {
32 "background-color": |background_hover|,
33 "border-bottom": |border_bottom_hover|,
34 "border-top": |border_top_hover|,
36 // To prevent disrupting next run of this function.
37 move-cursor-to: ".search-input"
41 call-function: ("check-colors", {
43 "background": "rgba(0, 0, 0, 0)",
44 "background_selected": "rgb(20, 25, 32)",
45 "background_hover": "rgba(0, 0, 0, 0)",
46 "border_bottom": "0px none rgb(197, 197, 197)",
47 "border_bottom_selected": "1px solid rgb(255, 180, 76)",
48 "border_bottom_hover": "1px solid rgba(242, 151, 24, 0.3)",
49 "border_top": "0px none rgb(197, 197, 197)",
50 "border_top_selected": "0px none rgb(197, 197, 197)",
51 "border_top_hover": "0px none rgb(197, 197, 197)",
53 call-function: ("check-colors", {
55 "background": "rgb(37, 37, 37)",
56 "background_selected": "rgb(53, 53, 53)",
57 "background_hover": "rgb(53, 53, 53)",
58 "border_bottom": "0px none rgb(221, 221, 221)",
59 "border_bottom_selected": "0px none rgb(221, 221, 221)",
60 "border_bottom_hover": "0px none rgb(221, 221, 221)",
61 "border_top": "2px solid rgb(37, 37, 37)",
62 "border_top_selected": "2px solid rgb(0, 137, 255)",
63 "border_top_hover": "2px solid rgb(0, 137, 255)",
65 call-function: ("check-colors", {
67 "background": "rgb(230, 230, 230)",
68 "background_selected": "rgb(255, 255, 255)",
69 "background_hover": "rgb(255, 255, 255)",
70 "border_bottom": "0px none rgb(0, 0, 0)",
71 "border_bottom_selected": "0px none rgb(0, 0, 0)",
72 "border_bottom_hover": "0px none rgb(0, 0, 0)",
73 "border_top": "2px solid rgb(230, 230, 230)",
74 "border_top_selected": "2px solid rgb(0, 137, 255)",
75 "border_top_hover": "2px solid rgb(0, 137, 255)",