Skip to content

Commit 97aa0bb

Browse files
Add gui test for scrollbar presence
1 parent 73916cb commit 97aa0bb

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

gui-tests/no-scrollbar.goml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// Checks that there is no x-axis scrollbar.
2+
3+
go-to: |DOC_PATH|
4+
5+
define-function: (
6+
"test-scrollbar",
7+
[window_width],
8+
block {
9+
set-window-size: (|window_width|, 1000)
10+
store-document-property: {"body"."scrollWidth": scroll_width}
11+
// If the scroll width is the same as the viewport width, then all good!
12+
assert-document-property: {"documentElement"."clientWidth": |scroll_width|}
13+
},
14+
)
15+
16+
call-function: ("test-scrollbar", {"window_width": 1200})
17+
call-function: ("test-scrollbar", {"window_width": 1000})
18+
call-function: ("test-scrollbar", {"window_width": 800})
19+
call-function: ("test-scrollbar", {"window_width": 600})
20+
call-function: ("test-scrollbar", {"window_width": 400})

0 commit comments

Comments
 (0)