Skip to content

Commit

Permalink
Add GUI regression test for methods left margin on mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Oct 8, 2024
1 parent dceb9a6 commit 4f24866
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/rustdoc-gui/methods-left-margin.goml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// This test is to ensure that methods are correctly aligned on the left side.

go-to: "file://" + |DOC_PATH| + "/test_docs/struct.Foo.html"

// First we ensure that we have methods with and without documentation.
assert: ".impl-items > details.method-toggle > summary > section.method"
assert: ".impl-items > section.method"

// Checking on desktop.
set-window-size: (900, 600)
assert-position: (".impl-items section.method", {"x": 245}, ALL)

// Checking on mobile.
set-window-size: (600, 600)
assert-position: (".impl-items section.method", {"x": 25}, ALL)

0 comments on commit 4f24866

Please sign in to comment.