]> git.lizzy.rs Git - rust.git/blob - tests/rustdoc-gui/hash-item-expansion.goml
Rollup merge of #107790 - tharunsuresh-code:snap_curl, r=jyn514
[rust.git] / tests / 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-attribute: ("#blanket-implementations-list > details:nth-child(2)", {"open": ""})
5 // We first check that the impl block is open by default.
6 assert-attribute: ("#implementations-list details", {"open": ""})
7 // To ensure that we will click on the currently hidden method.
8 assert-text: (".sidebar-elems section .block li > a", "must_use")
9 click: ".sidebar-elems section .block li > a"
10 // We check that the impl block was opened as expected so that we can see the method.
11 assert-attribute: ("#implementations-list > details", {"open": ""})