diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-19 09:26:03 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-19 09:26:03 +0000 |
commit | 9918693037dce8aa4bb6f08741b6812923486c18 (patch) | |
tree | 21d2b40bec7e6a7ea664acee056eb3d08e15a1cf /tests/rustdoc-gui/sidebar-resize.goml | |
parent | Releasing progress-linux version 1.75.0+dfsg1-5~progress7.99u1. (diff) | |
download | rustc-9918693037dce8aa4bb6f08741b6812923486c18.tar.xz rustc-9918693037dce8aa4bb6f08741b6812923486c18.zip |
Merging upstream version 1.76.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/rustdoc-gui/sidebar-resize.goml')
-rw-r--r-- | tests/rustdoc-gui/sidebar-resize.goml | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/tests/rustdoc-gui/sidebar-resize.goml b/tests/rustdoc-gui/sidebar-resize.goml new file mode 100644 index 000000000..543d5d390 --- /dev/null +++ b/tests/rustdoc-gui/sidebar-resize.goml @@ -0,0 +1,28 @@ +// Checks sidebar resizing +go-to: "file://" + |DOC_PATH| + "/test_docs/index.html" +assert-property: (".sidebar", {"clientWidth": "200"}) +show-text: true +// normal resizing +drag-and-drop: ((205, 100), (185, 100)) +assert-property: (".sidebar", {"clientWidth": "182"}) +// resize past maximum (don't grow past 500) +drag-and-drop: ((185, 100), (600, 100)) +assert-property: (".sidebar", {"clientWidth": "500"}) +// resize past minimum (hide sidebar) +drag-and-drop: ((501, 100), (5, 100)) +assert-property: (".sidebar", {"clientWidth": "0"}) +assert-css: (".sidebar", {"display": "none"}) +assert-local-storage: {"rustdoc-hide-sidebar": "true"} +set-local-storage: {"rustdoc-hide-sidebar": "false"} + +// Now same thing, but for source code +go-to: "file://" + |DOC_PATH| + "/src/test_docs/lib.rs.html" +assert-property: (".sidebar", {"clientWidth": "49"}) +drag-and-drop: ((52, 100), (185, 100)) +assert-property: (".sidebar", {"clientWidth": "181"}) +drag-and-drop: ((185, 100), (600, 100)) +assert-property: (".sidebar", {"clientWidth": "499"}) +drag-and-drop: ((500, 100), (5, 100)) +// instead of hiding the sidebar entirely, this +// will switch to the toggle mode +assert-property: (".sidebar", {"clientWidth": "49"}) |