]> git.lizzy.rs Git - rust.git/blob - src/test/rustdoc-gui/theme-change.goml
Rollup merge of #100367 - fmease:fix-100365, r=compiler-errors
[rust.git] / src / test / rustdoc-gui / theme-change.goml
1 // Ensures that the theme change is working as expected.
2 goto: file://|DOC_PATH|/test_docs/index.html
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.
9 wait-for-css: ("body", { "background-color": "rgb(15, 20, 25)" })
10 assert-local-storage: { "rustdoc-theme": "ayu" }
11 click: "#theme-light"
12 // should be the light theme so let's check the color.
13 wait-for-css: ("body", { "background-color": "rgb(255, 255, 255)" })
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" }
19
20 goto: file://|DOC_PATH|/settings.html
21 wait-for: "#settings"
22 click: "#theme-light"
23 wait-for-css: ("body", { "background-color": "rgb(255, 255, 255)" })
24 assert-local-storage: { "rustdoc-theme": "light" }
25
26 click: "#theme-dark"
27 wait-for-css: ("body", { "background-color": "rgb(53, 53, 53)" })
28 assert-local-storage: { "rustdoc-theme": "dark" }
29
30 click: "#theme-ayu"
31 wait-for-css: ("body", { "background-color": "rgb(15, 20, 25)" })
32 assert-local-storage: { "rustdoc-theme": "ayu" }