about summary refs log tree commit diff
path: root/tests/rustdoc-gui
diff options
context:
space:
mode:
authorMichael Howell <michael@notriddle.com>2023-01-18 11:52:31 -0700
committerMichael Howell <michael@notriddle.com>2023-01-18 12:14:00 -0700
commitbb5fb53b30fd2216639ae85ab44ec4445e004556 (patch)
tree2ced14a4932a01ad29feba024f7b8d8aff2dd931 /tests/rustdoc-gui
parentdeb05758c8d7e13599617f322be8c03b22d1d724 (diff)
downloadrust-bb5fb53b30fd2216639ae85ab44ec4445e004556.tar.gz
rust-bb5fb53b30fd2216639ae85ab44ec4445e004556.zip
rustdoc: fix "?" keyboard command when radio button is focused
This extends the special case with checkbox settings to also cover radios.
Diffstat (limited to 'tests/rustdoc-gui')
-rw-r--r--tests/rustdoc-gui/settings.goml10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/rustdoc-gui/settings.goml b/tests/rustdoc-gui/settings.goml
index 2114e2cc4c2..4c72ed51a49 100644
--- a/tests/rustdoc-gui/settings.goml
+++ b/tests/rustdoc-gui/settings.goml
@@ -212,6 +212,16 @@ press-key: "?"
 wait-for-css: ("#settings-menu .popover", {"display": "none"})
 wait-for-css: ("#help-button .popover", {"display": "block"})
 
+// Now switch back to the settings popover, and make sure the keyboard
+// shortcut works when a check box is selected.
+click: "#settings-menu > a"
+wait-for-css: ("#settings-menu .popover", {"display": "block"})
+wait-for-css: ("#help-button .popover", {"display": "none"})
+focus: "#theme-system-preference"
+press-key: "?"
+wait-for-css: ("#settings-menu .popover", {"display": "none"})
+wait-for-css: ("#help-button .popover", {"display": "block"})
+
 // Now we go to the settings page to check that the CSS is loaded as expected.
 goto: "file://" + |DOC_PATH| + "/settings.html"
 wait-for: "#settings"