Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Extend scraped examples layout GUI test for position of buttons
  • Loading branch information
GuillaumeGomez committed Dec 30, 2022
commit 87bc29d02b65bd21a49136021d701de42b57390b
14 changes: 14 additions & 0 deletions src/test/rustdoc-gui/scrape-examples-layout.goml
Original file line number Diff line number Diff line change
Expand Up @@ -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|})