File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change 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")
You can’t perform that action at this time.
0 commit comments