Update/add tests for source sidebar in mobile mode

This commit is contained in:
Guillaume Gomez 2022-06-29 15:15:53 +02:00
parent 27ff258826
commit ea97bdc908
2 changed files with 12 additions and 2 deletions

View file

@ -116,3 +116,13 @@ assert-css: (
"#source-sidebar .expand + .children .folders .name",
{"color": "rgb(255, 180, 76)", "background-color": "rgb(20, 25, 31)"},
)
// Now checking on mobile devices.
size: (500, 700)
reload:
// Waiting for the sidebar to be displayed...
wait-for-css: ("#sidebar-toggle", {"visibility": "visible", "opacity": 1})
// We now check it takes the full size of the display.
assert-property: ("body", {"clientWidth": "500", "clientHeight": "700"})
assert-property: (".sidebar", {"clientWidth": "500", "clientHeight": "700"})

View file

@ -18,8 +18,8 @@ assert: "nav.sidebar"
// We now switch to mobile mode.
size: (600, 600)
// We check that the sidebar has the expected width (0 and 1px for the border).
assert-css: ("nav.sidebar", {"width": "1px"})
// We check that the sidebar has the expected width (0).
assert-css: ("nav.sidebar", {"width": "0px"})
// We expand the sidebar.
click: "#sidebar-toggle"
assert-css: (".source-sidebar-expanded nav.sidebar", {"width": "600px"})