2022-01-21 19:41:47 +00:00
|
|
|
// Ensures that the theme change is working as expected.
|
2021-05-02 14:50:14 +00:00
|
|
|
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
|
2022-03-21 14:50:05 +00:00
|
|
|
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
|
2022-03-21 14:50:05 +00:00
|
|
|
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"
|
2022-03-21 14:50:05 +00:00
|
|
|
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"
|
2022-03-21 14:50:05 +00:00
|
|
|
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"
|
2022-03-21 14:50:05 +00:00
|
|
|
wait-for-css: ("body", { "background-color": "rgb(15, 20, 25)" })
|
2022-01-29 09:44:27 +00:00
|
|
|
assert-local-storage: { "rustdoc-theme": "ayu" }
|