mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-27 18:57:42 +03:00
Clean up tests/rustdoc-gui/anchors.goml test code
This commit is contained in:
@@ -14,9 +14,9 @@ define-function: (
|
||||
assert-css: ("#toggle-all-docs", {"color": |main_color|})
|
||||
assert-css: (".main-heading h1 span", {"color": |main_heading_type_color|})
|
||||
assert-css: (
|
||||
".rightside a.src",
|
||||
{"color": |src_link_color|, "text-decoration": "none"},
|
||||
ALL,
|
||||
".rightside a.src",
|
||||
{"color": |src_link_color|, "text-decoration": "none"},
|
||||
ALL,
|
||||
)
|
||||
compare-elements-css: (
|
||||
".rightside a.src",
|
||||
@@ -31,25 +31,23 @@ define-function: (
|
||||
|
||||
move-cursor-to: ".main-heading a.src"
|
||||
assert-css: (
|
||||
".main-heading a.src",
|
||||
{"color": |src_link_color|, "text-decoration": "underline"},
|
||||
".main-heading a.src",
|
||||
{"color": |src_link_color|, "text-decoration": "underline"},
|
||||
)
|
||||
move-cursor-to: ".impl-items .rightside a.src"
|
||||
assert-css: (
|
||||
".impl-items .rightside a.src",
|
||||
{"color": |src_link_color|, "text-decoration": "none"},
|
||||
".impl-items .rightside a.src",
|
||||
{"color": |src_link_color|, "text-decoration": "none"},
|
||||
)
|
||||
move-cursor-to: ".impl-items a.rightside.src"
|
||||
assert-css: (
|
||||
".impl-items a.rightside.src",
|
||||
{"color": |src_link_color|, "text-decoration": "none"},
|
||||
".impl-items a.rightside.src",
|
||||
{"color": |src_link_color|, "text-decoration": "none"},
|
||||
)
|
||||
|
||||
go-to: "file://" + |DOC_PATH| + "/test_docs/struct.HeavilyDocumentedStruct.html"
|
||||
// Since we changed page, we need to set the theme again.
|
||||
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: ("#top-doc-prose-title", {"color": |title_color|})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user