Add GUI regression test for methods left margin on mobile
This commit is contained in:
parent
16844e2485
commit
12d5f0aa2c
17
tests/rustdoc-gui/methods-left-margin.goml
Normal file
17
tests/rustdoc-gui/methods-left-margin.goml
Normal file
@ -0,0 +1,17 @@
|
||||
// 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)
|
||||
store-position: (".impl-items section.method", {"x": x})
|
||||
assert-position: (".impl-items section.method", {"x": |x|}, ALL)
|
||||
|
||||
// Checking on mobile.
|
||||
set-window-size: (600, 600)
|
||||
store-position: (".impl-items section.method", {"x": x})
|
||||
assert-position: (".impl-items section.method", {"x": |x|}, ALL)
|
Loading…
Reference in New Issue
Block a user