Skip to content

Commit 44dfae5

Browse files
Update sidebar GUI test
1 parent a2352e6 commit 44dfae5

File tree

1 file changed

+3
-11
lines changed

1 file changed

+3
-11
lines changed

tests/gui/sidebar.goml

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,32 +12,24 @@ define-function: (
1212
"hide-sidebar",
1313
[],
1414
block {
15-
// The content should be "moved" to the right because of the sidebar.
16-
assert-css: ("#sidebar", {"transform": "none"})
1715
assert-position: ("#page-wrapper", {"x": |content_indent|})
1816

1917
// We now hide the sidebar.
2018
click: "#sidebar-toggle"
21-
wait-for: "body.sidebar-hidden"
22-
// `transform` is 0.3s so we need to wait a bit (0.5s) to ensure the animation is done.
23-
wait-for: 5000
24-
assert-css-false: ("#sidebar", {"transform": "none"})
25-
// The page content should now be on the left.
26-
assert-position: ("#page-wrapper", {"x": 0})
19+
wait-for-css: ("#sidebar", {"display": "none"})
2720
},
2821
)
2922

3023
define-function: (
3124
"show-sidebar",
3225
[],
3326
block {
34-
// The page content should be on the left and the sidebar "moved out".
35-
assert-css: ("#sidebar", {"transform": "matrix(1, 0, 0, 1, -308, 0)"})
27+
assert-css: ("#sidebar", {"display": "none"})
3628
assert-position: ("#page-wrapper", {"x": 0})
3729

3830
// We expand the sidebar.
3931
click: "#sidebar-toggle"
40-
wait-for: "body.sidebar-visible"
32+
wait-for-css-false: ("#sidebar", {"display": "none"})
4133
// `transform` is 0.3s so we need to wait a bit (0.5s) to ensure the animation is done.
4234
wait-for: 5000
4335
assert-css-false: ("#sidebar", {"transform": "matrix(1, 0, 0, 1, -308, 0)"})

0 commit comments

Comments
 (0)