Skip to content

Commit 37c4842

Browse files
Rollup merge of #87102 - GuillaumeGomez:go-to-first-feature, r=Manisheart,notriddle
Add GUI test for "go to first" feature It adds a test for #85876 to ensure the feature is working as expected and prevent potential regression. cc `@jeanlucthumm` r? `@Manishearth`
2 parents c777e90 + cac0d71 commit 37c4842

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// This test ensures that the "go_to_first" feature is working as expected.
2+
3+
// First, we check that the first page doesn't have the string we're looking for to ensure
4+
// that the feature is changing page as expected.
5+
goto: file://|DOC_PATH|/test_docs/index.html
6+
assert-text-false: (".fqn .in-band", "Struct test_docs::Foo")
7+
8+
// We now check that we land on the search result page if "go_to_first" isn't set.
9+
goto: file://|DOC_PATH|/test_docs/index.html?search=struct%3AFoo
10+
// Waiting for the search results to appear...
11+
wait-for: "#titles"
12+
assert-text-false: (".fqn .in-band", "Struct test_docs::Foo")
13+
// Ensure that the search results are displayed, not the "normal" content.
14+
assert-css: ("#main", {"display": "none"})
15+
16+
// Now we can check that the feature is working as expected!
17+
goto: file://|DOC_PATH|/test_docs/index.html?search=struct%3AFoo&go_to_first=true
18+
// Waiting for the page to load...
19+
wait-for: 500
20+
assert-text: (".fqn .in-band", "Struct test_docs::Foo")

0 commit comments

Comments
 (0)