@@ -12,32 +12,24 @@ define-function: (
12
12
"hide-sidebar",
13
13
[],
14
14
block {
15
- // The content should be "moved" to the right because of the sidebar.
16
- assert-css: ("#sidebar", {"transform": "none"})
17
15
assert-position: ("#page-wrapper", {"x": |content_indent|})
18
16
19
17
// We now hide the sidebar.
20
18
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"})
27
20
},
28
21
)
29
22
30
23
define-function: (
31
24
"show-sidebar",
32
25
[],
33
26
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"})
36
28
assert-position: ("#page-wrapper", {"x": 0})
37
29
38
30
// We expand the sidebar.
39
31
click: "#sidebar-toggle"
40
- wait-for: "body. sidebar-visible"
32
+ wait-for-css-false: ("# sidebar", {"display": "none"})
41
33
// `transform` is 0.3s so we need to wait a bit (0.5s) to ensure the animation is done.
42
34
wait-for: 5000
43
35
assert-css-false: ("#sidebar", {"transform": "matrix(1, 0, 0, 1, -308, 0)"})
0 commit comments