diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2022-01-09 13:38:29 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-01-09 13:38:29 +0100 |
| commit | 598364c99533ddbdd033fdd727a5794536b56063 (patch) | |
| tree | e384737a0abdab3a553160b06d2d64492ff40e1e /src/test | |
| parent | 8dc3bf7221d69e4fbfb847ed209c39aae3f6c7a9 (diff) | |
| parent | 8abb4bb698c9d74507adb9cd7b54a032f3c1b595 (diff) | |
| download | rust-598364c99533ddbdd033fdd727a5794536b56063.tar.gz rust-598364c99533ddbdd033fdd727a5794536b56063.zip | |
Rollup merge of #92490 - jsha:crates-in-results, r=GuillaumeGomez
Move crate drop-down to search results page This reduces clutter on doc pages. Part of #59840 r? ```@GuillaumeGomez``` Demo: https://rustdoc.crud.net/jsha/crates-in-results/std/index.html?search=str
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. |
