summaryrefslogtreecommitdiffstats
path: root/src/test/rustdoc-gui/toggle-docs.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/toggle-docs.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/toggle-docs.goml')
-rw-r--r--src/test/rustdoc-gui/toggle-docs.goml75
1 files changed, 0 insertions, 75 deletions
diff --git a/src/test/rustdoc-gui/toggle-docs.goml b/src/test/rustdoc-gui/toggle-docs.goml
deleted file mode 100644
index 45bb8daf1..000000000
--- a/src/test/rustdoc-gui/toggle-docs.goml
+++ /dev/null
@@ -1,75 +0,0 @@
-// Checks that the documentation toggles have the correct position, style and work as expected.
-goto: "file://" + |DOC_PATH| + "/test_docs/index.html"
-assert-attribute: ("#main-content > details.top-doc", {"open": ""})
-assert-text: ("#toggle-all-docs", "[−]")
-click: "#toggle-all-docs"
-wait-for: 50
-// This is now collapsed so there shouldn't be the "open" attribute on details.
-assert-attribute-false: ("#main-content > details.top-doc", {"open": ""})
-assert-text: ("#toggle-all-docs", "[+]")
-assert-css: (
- "#main-content > details.top-doc > summary",
- {"font-family": '"Fira Sans", Arial, NanumBarunGothic, sans-serif'},
-)
-click: "#toggle-all-docs"
-// Not collapsed anymore so the "open" attribute should be back.
-wait-for-attribute: ("#main-content > details.top-doc", {"open": ""})
-assert-text: ("#toggle-all-docs", "[−]")
-
-// Check that it works on non-module pages as well.
-goto: "file://" + |DOC_PATH| + "/test_docs/struct.Foo.html"
-// We first check that everything is visible.
-assert-text: ("#toggle-all-docs", "[−]")
-assert-attribute: ("#implementations-list details.rustdoc-toggle", {"open": ""}, ALL)
-assert-attribute: ("#trait-implementations-list details.rustdoc-toggle", {"open": ""}, ALL)
-assert-attribute-false: (
- "#blanket-implementations-list > details.rustdoc-toggle",
- {"open": ""},
- ALL,
-)
-
-// We collapse them all.
-click: "#toggle-all-docs"
-wait-for-text: ("#toggle-all-docs", "[+]")
-// We check that all <details> are collapsed (except for the impl block ones).
-assert-attribute-false: ("details.rustdoc-toggle:not(.implementors-toggle)", {"open": ""}, ALL)
-assert-attribute: ("#implementations-list > details.implementors-toggle", {"open": ""})
-// We now check that the other impl blocks are collapsed.
-assert-attribute-false: (
- "#blanket-implementations-list > details.rustdoc-toggle.implementors-toggle",
- {"open": ""},
- ALL,
-)
-// We open them all again.
-click: "#toggle-all-docs"
-wait-for-text: ("#toggle-all-docs", "[−]")
-assert-attribute: ("details.rustdoc-toggle", {"open": ""}, ALL)
-
-// Checking the toggles style.
-show-text: true
-define-function: (
- "check-color",
- (theme, filter),
- [
- // Setting the theme.
- ("local-storage", {"rustdoc-theme": |theme|, "rustdoc-use-system-theme": "false"}),
- // We reload the page so the local storage settings are being used.
- ("reload"),
-
- ("assert-css", ("details.rustdoc-toggle > summary::before", {
- "opacity": "0.5",
- "filter": |filter|,
- }, ALL)),
- ("move-cursor-to", "details.rustdoc-toggle summary"),
- ("assert-css", ("details.rustdoc-toggle > summary:hover::before", {
- "opacity": "1",
- "filter": |filter|,
- })),
- // moving the cursor somewhere else to not mess with next function calls.
- ("move-cursor-to", ".search-input"),
- ]
-)
-
-call-function: ("check-color", {"theme": "ayu", "filter": "invert(1)"})
-call-function: ("check-color", {"theme": "dark", "filter": "invert(1)"})
-call-function: ("check-color", {"theme": "light", "filter": "none"})