2021-11-22 02:49:57 -06:00
|
|
|
// This test ensures that clicking on a method summary, but not on the "[-]",
|
|
|
|
// doesn't toggle the <details>.
|
2021-11-24 02:58:07 -06:00
|
|
|
goto: file://|DOC_PATH|/lib2/struct.Foo.html
|
2021-11-22 02:49:57 -06:00
|
|
|
assert-attribute: (".impl-items .rustdoc-toggle", {"open": ""})
|
|
|
|
click: "h4.code-header" // This is the position of "pub" in "pub fn a_method"
|
|
|
|
assert-attribute: (".impl-items .rustdoc-toggle", {"open": ""})
|
2022-09-10 10:36:17 -05:00
|
|
|
click-with-offset: (
|
|
|
|
".impl-items .rustdoc-toggle summary",
|
|
|
|
{"x": -24, "y": 8}, // This is the position of "[-]" next to that pub fn.
|
|
|
|
)
|
2021-11-22 02:49:57 -06:00
|
|
|
assert-attribute-false: (".impl-items .rustdoc-toggle", {"open": ""})
|
2021-11-24 12:43:58 -06:00
|
|
|
|
|
|
|
// Click the "Trait" part of "impl Trait" and verify it navigates.
|
2022-01-10 15:35:55 -06:00
|
|
|
click: "#impl-Trait-for-Foo h3 a:first-of-type"
|
2021-11-24 12:43:58 -06:00
|
|
|
assert-text: (".fqn .in-band", "Trait lib2::Trait")
|