Factor scrape-examples toggle test into a new file

This commit is contained in:
Will Crichton 2022-12-06 09:59:49 -08:00
parent 679d7ea064
commit 212d03dadc
3 changed files with 14 additions and 38 deletions

View File

@ -27,16 +27,3 @@ store-property: (fullOffsetHeight, ".scraped-example-list > .scraped-example pre
assert-property: (".scraped-example-list > .scraped-example pre", {
"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": ""})

View 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": ""})

View File

@ -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!");
}
}