]> git.lizzy.rs Git - rust.git/blob - src/test/rustdoc-gui/search-tab-selection-if-current-is-empty.goml
88a0b340415b2b8259bfc9c474db2704dbb02f78
[rust.git] / src / test / rustdoc-gui / search-tab-selection-if-current-is-empty.goml
1 goto: file://|DOC_PATH|/test_docs/index.html
2 write: (".search-input", "Foo")
3 // Waiting for the search results to appear...
4 wait-for: "#titles"
5 assert-attr: ("#titles > button:nth-of-type(1)", {"class": "selected"})
6
7 // To go back to the original "state"
8 goto: file://|DOC_PATH|/test_docs/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-attr: ("#titles > button:nth-of-type(3)", {"class": "selected"})
14
15 // To go back to the original "state"
16 goto: file://|DOC_PATH|/test_docs/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-attr: ("#titles > button:nth-of-type(1)", {"class": "selected"})