File tree 1 file changed +18
-0
lines changed
1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change
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
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", "")
You can’t perform that action at this time.
0 commit comments