diff options
| author | Guillaume Gomez <guillaume.gomez@huawei.com> | 2024-04-05 21:38:55 +0200 |
|---|---|---|
| committer | Guillaume Gomez <guillaume.gomez@huawei.com> | 2024-04-05 21:38:55 +0200 |
| commit | 7659ef47f03f4e2bbbef65856427add98f898ef5 (patch) | |
| tree | f2069567de13688a16cd07f8e61a75cf0f0da14f /tests/rustdoc-gui/toggle-docs.goml | |
| parent | 5958f5e08fa88ee95ede8c00f1b89befe0372d54 (diff) | |
| download | rust-7659ef47f03f4e2bbbef65856427add98f898ef5.tar.gz rust-7659ef47f03f4e2bbbef65856427add98f898ef5.zip | |
Use `include` command to reduce code duplication
Diffstat (limited to 'tests/rustdoc-gui/toggle-docs.goml')
| -rw-r--r-- | tests/rustdoc-gui/toggle-docs.goml | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/tests/rustdoc-gui/toggle-docs.goml b/tests/rustdoc-gui/toggle-docs.goml index cfd18bd2e14..1235ee4b754 100644 --- a/tests/rustdoc-gui/toggle-docs.goml +++ b/tests/rustdoc-gui/toggle-docs.goml @@ -1,4 +1,5 @@ // Checks that the documentation toggles have the correct position, style and work as expected. +include: "utils.goml" go-to: "file://" + |DOC_PATH| + "/test_docs/index.html" assert-attribute: ("#main-content > details.top-doc", {"open": ""}) assert-text: ("#toggle-all-docs", "[−]") @@ -51,10 +52,7 @@ define-function: ( "check-color", [theme, filter], block { - // Setting the theme. - set-local-storage: {"rustdoc-theme": |theme|, "rustdoc-use-system-theme": "false"} - // We reload the page so the local storage settings are being used. - reload: + call-function: ("switch-theme", {"theme": |theme|}) assert-css: ("details.toggle > summary::before", { "opacity": "0.5", |
