]> git.lizzy.rs Git - rust.git/blob - src/test/rustdoc-gui/theme-change.goml
Rollup merge of #95649 - ouz-a:mir-opt, r=oli-obk
[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 click: "#theme-picker"
4 click: "#theme-choices > button:first-child"
5 // should be the ayu theme so let's check the color
6 wait-for-css: ("body", { "background-color": "rgb(15, 20, 25)" })
7 click: "#theme-choices > button:last-child"
8 // should be the light theme so let's check the color
9 wait-for-css: ("body", { "background-color": "rgb(255, 255, 255)" })
10
11 goto: file://|DOC_PATH|/settings.html
12 click: "#theme-light"
13 wait-for-css: ("body", { "background-color": "rgb(255, 255, 255)" })
14 assert-local-storage: { "rustdoc-theme": "light" }
15
16 click: "#theme-dark"
17 wait-for-css: ("body", { "background-color": "rgb(53, 53, 53)" })
18 assert-local-storage: { "rustdoc-theme": "dark" }
19
20 click: "#theme-ayu"
21 wait-for-css: ("body", { "background-color": "rgb(15, 20, 25)" })
22 assert-local-storage: { "rustdoc-theme": "ayu" }