rustdoc: add test case assertions for ArrowDown highlight first result

This commit is contained in:
Michael Howell 2022-05-03 09:20:22 -07:00
parent 8b2147b497
commit 75790fabed

View File

@ -6,8 +6,10 @@ write: (".search-input", "Foo")
wait-for: "#titles"
assert-attribute: ("#titles > button:nth-of-type(1)", {"class": "selected"})
assert-text: ("#titles > button:nth-of-type(1)", "In Names", STARTS_WITH)
assert: "input.search-input:focus"
// Use left-right keys
press-key: "ArrowDown"
assert: "#results > .search-results.active > a:nth-of-type(1):focus"
press-key: "ArrowRight"
wait-for-attribute: ("#titles > button:nth-of-type(2)", {"class": "selected"})
press-key: "ArrowRight"
@ -24,8 +26,10 @@ write: (".search-input", "-> String")
wait-for: "#titles"
assert-attribute: ("#titles > button:nth-of-type(1)", {"class": "selected"})
assert-text: ("#titles > button:nth-of-type(1)", "In Function Return Types", STARTS_WITH)
assert: "input.search-input:focus"
// Use left-right keys
press-key: "ArrowDown"
assert: "#results > .search-results.active > a:nth-of-type(1):focus"
press-key: "ArrowRight"
wait-for-attribute: ("#titles > button:nth-of-type(1)", {"class": "selected"})
press-key: "ArrowRight"