1 // This test ensures that the element corresponding to the hash is displayed.
2 goto: file://|DOC_PATH|/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
7 assert: ("#method\.borrow", {"display": "flex"})
8 // We first check that the impl block is open by default.
9 assert: ("#implementations + details", "open", "")
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", "")