2021-04-25 09:06:42 -05:00
|
|
|
// This test ensures that the element corresponding to the hash is displayed.
|
2022-10-07 13:17:05 -05:00
|
|
|
goto: "file://" + |DOC_PATH| + "/test_docs/struct.Foo.html#method.borrow"
|
2021-04-25 09:06:42 -05:00
|
|
|
// In the blanket implementations list, "Borrow" is the second one, hence the ":nth(2)".
|
2021-06-22 04:11:45 -05:00
|
|
|
assert-attribute: ("#blanket-implementations-list > details:nth-child(2)", {"open": ""})
|
2021-04-25 09:06:42 -05:00
|
|
|
// We first check that the impl block is open by default.
|
2022-03-08 11:11:29 -06:00
|
|
|
assert-attribute: ("#implementations-list details", {"open": ""})
|
2021-04-25 09:06:42 -05:00
|
|
|
// To ensure that we will click on the currently hidden method.
|
2022-02-08 10:05:00 -06:00
|
|
|
assert-text: (".sidebar-elems section .block li > a", "must_use")
|
|
|
|
click: ".sidebar-elems section .block li > a"
|
2021-04-25 09:06:42 -05:00
|
|
|
// We check that the impl block was opened as expected so that we can see the method.
|
2022-03-08 11:11:29 -06:00
|
|
|
assert-attribute: ("#implementations-list > details", {"open": ""})
|