Skip to content

Commit 6404a9d

Browse files
authored
Rollup merge of rust-lang#83754 - GuillaumeGomez:search-tab-behaviour, r=jyn514
Add test to ensure search tabs behaviour It adds a GUI test for rust-lang#80382. r? ``@jyn514``
2 parents 435e8e8 + f131350 commit 6404a9d

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
goto: file://|DOC_PATH|/index.html
2+
write: (".search-input", "Foo")
3+
// Waiting for the search results to appear...
4+
wait-for: "#titles"
5+
assert: ("#titles > button:nth-of-type(1)", "class", "selected")
6+
7+
// To go back to the original "state"
8+
goto: file://|DOC_PATH|/index.html
9+
write: (".search-input", "-> String")
10+
// Waiting for the search results to appear...
11+
wait-for: "#titles"
12+
// With this search, only the last tab shouldn't be empty so it should be selected.
13+
assert: ("#titles > button:nth-of-type(3)", "class", "selected")
14+
15+
// To go back to the original "state"
16+
goto: file://|DOC_PATH|/index.html
17+
write: (".search-input", "-> Something")
18+
// Waiting for the search results to appear...
19+
wait-for: "#titles"
20+
// With this search, all the tabs are empty so the first one should remain selected.
21+
assert: ("#titles > button:nth-of-type(1)", "class", "selected")

0 commit comments

Comments
 (0)