forked from rust-lang/rust
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add test to ensure search tabs behaviour
- Loading branch information
1 parent
f35e587
commit f131350
Showing
1 changed file
with
21 additions
and
0 deletions.
There are no files selected for viewing
21 changes: 21 additions & 0 deletions
21
src/test/rustdoc-gui/search-tab-selection-if-current-is-empty.goml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
goto: file://|DOC_PATH|/index.html | ||
write: (".search-input", "Foo") | ||
// Waiting for the search results to appear... | ||
wait-for: "#titles" | ||
assert: ("#titles > button:nth-of-type(1)", "class", "selected") | ||
|
||
// To go back to the original "state" | ||
goto: file://|DOC_PATH|/index.html | ||
write: (".search-input", "-> String") | ||
// Waiting for the search results to appear... | ||
wait-for: "#titles" | ||
// With this search, only the last tab shouldn't be empty so it should be selected. | ||
assert: ("#titles > button:nth-of-type(3)", "class", "selected") | ||
|
||
// To go back to the original "state" | ||
goto: file://|DOC_PATH|/index.html | ||
write: (".search-input", "-> Something") | ||
// Waiting for the search results to appear... | ||
wait-for: "#titles" | ||
// With this search, all the tabs are empty so the first one should remain selected. | ||
assert: ("#titles > button:nth-of-type(1)", "class", "selected") |