about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorMichael Howell <michael@notriddle.com>2024-01-08 09:27:52 -0700
committerMichael Howell <michael@notriddle.com>2024-01-08 09:54:05 -0700
commit8b52275ee34c829a29bbb677fffd7da48d242616 (patch)
tree372b34a1ffbdec6e5d00e13d60ab6929cd0519c8 /tests
parent0ee9cfd54db7b5f4be35f026588904500c866196 (diff)
downloadrust-8b52275ee34c829a29bbb677fffd7da48d242616.tar.gz
rust-8b52275ee34c829a29bbb677fffd7da48d242616.zip
rustdoc: hide modals when resizing the sidebar
Follow-up for
https://github.com/rust-lang/rust/pull/119477#discussion_r1439085011
Diffstat (limited to 'tests')
-rw-r--r--tests/rustdoc-gui/sidebar-resize-close-popover.goml20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/rustdoc-gui/sidebar-resize-close-popover.goml b/tests/rustdoc-gui/sidebar-resize-close-popover.goml
new file mode 100644
index 00000000000..2a8fbac855e
--- /dev/null
+++ b/tests/rustdoc-gui/sidebar-resize-close-popover.goml
@@ -0,0 +1,20 @@
+// Checks sidebar resizing close the Settings popover
+go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
+assert-property: (".sidebar", {"clientWidth": "200"})
+show-text: true
+click: "#settings-menu"
+wait-for: "#settings"
+assert-css: ("#settings", {"display": "block"})
+// normal resizing
+drag-and-drop: ((205, 100), (185, 100))
+assert-property: (".sidebar", {"clientWidth": "182"})
+assert-css: ("#settings", {"display": "none"})
+
+// Now same thing, but for source code
+go-to: "file://" + |DOC_PATH| + "/src/test_docs/lib.rs.html"
+click: "#settings-menu"
+wait-for: "#settings"
+assert-css: ("#settings", {"display": "block"})
+assert-property: (".sidebar", {"clientWidth": "49"})
+drag-and-drop: ((52, 100), (185, 100))
+assert-css: ("#settings", {"display": "none"})