about summary refs log tree commit diff
path: root/tests/rustdoc-gui
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-01-22 07:56:42 +0100
committerGitHub <noreply@github.com>2024-01-22 07:56:42 +0100
commit6687e8e460683fa2242d8eca3da49097e39f859e (patch)
treed782f787b751610cd339d8b289b03f22c962dbc6 /tests/rustdoc-gui
parent7d7c2257d3670d3e0b1226449e5640446a11db17 (diff)
parent8b52275ee34c829a29bbb677fffd7da48d242616 (diff)
Rollup merge of #119746 - notriddle:notriddle/resize-close-modals, r=fmease
rustdoc: hide modals when resizing the sidebar

Follow-up for
https://github.com/rust-lang/rust/pull/119477#discussion_r1439085011

CC `@lukas-code`
Diffstat (limited to 'tests/rustdoc-gui')
-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"})