Files
rust/src/test/rustdoc-gui/theme-change.goml

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

33 lines
1.3 KiB
Plaintext
Raw Normal View History

2022-01-21 20:41:47 +01:00
// Ensures that the theme change is working as expected.
goto: file://|DOC_PATH|/test_docs/index.html
2022-05-11 23:11:31 +02:00
local-storage: {"rustdoc-use-system-theme": "false", "rustdoc-theme": "dark"}
reload:
click: "#settings-menu"
wait-for: "#theme-ayu"
click: "#theme-ayu"
// should be the ayu theme so let's check the color.
wait-for-css: ("body", { "background-color": "rgb(15, 20, 25)" })
2022-05-11 23:11:31 +02:00
assert-local-storage: { "rustdoc-theme": "ayu" }
click: "#theme-light"
// should be the light theme so let's check the color.
wait-for-css: ("body", { "background-color": "rgb(255, 255, 255)" })
2022-05-11 23:11:31 +02:00
assert-local-storage: { "rustdoc-theme": "light" }
click: "#theme-dark"
// Should be the dark theme so let's check the color.
wait-for-css: ("body", { "background-color": "rgb(53, 53, 53)" })
assert-local-storage: { "rustdoc-theme": "dark" }
2022-01-29 10:44:27 +01:00
goto: file://|DOC_PATH|/settings.html
2022-01-19 23:06:17 +01:00
wait-for: "#settings"
2022-01-29 10:44:27 +01:00
click: "#theme-light"
wait-for-css: ("body", { "background-color": "rgb(255, 255, 255)" })
2022-01-29 10:44:27 +01:00
assert-local-storage: { "rustdoc-theme": "light" }
click: "#theme-dark"
wait-for-css: ("body", { "background-color": "rgb(53, 53, 53)" })
2022-01-29 10:44:27 +01:00
assert-local-storage: { "rustdoc-theme": "dark" }
click: "#theme-ayu"
wait-for-css: ("body", { "background-color": "rgb(15, 20, 25)" })
2022-01-29 10:44:27 +01:00
assert-local-storage: { "rustdoc-theme": "ayu" }