@@ -48,3 +48,34 @@ assert-false: "#results .externcrate"
48
48
49
49
// Checking that the text for the "title" is correct (the "All" comes from the "<select>").
50
50
assert-text: ("#search-settings", "Results for test in All", STARTS_WITH)
51
+
52
+ // Checking the display of the crate filter.
53
+ // We start with the light theme.
54
+ local-storage: {"rustdoc-theme": "light", "rustdoc-use-system-theme": "false"}
55
+ reload:
56
+
57
+ timeout: 2000
58
+ wait-for: "#crate-search"
59
+ assert-css: ("#crate-search", {
60
+ "border": "1px solid rgb(224, 224, 224)",
61
+ "color": "rgb(0, 0, 0)",
62
+ "background-color": "rgb(255, 255, 255)",
63
+ })
64
+
65
+ // We now check the dark theme.
66
+ click: "#settings-menu"
67
+ wait-for: "#settings"
68
+ click: "#theme-dark"
69
+ wait-for-css: ("#crate-search", {
70
+ "border": "1px solid rgb(240, 240, 240)",
71
+ "color": "rgb(17, 17, 17)",
72
+ "background-color": "rgb(240, 240, 240)",
73
+ })
74
+
75
+ // And finally we check the ayu theme.
76
+ click: "#theme-ayu"
77
+ wait-for-css: ("#crate-search", {
78
+ "border": "1px solid rgb(66, 76, 87)",
79
+ "color": "rgb(197, 197, 197)",
80
+ "background-color": "rgb(20, 25, 32)",
81
+ })
0 commit comments