Add test to ensure that scroll position is kept when opening/closing source sidebar
This commit is contained in:
parent
72f6322f8a
commit
9a1f52d7fd
1 changed files with 14 additions and 0 deletions
|
@ -138,3 +138,17 @@ assert-css: (
|
||||||
"border-bottom-width": "1px",
|
"border-bottom-width": "1px",
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// We now check that the scroll position is kept when opening the sidebar.
|
||||||
|
click: "#sidebar-toggle"
|
||||||
|
wait-for-css: (".sidebar", {"width": "0px"})
|
||||||
|
// We scroll to line 117 to change the scroll position.
|
||||||
|
scroll-to: '//*[@id="117"]'
|
||||||
|
assert-window-property: {"pageYOffset": "2519"}
|
||||||
|
// Expanding the sidebar...
|
||||||
|
click: "#sidebar-toggle"
|
||||||
|
wait-for-css: (".sidebar", {"width": "500px"})
|
||||||
|
click: "#sidebar-toggle"
|
||||||
|
wait-for-css: (".sidebar", {"width": "0px"})
|
||||||
|
// The "scrollTop" property should be the same.
|
||||||
|
assert-window-property: {"pageYOffset": "2519"}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue