]> git.lizzy.rs Git - rust.git/commitdiff
Extend escape key check
authorGuillaume Gomez <guillaume1.gomez@gmail.com>
Thu, 20 May 2021 11:37:29 +0000 (13:37 +0200)
committerGuillaume Gomez <guillaume1.gomez@gmail.com>
Thu, 20 May 2021 11:37:29 +0000 (13:37 +0200)
src/test/rustdoc-gui/escape-key.goml

index 303dd000ba391e9b1133de4f867ada6695b4fc03..ec034f52c972c07be40e7b0f4159da6930242fd3 100644 (file)
@@ -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")