1
1
// This test ensures that when clicking on a link which leads to an item inside a collapsed element,
2
2
// the collapsed element will be expanded.
3
- goto : "file://" + |DOC_PATH| + "/test_docs/struct.Foo.html"
3
+ go-to : "file://" + |DOC_PATH| + "/test_docs/struct.Foo.html"
4
4
// We check that the implementors block is expanded.
5
5
assert-property: ("#implementations-list .implementors-toggle", {"open": "true"})
6
6
// We now collapse the implementors block.
7
- property: ("#implementations-list .implementors-toggle", {"open": "false"})
7
+ set- property: ("#implementations-list .implementors-toggle", {"open": "false"})
8
8
// And now we click on the link to the method to ensure it'll expand the implementors block.
9
9
click: "//*[@class='sidebar']//a[@href='#method.must_use']"
10
10
assert-property: ("#implementations-list .implementors-toggle", {"open": "true"})
11
11
12
12
define-function: ("collapsed-from-search", (), block {
13
13
// Now we do the same through search result.
14
14
// First we reload the page without the anchor in the URL.
15
- goto : "file://" + |DOC_PATH| + "/test_docs/struct.Foo.html"
15
+ go-to : "file://" + |DOC_PATH| + "/test_docs/struct.Foo.html"
16
16
// Then we collapse the section again...
17
- property: ("#implementations-list .implementors-toggle", {"open": "false"})
17
+ set- property: ("#implementations-list .implementors-toggle", {"open": "false"})
18
18
// Then we run the search.
19
19
write: (".search-input", "foo::must_use")
20
20
wait-for: "//*[@id='search']//a[@href='../test_docs/struct.Foo.html#method.must_use']"
@@ -25,12 +25,12 @@ define-function: ("collapsed-from-search", (), block {
25
25
call-function: ("collapsed-from-search", {})
26
26
27
27
// Now running the same check but with mobile.
28
- size: (600, 600)
29
- goto : "file://" + |DOC_PATH| + "/test_docs/struct.Foo.html"
28
+ set-window- size: (600, 600)
29
+ go-to : "file://" + |DOC_PATH| + "/test_docs/struct.Foo.html"
30
30
// We check that the implementors block is expanded.
31
31
assert-property: ("#implementations-list .implementors-toggle", {"open": "true"})
32
32
// We now collapse the implementors block.
33
- property: ("#implementations-list .implementors-toggle", {"open": "false"})
33
+ set- property: ("#implementations-list .implementors-toggle", {"open": "false"})
34
34
// First we expand the mobile menu.
35
35
click: ".sidebar-menu-toggle"
36
36
// Then we click on the link to the method to ensure it'll expand the implementors block.
0 commit comments