]> git.lizzy.rs Git - rust.git/blobdiff - src/test/rustdoc-gui/theme-change.goml
Auto merge of #93348 - spastorino:fix-perf-overlap-mode2, r=nikomatsakis
[rust.git] / src / test / rustdoc-gui / theme-change.goml
index 5221cda2f1fb6bb96f7a699e508646ae053dea0a..73edee64e4372040593e737ba421fe7bcfc0c850 100644 (file)
@@ -1,3 +1,4 @@
+// Ensures that the theme change is working as expected.
 goto: file://|DOC_PATH|/test_docs/index.html
 click: "#theme-picker"
 click: "#theme-choices > button:first-child"
@@ -8,3 +9,19 @@ click: "#theme-choices > button:last-child"
 wait-for: 500
 // should be the light theme so let's check the color
 assert-css: ("body", { "background-color": "rgb(255, 255, 255)" })
+
+goto: file://|DOC_PATH|/settings.html
+click: "#theme-light"
+wait-for: 500
+assert-css: ("body", { "background-color": "rgb(255, 255, 255)" })
+assert-local-storage: { "rustdoc-theme": "light" }
+
+click: "#theme-dark"
+wait-for: 500
+assert-css: ("body", { "background-color": "rgb(53, 53, 53)" })
+assert-local-storage: { "rustdoc-theme": "dark" }
+
+click: "#theme-ayu"
+wait-for: 500
+assert-css: ("body", { "background-color": "rgb(15, 20, 25)" })
+assert-local-storage: { "rustdoc-theme": "ayu" }