diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2022-01-17 06:08:10 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-01-17 06:08:10 +0100 |
| commit | 869b7bc5e7534acc2a38d0f389e1ef0ef2bb44e6 (patch) | |
| tree | c98256951e85caa0c08e90e29e8b175055052a91 /src/test | |
| parent | 1fbd6aedb3474d2a5d70839a42c80d869749d8ff (diff) | |
| parent | 7781636fc7bd2edc6bf314dc15eb8e9d5cb60ce6 (diff) | |
| download | rust-869b7bc5e7534acc2a38d0f389e1ef0ef2bb44e6.tar.gz rust-869b7bc5e7534acc2a38d0f389e1ef0ef2bb44e6.zip | |
Rollup merge of #92795 - jsha:link-to-top, r=GuillaumeGomez
Link sidebar "location" heading to top of page This makes it easy, when you are scrolled far down in a page, to jump back to the top. Demo: https://rustdoc.crud.net/jsha/link-to-top/std/string/struct.String.html r? ``@GuillaumeGomez``
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/rustdoc-gui/sidebar.goml | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/test/rustdoc-gui/sidebar.goml b/src/test/rustdoc-gui/sidebar.goml index f9c707f81e7..9289244f6f8 100644 --- a/src/test/rustdoc-gui/sidebar.goml +++ b/src/test/rustdoc-gui/sidebar.goml @@ -22,6 +22,13 @@ click: "#structs + .item-table .item-left > a" assert-count: (".sidebar .location", 2) // We check that there is no crate listed outside of the top level. assert-false: ".sidebar-elems > .crate" + +click: ".sidebar-links a" +assert-property: ("html", {"scrollTop": "389"}) + +click: ".sidebar h2.location" +assert-property: ("html", {"scrollTop": "0"}) + // We now go back to the crate page to click on the "lib2" crate link. goto: file://|DOC_PATH|/test_docs/index.html click: ".sidebar-elems .crate > ul > li:first-child > a" |
