Factor scrape-examples toggle test into a new file
This commit is contained in:
parent
679d7ea064
commit
212d03dadc
@ -27,16 +27,3 @@ store-property: (fullOffsetHeight, ".scraped-example-list > .scraped-example pre
|
|||||||
assert-property: (".scraped-example-list > .scraped-example pre", {
|
assert-property: (".scraped-example-list > .scraped-example pre", {
|
||||||
"scrollHeight": |fullOffsetHeight|
|
"scrollHeight": |fullOffsetHeight|
|
||||||
})
|
})
|
||||||
|
|
||||||
// Clicking "More examples..." will open additional examples
|
|
||||||
assert-attribute-false: (".more-examples-toggle", {"open": ""})
|
|
||||||
click: ".more-examples-toggle"
|
|
||||||
assert-attribute: (".more-examples-toggle", {"open": ""})
|
|
||||||
|
|
||||||
// Toggling all docs will close additional examples
|
|
||||||
click: "#toggle-all-docs"
|
|
||||||
assert-attribute-false: (".more-examples-toggle", {"open": ""})
|
|
||||||
|
|
||||||
// After re-opening the docs, the additional examples should stay closed
|
|
||||||
click: "#toggle-all-docs"
|
|
||||||
assert-attribute-false: (".more-examples-toggle", {"open": ""})
|
|
14
src/test/rustdoc-gui/scrape-examples-toggle.goml
Normal file
14
src/test/rustdoc-gui/scrape-examples-toggle.goml
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
goto: "file://" + |DOC_PATH| + "/scrape_examples/fn.test_many.html"
|
||||||
|
|
||||||
|
// Clicking "More examples..." will open additional examples
|
||||||
|
assert-attribute-false: (".more-examples-toggle", {"open": ""})
|
||||||
|
click: ".more-examples-toggle"
|
||||||
|
assert-attribute: (".more-examples-toggle", {"open": ""})
|
||||||
|
|
||||||
|
// Toggling all docs will close additional examples
|
||||||
|
click: "#toggle-all-docs"
|
||||||
|
assert-attribute-false: (".more-examples-toggle", {"open": ""})
|
||||||
|
|
||||||
|
// After re-opening the docs, the additional examples should stay closed
|
||||||
|
click: "#toggle-all-docs"
|
||||||
|
assert-attribute-false: (".more-examples-toggle", {"open": ""})
|
@ -1,25 +0,0 @@
|
|||||||
fn main() {
|
|
||||||
for i in 0..9 {
|
|
||||||
println!("hello world!");
|
|
||||||
println!("hello world!");
|
|
||||||
println!("hello world!");
|
|
||||||
println!("hello world!");
|
|
||||||
println!("hello world!");
|
|
||||||
println!("hello world!");
|
|
||||||
println!("hello world!");
|
|
||||||
println!("hello world!");
|
|
||||||
println!("hello world!");
|
|
||||||
}
|
|
||||||
scrape_examples::test();
|
|
||||||
for i in 0..9 {
|
|
||||||
println!("hello world!");
|
|
||||||
println!("hello world!");
|
|
||||||
println!("hello world!");
|
|
||||||
println!("hello world!");
|
|
||||||
println!("hello world!");
|
|
||||||
println!("hello world!");
|
|
||||||
println!("hello world!");
|
|
||||||
println!("hello world!");
|
|
||||||
println!("hello world!");
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
x
Reference in New Issue
Block a user