diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:13 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:13 +0000 |
commit | 218caa410aa38c29984be31a5229b9fa717560ee (patch) | |
tree | c54bd55eeb6e4c508940a30e94c0032fbd45d677 /tests/rustdoc-gui/sidebar.goml | |
parent | Releasing progress-linux version 1.67.1+dfsg1-1~progress7.99u1. (diff) | |
download | rustc-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 '')
-rw-r--r-- | tests/rustdoc-gui/sidebar.goml (renamed from src/test/rustdoc-gui/sidebar.goml) | 46 |
1 files changed, 45 insertions, 1 deletions
diff --git a/src/test/rustdoc-gui/sidebar.goml b/tests/rustdoc-gui/sidebar.goml index 5058630f4..9c742be05 100644 --- a/src/test/rustdoc-gui/sidebar.goml +++ b/tests/rustdoc-gui/sidebar.goml @@ -2,6 +2,50 @@ goto: "file://" + |DOC_PATH| + "/test_docs/index.html" assert-property: (".sidebar", {"clientWidth": "200"}) show-text: true + +// First, check the sidebar colors. +define-function: ( + "check-colors", + (theme, color, background_color), + block { + local-storage: { + "rustdoc-theme": |theme|, + "rustdoc-use-system-theme": "false", + } + reload: + // Checking results colors. + assert-css: (".sidebar", { + "color": |color|, + "background-color": |background_color| + }, ALL) + }, +) + +call-function: ( + "check-colors", + { + "theme": "ayu", + "color": "rgb(197, 197, 197)", + "background_color": "rgb(20, 25, 31)", + } +) +call-function: ( + "check-colors", + { + "theme": "dark", + "color": "rgb(221, 221, 221)", + "background_color": "rgb(80, 80, 80)", + } +) +call-function: ( + "check-colors", + { + "theme": "light", + "color": "rgb(0, 0, 0)", + "background_color": "rgb(245, 245, 245)", + } +) + local-storage: {"rustdoc-theme": "light"} // We reload the page so the local storage settings are being used. reload: @@ -104,4 +148,4 @@ assert-text: ("#toggle-all-docs", "[+]") assert-property: (".sidebar", {"clientWidth": "200"}) click: "#toggle-all-docs" assert-text: ("#toggle-all-docs", "[−]") -assert-property: (".sidebar", {"clientWidth": "200"})
\ No newline at end of file +assert-property: (".sidebar", {"clientWidth": "200"}) |