Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit acd70e6

Browse files
committed
Add explanations to scrape-examples integration test
1 parent 6ccd14a commit acd70e6

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/test/rustdoc-gui/scrape-examples-button-focus.goml renamed to src/test/rustdoc-gui/scrape-examples-interactions.goml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
goto: "file://" + |DOC_PATH| + "/scrape_examples/fn.test.html"
22

3+
// The next/prev buttons vertically scroll the code viewport between examples
34
store-property: (initialScrollTop, ".scraped-example-list > .scraped-example pre", "scrollTop")
45
focus: ".scraped-example-list > .scraped-example .next"
56
press-key: "Enter"
@@ -12,6 +13,7 @@ assert-property: (".scraped-example-list > .scraped-example pre", {
1213
"scrollTop": |initialScrollTop|
1314
})
1415

16+
// The expand button increases the scrollHeight of the minimized code viewport
1517
store-property: (smallOffsetHeight, ".scraped-example-list > .scraped-example pre", "offsetHeight")
1618
assert-property-false: (".scraped-example-list > .scraped-example pre", {
1719
"scrollHeight": |smallOffsetHeight|
@@ -26,11 +28,15 @@ assert-property: (".scraped-example-list > .scraped-example pre", {
2628
"scrollHeight": |fullOffsetHeight|
2729
})
2830

31+
// Clicking "More examples..." will open additional examples
2932
assert-attribute-false: (".more-examples-toggle", {"open": ""})
3033
click: ".more-examples-toggle"
3134
assert-attribute: (".more-examples-toggle", {"open": ""})
35+
36+
// Toggling all docs will close additional examples
3237
click: "#toggle-all-docs"
3338
assert-attribute-false: (".more-examples-toggle", {"open": ""})
39+
3440
// After re-opening the docs, the additional examples should stay closed
3541
click: "#toggle-all-docs"
3642
assert-attribute-false: (".more-examples-toggle", {"open": ""})

0 commit comments

Comments
 (0)