fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
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. 5go-to: "file://" + |DOC_PATH| + "/test_docs/index.html" 6assert-text-false: (".main-heading h1", "Struct test_docs::Foo") 7 8// We now check that we land on the search result page if "go_to_first" isn't set. 9go-to: "file://" + |DOC_PATH| + "/test_docs/index.html?search=struct%3AFoo" 10// Waiting for the search results to appear... 11wait-for: "#search-tabs" 12assert-text-false: (".main-heading h1", "Struct test_docs::Foo") 13// Ensure that the search results are displayed, not the "normal" content. 14assert-css: ("#main-content", {"display": "none"}) 15 16// Now we can check that the feature is working as expected! 17go-to: "file://" + |DOC_PATH| + "/test_docs/index.html?search=struct%3AFoo&go_to_first=true" 18// Waiting for the page to load... 19wait-for-text: (".main-heading h1", "Struct test_docs::Foo")