From ea97bdc908ce4651cf9167c52817f46a3b4e200e Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Wed, 29 Jun 2022 15:15:53 +0200 Subject: Update/add tests for source sidebar in mobile mode --- src/test/rustdoc-gui/sidebar-source-code-display.goml | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/test/rustdoc-gui/sidebar-source-code-display.goml') diff --git a/src/test/rustdoc-gui/sidebar-source-code-display.goml b/src/test/rustdoc-gui/sidebar-source-code-display.goml index 8f53e8627ee..ea8dde7edeb 100644 --- a/src/test/rustdoc-gui/sidebar-source-code-display.goml +++ b/src/test/rustdoc-gui/sidebar-source-code-display.goml @@ -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"}) \ No newline at end of file -- cgit 1.4.1-3-g733a5