]> git.lizzy.rs Git - rust.git/blob - src/test/rustdoc-gui/hash-item-expansion.goml
Rollup merge of #86101 - glittershark:bound-as-mut-doc-fix, r=m-ou-se
[rust.git] / src / test / rustdoc-gui / hash-item-expansion.goml
1 // This test ensures that the element corresponding to the hash is displayed.
2 goto: file://|DOC_PATH|/test_docs/struct.Foo.html#method.borrow
3 // In the blanket implementations list, "Borrow" is the second one, hence the ":nth(2)".
4 assert: ("#blanket-implementations-list > details:nth-child(2)", "open", "")
5 // Please note the "\" below is needed because otherwise ".borrow" would be interpreted as
6 // a class selector.
7 assert: ("#method\.borrow", {"display": "flex"})
8 // We first check that the impl block is open by default.
9 assert: ("#implementations + details", "open", "")
10 // We collapse it.
11 click: "#implementations + details > summary"
12 // We check that it was collapsed as expected.
13 assert-false: ("#implementations + details", "open", "")
14 // To ensure that we will click on the currently hidden method.
15 assert: (".sidebar-links > a", "must_use")
16 click: ".sidebar-links > a"
17 // We check that the impl block was opened as expected so that we can see the method.
18 assert: ("#implementations + details", "open", "")