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>.
|
2023-04-11 12:11:34 -05:00
|
|
|
go-to: "file://" + |DOC_PATH| + "/lib2/struct.Foo.html"
|
2023-01-10 12:35:37 -06:00
|
|
|
assert-attribute: (".impl-items .toggle", {"open": ""})
|
2021-11-22 02:49:57 -06:00
|
|
|
click: "h4.code-header" // This is the position of "pub" in "pub fn a_method"
|
2023-01-10 12:35:37 -06:00
|
|
|
assert-attribute: (".impl-items .toggle", {"open": ""})
|
2022-09-10 10:36:17 -05:00
|
|
|
click-with-offset: (
|
2023-01-10 12:35:37 -06:00
|
|
|
".impl-items .toggle summary",
|
2022-09-10 10:36:17 -05:00
|
|
|
{"x": -24, "y": 8}, // This is the position of "[-]" next to that pub fn.
|
|
|
|
)
|
2023-01-10 12:35:37 -06:00
|
|
|
assert-attribute-false: (".impl-items .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"
|
2023-01-13 11:09:25 -06:00
|
|
|
assert-text: (".main-heading h1", "Trait lib2::Trait")
|