Skip to content

Commit 75790fa

Browse files
committed
rustdoc: add test case assertions for ArrowDown highlight first result
1 parent 8b2147b commit 75790fa

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Diff for: src/test/rustdoc-gui/search-tab-change-title-fn-sig.goml

+4
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,10 @@ write: (".search-input", "Foo")
66
wait-for: "#titles"
77
assert-attribute: ("#titles > button:nth-of-type(1)", {"class": "selected"})
88
assert-text: ("#titles > button:nth-of-type(1)", "In Names", STARTS_WITH)
9+
assert: "input.search-input:focus"
910
// Use left-right keys
1011
press-key: "ArrowDown"
12+
assert: "#results > .search-results.active > a:nth-of-type(1):focus"
1113
press-key: "ArrowRight"
1214
wait-for-attribute: ("#titles > button:nth-of-type(2)", {"class": "selected"})
1315
press-key: "ArrowRight"
@@ -24,8 +26,10 @@ write: (".search-input", "-> String")
2426
wait-for: "#titles"
2527
assert-attribute: ("#titles > button:nth-of-type(1)", {"class": "selected"})
2628
assert-text: ("#titles > button:nth-of-type(1)", "In Function Return Types", STARTS_WITH)
29+
assert: "input.search-input:focus"
2730
// Use left-right keys
2831
press-key: "ArrowDown"
32+
assert: "#results > .search-results.active > a:nth-of-type(1):focus"
2933
press-key: "ArrowRight"
3034
wait-for-attribute: ("#titles > button:nth-of-type(1)", {"class": "selected"})
3135
press-key: "ArrowRight"

0 commit comments

Comments
 (0)