about summary refs log tree commit diff
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2021-05-20 17:56:57 +0200
committerGitHub <noreply@github.com>2021-05-20 17:56:57 +0200
commit0918348eaf27f20bb998942533f38c99d99155e7 (patch)
tree80e49e9cf39164e51249b0576e3599570e584e9a
parent67d5435695fa2a62d7a075c50b42ea83a5d19f0d (diff)
parent792d4cf21f1f3ee5e42ee48b7fb3bdd5abdfbb0a (diff)
downloadrust-0918348eaf27f20bb998942533f38c99d99155e7.tar.gz
rust-0918348eaf27f20bb998942533f38c99d99155e7.zip
Rollup merge of #85507 - GuillaumeGomez:extend-escape-key-check, r=jsha
Extend escape key check

Since #84462 has been merged, we can now extend the `escape-key` test.

r? `@jsha`
-rw-r--r--src/test/rustdoc-gui/escape-key.goml13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/test/rustdoc-gui/escape-key.goml b/src/test/rustdoc-gui/escape-key.goml
index 303dd000ba3..ec034f52c97 100644
--- a/src/test/rustdoc-gui/escape-key.goml
+++ b/src/test/rustdoc-gui/escape-key.goml
@@ -22,6 +22,13 @@ assert: ("#help", "class", "hidden")
 assert: ("#search", "class", "content")
 assert: ("#main", "class", "content hidden")
 
-// FIXME: Once https://github.com/rust-lang/rust/pull/84462 is merged, add check to ensure
-// that Escape hides the search results when a result is focused.
-// press-key: "ArrowDown"
+// Check that Escape hides the search results when a search result is focused.
+focus: ".search-input"
+assert: ".search-input:focus"
+press-key: "ArrowDown"
+assert-false: ".search-input:focus"
+assert: "#results a:focus"
+press-key: "Escape"
+assert: ("#help", "class", "hidden")
+assert: ("#search", "class", "content hidden")
+assert: ("#main", "class", "content")