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