diff options
| author | Jacob Hoffman-Andrews <github@hoffman-andrews.com> | 2022-01-01 23:48:34 -0500 |
|---|---|---|
| committer | Jacob Hoffman-Andrews <github@hoffman-andrews.com> | 2022-01-05 12:57:25 -0500 |
| commit | 8abb4bb698c9d74507adb9cd7b54a032f3c1b595 (patch) | |
| tree | 3892e7e39b76b1534ea88685817a3bf642b15703 /src/test | |
| parent | f3fe91278c340590b462d9c7097e7e64620225b7 (diff) | |
| download | rust-8abb4bb698c9d74507adb9cd7b54a032f3c1b595.tar.gz rust-8abb4bb698c9d74507adb9cd7b54a032f3c1b595.zip | |
Move crate drop-down to search results page
This reduces clutter on doc pages.
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/rustdoc-gui/escape-key.goml | 2 | ||||
| -rw-r--r-- | src/test/rustdoc-gui/search-filter.goml | 4 | ||||
| -rw-r--r-- | src/test/rustdoc-gui/toggle-docs-mobile.goml | 6 |
3 files changed, 5 insertions, 7 deletions
diff --git a/src/test/rustdoc-gui/escape-key.goml b/src/test/rustdoc-gui/escape-key.goml index b65c398405c..712920b16a9 100644 --- a/src/test/rustdoc-gui/escape-key.goml +++ b/src/test/rustdoc-gui/escape-key.goml @@ -1,7 +1,7 @@ goto: file://|DOC_PATH|/test_docs/index.html // First, we check that the search results are hidden when the Escape key is pressed. write: (".search-input", "test") -wait-for: "#search > h1" // The search element is empty before the first search +wait-for: "#search h1" // The search element is empty before the first search assert-attribute: ("#search", {"class": "content"}) assert-attribute: ("#main-content", {"class": "content hidden"}) press-key: "Escape" diff --git a/src/test/rustdoc-gui/search-filter.goml b/src/test/rustdoc-gui/search-filter.goml index 7a8f8ca5311..e5cdf3ea7a1 100644 --- a/src/test/rustdoc-gui/search-filter.goml +++ b/src/test/rustdoc-gui/search-filter.goml @@ -5,14 +5,12 @@ write: (".search-input", "test") wait-for: "#titles" assert-text: ("#results .externcrate", "test_docs") -goto: file://|DOC_PATH|/test_docs/index.html +wait-for: "#crate-search" // We now want to change the crate filter. click: "#crate-search" // We select "lib2" option then press enter to change the filter. press-key: "ArrowDown" press-key: "Enter" -// We now make the search again. -write: (".search-input", "test") // Waiting for the search results to appear... wait-for: "#titles" // We check that there is no more "test_docs" appearing. diff --git a/src/test/rustdoc-gui/toggle-docs-mobile.goml b/src/test/rustdoc-gui/toggle-docs-mobile.goml index b370dd012fa..6e0ad8e0fa7 100644 --- a/src/test/rustdoc-gui/toggle-docs-mobile.goml +++ b/src/test/rustdoc-gui/toggle-docs-mobile.goml @@ -1,12 +1,12 @@ goto: file://|DOC_PATH|/test_docs/struct.Foo.html size: (433, 600) assert-attribute: (".top-doc", {"open": ""}) -click: (4, 280) // This is the position of the top doc comment toggle +click: (4, 240) // This is the position of the top doc comment toggle assert-attribute-false: (".top-doc", {"open": ""}) -click: (4, 280) +click: (4, 240) assert-attribute: (".top-doc", {"open": ""}) // To ensure that the toggle isn't over the text, we check that the toggle isn't clicked. -click: (3, 280) +click: (3, 240) assert-attribute: (".top-doc", {"open": ""}) // Assert the position of the toggle on the top doc block. |
