1 // Ensures that the theme change is working as expected.
2 goto: file://|DOC_PATH|/test_docs/index.html
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)" })
11 goto: file://|DOC_PATH|/settings.html
13 wait-for-css: ("body", { "background-color": "rgb(255, 255, 255)" })
14 assert-local-storage: { "rustdoc-theme": "light" }
17 wait-for-css: ("body", { "background-color": "rgb(53, 53, 53)" })
18 assert-local-storage: { "rustdoc-theme": "dark" }
21 wait-for-css: ("body", { "background-color": "rgb(15, 20, 25)" })
22 assert-local-storage: { "rustdoc-theme": "ayu" }