2021-11-22 08:49:57 +00:00
|
|
|
// This test ensures that clicking on a method summary, but not on the "[-]",
|
|
|
|
// doesn't toggle the <details>.
|
2023-04-11 17:11:34 +00:00
|
|
|
go-to: "file://" + |DOC_PATH| + "/lib2/struct.Foo.html"
|
2023-01-10 18:35:37 +00:00
|
|
|
assert-attribute: (".impl-items .toggle", {"open": ""})
|
2021-11-22 08:49:57 +00:00
|
|
|
click: "h4.code-header" // This is the position of "pub" in "pub fn a_method"
|
2023-01-10 18:35:37 +00:00
|
|
|
assert-attribute: (".impl-items .toggle", {"open": ""})
|
2022-09-10 15:36:17 +00:00
|
|
|
click-with-offset: (
|
2023-01-10 18:35:37 +00:00
|
|
|
".impl-items .toggle summary",
|
2022-09-10 15:36:17 +00:00
|
|
|
{"x": -24, "y": 8}, // This is the position of "[-]" next to that pub fn.
|
|
|
|
)
|
2023-01-10 18:35:37 +00:00
|
|
|
assert-attribute-false: (".impl-items .toggle", {"open": ""})
|
2021-11-24 18:43:58 +00:00
|
|
|
|
|
|
|
// Click the "Trait" part of "impl Trait" and verify it navigates.
|
2022-01-10 21:35:55 +00:00
|
|
|
click: "#impl-Trait-for-Foo h3 a:first-of-type"
|
2024-09-11 05:03:54 +00:00
|
|
|
assert-text: (".main-heading .rustdoc-breadcrumbs", "lib2")
|
2024-09-03 02:42:28 +00:00
|
|
|
assert-text: (".main-heading h1", "Trait TraitCopy item path")
|