summary refs log tree commit diff
path: root/src/test/rustdoc-gui/theme-change.goml
blob: 9706511ea19c398fda3051fc9651f0f53a27c1e0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// Ensures that the theme change is working as expected.
goto: file://|DOC_PATH|/test_docs/index.html
click: "#theme-picker"
click: "#theme-choices > button:first-child"
// should be the ayu theme so let's check the color
wait-for-css: ("body", { "background-color": "rgb(15, 20, 25)" })
click: "#theme-choices > button:last-child"
// should be the light theme so let's check the color
wait-for-css: ("body", { "background-color": "rgb(255, 255, 255)" })

goto: file://|DOC_PATH|/settings.html
wait-for: "#settings"
click: "#theme-light"
wait-for-css: ("body", { "background-color": "rgb(255, 255, 255)" })
assert-local-storage: { "rustdoc-theme": "light" }

click: "#theme-dark"
wait-for-css: ("body", { "background-color": "rgb(53, 53, 53)" })
assert-local-storage: { "rustdoc-theme": "dark" }

click: "#theme-ayu"
wait-for-css: ("body", { "background-color": "rgb(15, 20, 25)" })
assert-local-storage: { "rustdoc-theme": "ayu" }