summaryrefslogtreecommitdiffstats
path: root/src/test/rustdoc-gui/theme-change.goml
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:13 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:13 +0000
commit218caa410aa38c29984be31a5229b9fa717560ee (patch)
treec54bd55eeb6e4c508940a30e94c0032fbd45d677 /src/test/rustdoc-gui/theme-change.goml
parentReleasing progress-linux version 1.67.1+dfsg1-1~progress7.99u1. (diff)
downloadrustc-218caa410aa38c29984be31a5229b9fa717560ee.tar.xz
rustc-218caa410aa38c29984be31a5229b9fa717560ee.zip
Merging upstream version 1.68.2+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/test/rustdoc-gui/theme-change.goml')
-rw-r--r--src/test/rustdoc-gui/theme-change.goml67
1 files changed, 0 insertions, 67 deletions
diff --git a/src/test/rustdoc-gui/theme-change.goml b/src/test/rustdoc-gui/theme-change.goml
deleted file mode 100644
index cc47f1f45..000000000
--- a/src/test/rustdoc-gui/theme-change.goml
+++ /dev/null
@@ -1,67 +0,0 @@
-// Ensures that the theme change is working as expected.
-goto: "file://" + |DOC_PATH| + "/test_docs/index.html"
-local-storage: {"rustdoc-use-system-theme": "false", "rustdoc-theme": "dark"}
-reload:
-
-store-value: (background_light, "rgb(255, 255, 255)")
-store-value: (background_dark, "rgb(53, 53, 53)")
-store-value: (background_ayu, "rgb(15, 20, 25)")
-
-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": |background_ayu| })
-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": |background_light| })
-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": |background_dark| })
-assert-local-storage: { "rustdoc-theme": "dark" }
-
-local-storage: {
- "rustdoc-preferred-light-theme": "light",
- "rustdoc-preferred-dark-theme": "light",
-}
-goto: "file://" + |DOC_PATH| + "/settings.html"
-
-wait-for: "#settings"
-click: "#theme-light"
-wait-for-css: ("body", { "background-color": |background_light| })
-assert-local-storage: { "rustdoc-theme": "light" }
-
-click: "#theme-dark"
-wait-for-css: ("body", { "background-color": |background_dark| })
-assert-local-storage: { "rustdoc-theme": "dark" }
-
-click: "#theme-ayu"
-wait-for-css: ("body", { "background-color": |background_ayu| })
-assert-local-storage: { "rustdoc-theme": "ayu" }
-
-assert-local-storage-false: { "rustdoc-use-system-theme": "true" }
-click: "#theme-system-preference"
-wait-for: ".setting-line:not(.hidden) #preferred-light-theme"
-assert-local-storage: { "rustdoc-use-system-theme": "true" }
-// We click on both preferred light and dark themes to be sure that there is a change.
-click: "#preferred-light-theme-dark"
-click: "#preferred-dark-theme-dark"
-wait-for-css: ("body", { "background-color": |background_dark| })
-
-reload:
-// Ensure that the "preferred themes" are still displayed.
-wait-for: ".setting-line:not(.hidden) #preferred-light-theme"
-click: "#theme-light"
-wait-for-css: ("body", { "background-color": |background_light| })
-assert-local-storage: { "rustdoc-theme": "light" }
-// Ensure it's now hidden again
-wait-for: ".setting-line.hidden #preferred-light-theme"
-// And ensure the theme was rightly set.
-wait-for-css: ("body", { "background-color": |background_light| })
-assert-local-storage: { "rustdoc-theme": "light" }
-
-reload:
-wait-for: "#settings"
-assert: ".setting-line.hidden #preferred-light-theme"