]>
Commit | Line | Data |
---|---|---|
5099ac24 | 1 | // Ensures that the theme change is working as expected. |
136023e0 | 2 | goto: file://|DOC_PATH|/test_docs/index.html |
923072b8 FG |
3 | local-storage: {"rustdoc-use-system-theme": "false", "rustdoc-theme": "dark"} |
4 | reload: | |
5 | click: "#settings-menu" | |
6 | wait-for: "#theme-ayu" | |
7 | click: "#theme-ayu" | |
8 | // should be the ayu theme so let's check the color. | |
5e7ed085 | 9 | wait-for-css: ("body", { "background-color": "rgb(15, 20, 25)" }) |
923072b8 FG |
10 | assert-local-storage: { "rustdoc-theme": "ayu" } |
11 | click: "#theme-light" | |
12 | // should be the light theme so let's check the color. | |
5e7ed085 | 13 | wait-for-css: ("body", { "background-color": "rgb(255, 255, 255)" }) |
923072b8 FG |
14 | assert-local-storage: { "rustdoc-theme": "light" } |
15 | click: "#theme-dark" | |
16 | // Should be the dark theme so let's check the color. | |
17 | wait-for-css: ("body", { "background-color": "rgb(53, 53, 53)" }) | |
18 | assert-local-storage: { "rustdoc-theme": "dark" } | |
5099ac24 FG |
19 | |
20 | goto: file://|DOC_PATH|/settings.html | |
04454e1e | 21 | wait-for: "#settings" |
5099ac24 | 22 | click: "#theme-light" |
5e7ed085 | 23 | wait-for-css: ("body", { "background-color": "rgb(255, 255, 255)" }) |
5099ac24 FG |
24 | assert-local-storage: { "rustdoc-theme": "light" } |
25 | ||
26 | click: "#theme-dark" | |
5e7ed085 | 27 | wait-for-css: ("body", { "background-color": "rgb(53, 53, 53)" }) |
5099ac24 FG |
28 | assert-local-storage: { "rustdoc-theme": "dark" } |
29 | ||
30 | click: "#theme-ayu" | |
5e7ed085 | 31 | wait-for-css: ("body", { "background-color": "rgb(15, 20, 25)" }) |
5099ac24 | 32 | assert-local-storage: { "rustdoc-theme": "ayu" } |