]> git.lizzy.rs Git - rust.git/blob - src/test/rustdoc-gui/toggle-docs-mobile.goml
Rollup merge of #92692 - jsha:cool-sidebar, r=GuillaumeGomez
[rust.git] / src / test / rustdoc-gui / toggle-docs-mobile.goml
1 goto: file://|DOC_PATH|/test_docs/struct.Foo.html
2 size: (433, 600)
3 assert-attribute: (".top-doc", {"open": ""})
4 click: (4, 260) // This is the position of the top doc comment toggle
5 assert-attribute-false: (".top-doc", {"open": ""})
6 click: (4, 260)
7 assert-attribute: (".top-doc", {"open": ""})
8 // To ensure that the toggle isn't over the text, we check that the toggle isn't clicked.
9 click: (3, 260)
10 assert-attribute: (".top-doc", {"open": ""})
11
12 // Assert the position of the toggle on the top doc block.
13 assert-position: (".top-doc summary::before", {"x": 4})
14 // Assert the position of the toggle on the impl block.
15 assert-position: ("#implementations + details > summary::before", {"x": 4})
16 // Assert the position of the toggle on a method.
17 assert-position: (
18     "#trait-implementations-list .impl-items .method-toggle > summary::before",
19     {"x": 4},
20 )
21
22 // Now we do the same but with a little bigger width
23 size: (600, 600)
24 assert-attribute: (".top-doc", {"open": ""})
25 click: (4, 260) // New Y position since all search elements are back on one line.
26 assert-attribute-false: (".top-doc", {"open": ""})
27 click: (4, 260)
28 assert-attribute: (".top-doc", {"open": ""})
29 // To ensure that the toggle isn't over the text, we check that the toggle isn't clicked.
30 click: (3, 260)
31 assert-attribute: (".top-doc", {"open": ""})