Skip to content

Commit 660210c

Browse files
Add GUI test to check size of additional scraped examples
1 parent 9104632 commit 660210c

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tests/rustdoc-gui/scrape-examples-layout.goml

+8
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ assert-property: (
3737

3838
// The "title" should be located at the right bottom corner of the code example.
3939
store-position: (".scraped-example .example-wrap", {"x": x, "y": y})
40+
assert-size: (".scraped-example .example-wrap", {"height": 130})
4041
store-size: (".scraped-example .example-wrap", {"width": width, "height": height})
4142
store-size: (".scraped-example .scraped-example-title", {
4243
"width": title_width,
@@ -47,6 +48,13 @@ assert-position: (".scraped-example .scraped-example-title", {
4748
"y": |y| + |height| - |title_height| - 8,
4849
})
4950

51+
store-size: (".more-scraped-examples .scraped-example .example-wrap", {"height": more_height})
52+
assert: |more_height| > |height|
53+
assert-size: (".more-scraped-examples .scraped-example .example-wrap", {
54+
"height": 250,
55+
"width": |width|,
56+
})
57+
5058
// Check that the expand button works and also that line number aligns with code.
5159
move-cursor-to: ".scraped-example .rust"
5260
click: ".scraped-example .button-holder .expand"

0 commit comments

Comments
 (0)