Merge pull request #2705 from ehuss/help-test

Add help gui test
This commit is contained in:
Eric Huss 2025-05-15 12:32:27 +00:00 committed by GitHub
commit ce8d8120f8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

16
tests/gui/help.goml Normal file
View file

@ -0,0 +1,16 @@
// This GUI test checks help popup.
go-to: |DOC_PATH| + "index.html"
assert-css: ("#mdbook-help-container", {"display": "none"})
press-key: '?'
wait-for-css: ("#mdbook-help-container", {"display": "flex"})
press-key: 'Escape'
wait-for-css: ("#mdbook-help-container", {"display": "none"})
press-key: '?'
wait-for-css: ("#mdbook-help-container", {"display": "flex"})
// Click inside does nothing.
click: "#mdbook-help-popup"
wait-for-css: ("#mdbook-help-container", {"display": "flex"})
// Click outside dismisses.
click: "*"
wait-for-css: ("#mdbook-help-container", {"display": "none"})