未验证 提交 7dcbe692 编写于 作者: M Matthias Krüger 提交者: GitHub

Rollup merge of #94155 - GuillaumeGomez:extend-toggle-gui-test, r=jsha

Extend toggle GUI test a bit

Fixes #84422.

r? `@jsha`
......@@ -3,12 +3,36 @@ 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: 1000
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", "[+]")
click: "#toggle-all-docs"
wait-for: 1000
wait-for: 50
// Not collapsed anymore so the "open" attribute should be back.
assert-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: ("details.rustdoc-toggle", {"open": ""}, ALL)
// We collapse them all.
click: "#toggle-all-docs"
wait-for: 50
assert-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: ("details.rustdoc-toggle.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: 50
assert-text: ("#toggle-all-docs", "[−]")
assert-attribute: ("details.rustdoc-toggle", {"open": ""}, ALL)
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册