1 // Checks that the documentation toggles on mobile have the correct position, style and work
3 goto: file://|DOC_PATH|/test_docs/struct.Foo.html
5 assert-attribute: (".top-doc", {"open": ""})
6 click: (4, 270) // This is the position of the top doc comment toggle
7 assert-attribute-false: (".top-doc", {"open": ""})
9 assert-attribute: (".top-doc", {"open": ""})
10 // To ensure that the toggle isn't over the text, we check that the toggle isn't clicked.
12 assert-attribute: (".top-doc", {"open": ""})
14 // Assert the position of the toggle on the top doc block.
15 assert-position: (".top-doc summary::before", {"x": 4})
16 // Assert the position of the toggle on the impl block.
17 assert-position: ("#implementations + details > summary::before", {"x": 4})
18 // Assert the position of the toggle on a method.
20 "#trait-implementations-list .impl-items .method-toggle > summary::before",
24 // Now we do the same but with a little bigger width
26 assert-attribute: (".top-doc", {"open": ""})
27 click: (4, 270) // New Y position since all search elements are back on one line.
28 assert-attribute-false: (".top-doc", {"open": ""})
30 assert-attribute: (".top-doc", {"open": ""})
31 // To ensure that the toggle isn't over the text, we check that the toggle isn't clicked.
33 assert-attribute: (".top-doc", {"open": ""})