Add GUI test for clicking on non-toggle summary
This commit is contained in:
parent
9aef9a2324
commit
7f35556a25
@ -891,7 +891,7 @@ function hideThemeButtonState() {
|
||||
if (e.target.tagName != "SUMMARY") {
|
||||
e.preventDefault();
|
||||
}
|
||||
})
|
||||
});
|
||||
});
|
||||
|
||||
onEachLazy(document.getElementsByClassName("notable-traits"), function(e) {
|
||||
|
@ -22,6 +22,8 @@ pub struct Foo {
|
||||
}
|
||||
|
||||
impl Foo {
|
||||
/// Some documentation
|
||||
/// # A Heading
|
||||
pub fn a_method(&self) {}
|
||||
}
|
||||
|
||||
|
8
src/test/rustdoc-gui/toggle-click-deadspace.goml
Normal file
8
src/test/rustdoc-gui/toggle-click-deadspace.goml
Normal file
@ -0,0 +1,8 @@
|
||||
// This test ensures that clicking on a method summary, but not on the "[-]",
|
||||
// doesn't toggle the <details>.
|
||||
goto: file://|DOC_PATH|/test_docs/struct.Foo.html
|
||||
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": ""})
|
||||
click: ".impl-items .rustdoc-toggle summary::before" // This is the position of "[-]" next to that pub fn.
|
||||
assert-attribute-false: (".impl-items .rustdoc-toggle", {"open": ""})
|
Loading…
x
Reference in New Issue
Block a user