1
1
goto: "file://" + |DOC_PATH| + "/scrape_examples/fn.test.html"
2
2
3
+ // The next/prev buttons vertically scroll the code viewport between examples
3
4
store-property: (initialScrollTop, ".scraped-example-list > .scraped-example pre", "scrollTop")
4
5
focus: ".scraped-example-list > .scraped-example .next"
5
6
press-key: "Enter"
@@ -12,6 +13,7 @@ assert-property: (".scraped-example-list > .scraped-example pre", {
12
13
"scrollTop": |initialScrollTop|
13
14
})
14
15
16
+ // The expand button increases the scrollHeight of the minimized code viewport
15
17
store-property: (smallOffsetHeight, ".scraped-example-list > .scraped-example pre", "offsetHeight")
16
18
assert-property-false: (".scraped-example-list > .scraped-example pre", {
17
19
"scrollHeight": |smallOffsetHeight|
@@ -26,11 +28,15 @@ assert-property: (".scraped-example-list > .scraped-example pre", {
26
28
"scrollHeight": |fullOffsetHeight|
27
29
})
28
30
31
+ // Clicking "More examples..." will open additional examples
29
32
assert-attribute-false: (".more-examples-toggle", {"open": ""})
30
33
click: ".more-examples-toggle"
31
34
assert-attribute: (".more-examples-toggle", {"open": ""})
35
+
36
+ // Toggling all docs will close additional examples
32
37
click: "#toggle-all-docs"
33
38
assert-attribute-false: (".more-examples-toggle", {"open": ""})
39
+
34
40
// After re-opening the docs, the additional examples should stay closed
35
41
click: "#toggle-all-docs"
36
42
assert-attribute-false: (".more-examples-toggle", {"open": ""})
0 commit comments