]> git.lizzy.rs Git - rust.git/blob - tests/rustdoc-gui/toggle-click-deadspace.goml
Unify Opaque/Projection handling in region outlives code
[rust.git] / tests / rustdoc-gui / toggle-click-deadspace.goml
1 // This test ensures that clicking on a method summary, but not on the "[-]",
2 // doesn't toggle the <details>.
3 goto: "file://" + |DOC_PATH| + "/lib2/struct.Foo.html"
4 assert-attribute: (".impl-items .rustdoc-toggle", {"open": ""})
5 click: "h4.code-header" // This is the position of "pub" in "pub fn a_method"
6 assert-attribute: (".impl-items .rustdoc-toggle", {"open": ""})
7 click-with-offset: (
8     ".impl-items .rustdoc-toggle summary",
9     {"x": -24, "y": 8}, // This is the position of "[-]" next to that pub fn.
10 )
11 assert-attribute-false: (".impl-items .rustdoc-toggle", {"open": ""})
12
13 // Click the "Trait" part of "impl Trait" and verify it navigates.
14 click: "#impl-Trait-for-Foo h3 a:first-of-type"
15 assert-text: (".fqn", "Trait lib2::Trait")