about summary refs log tree commit diff
path: root/tests/rustdoc-gui/code-example-buttons.goml
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume.gomez@huawei.com>2024-07-30 20:58:09 +0200
committerGuillaume Gomez <guillaume.gomez@huawei.com>2024-08-05 11:05:40 +0200
commit59cb15946df94502bd6aa240e8c3700a4326a433 (patch)
tree2a4e80f4cee843cea1824f7b72599e2c662237aa /tests/rustdoc-gui/code-example-buttons.goml
parente2da2fb387c0874fbe06e4cb75f3dd5e6ef7bdc2 (diff)
downloadrust-59cb15946df94502bd6aa240e8c3700a4326a433.tar.gz
rust-59cb15946df94502bd6aa240e8c3700a4326a433.zip
Prevent clicking on a link or on a button to toggle the code example buttons visibility
Diffstat (limited to 'tests/rustdoc-gui/code-example-buttons.goml')
-rw-r--r--tests/rustdoc-gui/code-example-buttons.goml6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/rustdoc-gui/code-example-buttons.goml b/tests/rustdoc-gui/code-example-buttons.goml
index a8505812b88..4f037ec79f5 100644
--- a/tests/rustdoc-gui/code-example-buttons.goml
+++ b/tests/rustdoc-gui/code-example-buttons.goml
@@ -21,6 +21,12 @@ move-cursor-to: ".search-input"
 assert-count: (".example-wrap:not(:hover) .button-holder.keep-visible", 0)
 assert-css: (".example-wrap .copy-button", { "visibility": "hidden" })
 
+// Clicking on the "copy code" button shouldn't make the buttons stick.
+click: ".example-wrap .copy-button"
+move-cursor-to: ".search-input"
+assert-count: (".example-wrap:not(:hover) .button-holder.keep-visible", 0)
+assert-css: (".example-wrap .copy-button", { "visibility": "hidden" })
+
 define-function: (
     "check-buttons",
     [theme, background, filter, filter_hover],