1 // Checks that the first non-empty search result tab is selected if the default/currently selected
3 goto: file://|DOC_PATH|/test_docs/index.html
4 write: (".search-input", "Foo")
5 // Waiting for the search results to appear...
7 assert-attribute: ("#titles > button:nth-of-type(1)", {"class": "selected"})
9 // To go back to the original "state"
10 goto: file://|DOC_PATH|/test_docs/index.html
11 write: (".search-input", "-> String")
12 // Waiting for the search results to appear...
14 // With this search, only the last tab shouldn't be empty so it should be selected.
15 assert-attribute: ("#titles > button:nth-of-type(3)", {"class": "selected"})
17 // To go back to the original "state"
18 goto: file://|DOC_PATH|/test_docs/index.html
19 write: (".search-input", "-> Something")
20 // Waiting for the search results to appear...
22 // With this search, all the tabs are empty so the first one should remain selected.
23 assert-attribute: ("#titles > button:nth-of-type(1)", {"class": "selected"})