Skip to content

Commit

Permalink
rustdoc: add assertion for missing popover div
Browse files Browse the repository at this point in the history
  • Loading branch information
notriddle committed Jun 29, 2022
1 parent f5f42a8 commit ccea908
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/test/rustdoc-gui/settings.goml
Original file line number Diff line number Diff line change
Expand Up @@ -122,13 +122,15 @@ click: ".setting-line:last-child .toggle .label"
assert-local-storage: {"rustdoc-disable-shortcuts": "true"}

// Make sure that "Disable keyboard shortcuts" actually took effect.
// The help popover won't exist yet.
press-key: "Escape"
press-key: "?"
assert-false: "#help-button .popover"
wait-for-css: ("#settings-menu .popover", {"display": "block"})

// Now turn keyboard shortcuts back on, and see if they work.
click: ".setting-line:last-child .toggle .label"
assert-local-storage: {"rustdoc-disable-shortcuts": "false"}
press-key: "Escape"
press-key: "?"
wait-for-css: ("#help-button .popover", {"display": "block"})
assert-css: ("#settings-menu .popover", {"display": "none"})
Expand Down

0 comments on commit ccea908

Please sign in to comment.