Use include
command to reduce code duplication
This commit is contained in:
parent
5958f5e08f
commit
7659ef47f0
43 changed files with 112 additions and 150 deletions
|
@ -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",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue