Skip to content

Commit f131350

Browse files
Add test to ensure search tabs behaviour
1 parent f35e587 commit f131350

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)