Rollup merge of #106295 - GuillaumeGomez:extend-scraped-examples-layout-test, r=notriddle

Extend scraped examples layout GUI test for position of buttons

This is a regression test for https://github.com/rust-lang/rust/pull/106279.

r? ````@notriddle````
This commit is contained in:
Michael Goulet 2022-12-30 21:26:35 -08:00 committed by GitHub
commit 9644684dec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -33,3 +33,17 @@ assert-property: (
".more-scraped-examples .scraped-example:nth-child(6) .code-wrapper .src-line-numbers",
{"clientWidth": |clientWidth|}
)
// Check that for both mobile and desktop sizes, the buttons in scraped examples are displayed
// correctly.
store-value: (offset_y, 4)
// First with desktop
assert-position: (".scraped-example .code-wrapper", {"y": 255})
assert-position: (".scraped-example .code-wrapper .prev", {"y": 255 + |offset_y|})
// Then with mobile
size: (600, 600)
assert-position: (".scraped-example .code-wrapper", {"y": 314})
assert-position: (".scraped-example .code-wrapper .prev", {"y": 314 + |offset_y|})