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.

23 lines
910 B
Plaintext
Raw Normal View History

2022-01-21 19:41:47 +00:00
// Ensures that the theme change is working as expected.
goto: file://|DOC_PATH|/test_docs/index.html
2021-02-21 13:25:12 +00:00
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)" })
2021-02-21 13:25:12 +00:00
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)" })
2022-01-29 09:44:27 +00:00
goto: file://|DOC_PATH|/settings.html
click: "#theme-light"
wait-for-css: ("body", { "background-color": "rgb(255, 255, 255)" })
2022-01-29 09:44:27 +00:00
assert-local-storage: { "rustdoc-theme": "light" }
click: "#theme-dark"
wait-for-css: ("body", { "background-color": "rgb(53, 53, 53)" })
2022-01-29 09:44:27 +00:00
assert-local-storage: { "rustdoc-theme": "dark" }
click: "#theme-ayu"
wait-for-css: ("body", { "background-color": "rgb(15, 20, 25)" })
2022-01-29 09:44:27 +00:00
assert-local-storage: { "rustdoc-theme": "ayu" }