fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1// Ensures that the theme is working when going back in history. 2go-to: "file://" + |DOC_PATH| + "/test_docs/index.html" 3// Set the theme to dark. 4set-local-storage: { 5 "rustdoc-theme": "dark", 6 "rustdoc-use-system-theme": "false", 7} 8// We reload the page so the local storage settings are being used. 9reload: 10assert-css: ("body", { "background-color": "#353535" }) 11assert-local-storage: { "rustdoc-theme": "dark" } 12 13// Now we go to the settings page. 14go-to: "file://" + |DOC_PATH| + "/settings.html" 15wait-for: "#settings" 16// We change the theme to "light". 17click: "#theme-light" 18wait-for-css: ("body", { "background-color": "white" }) 19assert-local-storage: { "rustdoc-theme": "light" } 20 21// We go back in history. 22history-go-back: 23// Confirm that we're not on the settings page. 24assert-false: "#settings" 25// Check that the current theme is still "light". 26assert-css: ("body", { "background-color": "white" }) 27assert-local-storage: { "rustdoc-theme": "light" }