From 038b5fb2321f80ff0be456240cd6cefb18ebfe58 Mon Sep 17 00:00:00 2001 From: Eric Huss Date: Thu, 15 May 2025 05:25:48 -0700 Subject: [PATCH] Add help gui test --- tests/gui/help.goml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 tests/gui/help.goml diff --git a/tests/gui/help.goml b/tests/gui/help.goml new file mode 100644 index 00000000..c22eda02 --- /dev/null +++ b/tests/gui/help.goml @@ -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"})