summaryrefslogtreecommitdiffstats
path: root/tests/rustdoc-gui/pocket-menu.goml
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 03:59:24 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 03:59:24 +0000
commit023939b627b7dc93b01471f7d41fb8553ddb4ffa (patch)
tree60fc59477c605c72b0a1051409062ddecc43f877 /tests/rustdoc-gui/pocket-menu.goml
parentAdding debian version 1.72.1+dfsg1-1. (diff)
downloadrustc-023939b627b7dc93b01471f7d41fb8553ddb4ffa.tar.xz
rustc-023939b627b7dc93b01471f7d41fb8553ddb4ffa.zip
Merging upstream version 1.73.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/rustdoc-gui/pocket-menu.goml')
-rw-r--r--tests/rustdoc-gui/pocket-menu.goml73
1 files changed, 30 insertions, 43 deletions
diff --git a/tests/rustdoc-gui/pocket-menu.goml b/tests/rustdoc-gui/pocket-menu.goml
index 4bdf31ecb..404e57403 100644
--- a/tests/rustdoc-gui/pocket-menu.goml
+++ b/tests/rustdoc-gui/pocket-menu.goml
@@ -29,52 +29,39 @@ click: "#help-button"
assert-css: ("#help-button .popover", {"display": "none"})
assert-css: ("#settings-menu .popover", {"display": "none"})
-// We check the borders color now:
-
-// Ayu theme
-set-local-storage: {
- "rustdoc-theme": "ayu",
- "rustdoc-use-system-theme": "false",
-}
-reload:
-
-click: "#help-button"
-assert-css: (
- "#help-button .popover",
- {"display": "block", "border-color": "rgb(92, 103, 115)"},
-)
-compare-elements-css: ("#help-button .popover", "#help-button .top", ["border-color"])
-compare-elements-css: ("#help-button .popover", "#help-button .bottom", ["border-color"])
-
-// Dark theme
-set-local-storage: {
- "rustdoc-theme": "dark",
- "rustdoc-use-system-theme": "false",
-}
-reload:
+define-function: (
+ "check-popover-colors",
+ (theme, border_color),
+ block {
+ set-local-storage: {
+ "rustdoc-theme": |theme|,
+ "rustdoc-use-system-theme": "false",
+ }
+ reload:
-click: "#help-button"
-assert-css: (
- "#help-button .popover",
- {"display": "block", "border-color": "rgb(224, 224, 224)"},
+ click: "#help-button"
+ assert-css: (
+ "#help-button .popover",
+ {"display": "block", "border-color": |border_color|},
+ )
+ compare-elements-css: ("#help-button .popover", "#help-button .top", ["border-color"])
+ compare-elements-css: ("#help-button .popover", "#help-button .bottom", ["border-color"])
+ }
)
-compare-elements-css: ("#help-button .popover", "#help-button .top", ["border-color"])
-compare-elements-css: ("#help-button .popover", "#help-button .bottom", ["border-color"])
-
-// Light theme
-set-local-storage: {
- "rustdoc-theme": "light",
- "rustdoc-use-system-theme": "false",
-}
-reload:
-click: "#help-button"
-assert-css: (
- "#help-button .popover",
- {"display": "block", "border-color": "rgb(224, 224, 224)"},
-)
-compare-elements-css: ("#help-button .popover", "#help-button .top", ["border-color"])
-compare-elements-css: ("#help-button .popover", "#help-button .bottom", ["border-color"])
+// We check the borders color now:
+call-function: ("check-popover-colors", {
+ "theme": "ayu",
+ "border_color": "#5c6773",
+})
+call-function: ("check-popover-colors", {
+ "theme": "dark",
+ "border_color": "#e0e0e0",
+})
+call-function: ("check-popover-colors", {
+ "theme": "light",
+ "border_color": "#e0e0e0",
+})
// Opening the mobile sidebar should close the settings popover.
set-window-size: (650, 600)