diff options
| author | Michael Howell <michael@notriddle.com> | 2024-10-23 19:15:23 -0400 |
|---|---|---|
| committer | Michael Howell <michael@notriddle.com> | 2024-10-23 19:15:23 -0400 |
| commit | a53655a023cee5dee1873bd3dfc805d7c460fbeb (patch) | |
| tree | ebb93b369e3f5fe9a9a240f5d38106c081bea595 /tests/rustdoc-gui | |
| parent | b0c2d2e5b00339014cba0a31f634af8c146458ed (diff) | |
| download | rust-a53655a023cee5dee1873bd3dfc805d7c460fbeb.tar.gz rust-a53655a023cee5dee1873bd3dfc805d7c460fbeb.zip | |
rustdoc: adjust spacing and typography in header
Diffstat (limited to 'tests/rustdoc-gui')
| -rw-r--r-- | tests/rustdoc-gui/item-info.goml | 2 | ||||
| -rw-r--r-- | tests/rustdoc-gui/scrape-examples-layout.goml | 8 | ||||
| -rw-r--r-- | tests/rustdoc-gui/sidebar-source-code-display.goml | 2 | ||||
| -rw-r--r-- | tests/rustdoc-gui/source-anchor-scroll.goml | 8 | ||||
| -rw-r--r-- | tests/rustdoc-gui/source-code-page.goml | 6 |
5 files changed, 13 insertions, 13 deletions
diff --git a/tests/rustdoc-gui/item-info.goml b/tests/rustdoc-gui/item-info.goml index c8aa7b31cad..1636e149692 100644 --- a/tests/rustdoc-gui/item-info.goml +++ b/tests/rustdoc-gui/item-info.goml @@ -20,7 +20,7 @@ store-position: ( {"x": second_line_x, "y": second_line_y}, ) assert: |first_line_x| != |second_line_x| && |first_line_x| == 516 && |second_line_x| == 272 -assert: |first_line_y| != |second_line_y| && |first_line_y| == 714 && |second_line_y| == 737 +assert: |first_line_y| != |second_line_y| && |first_line_y| == 718 && |second_line_y| == 741 // Now we ensure that they're not rendered on the same line. set-window-size: (1100, 800) diff --git a/tests/rustdoc-gui/scrape-examples-layout.goml b/tests/rustdoc-gui/scrape-examples-layout.goml index 96c78bbfe8b..5187ac486b0 100644 --- a/tests/rustdoc-gui/scrape-examples-layout.goml +++ b/tests/rustdoc-gui/scrape-examples-layout.goml @@ -80,8 +80,8 @@ click: ".scraped-example .button-holder .expand" store-value: (offset_y, 4) // First with desktop -assert-position: (".scraped-example", {"y": 252}) -assert-position: (".scraped-example .prev", {"y": 252 + |offset_y|}) +assert-position: (".scraped-example", {"y": 256}) +assert-position: (".scraped-example .prev", {"y": 256 + |offset_y|}) // Gradient background should be at the top of the code block. assert-css: (".scraped-example .example-wrap::before", {"top": "0px"}) @@ -90,8 +90,8 @@ assert-css: (".scraped-example .example-wrap::after", {"bottom": "0px"}) // Then with mobile set-window-size: (600, 600) store-size: (".scraped-example .scraped-example-title", {"height": title_height}) -assert-position: (".scraped-example", {"y": 287}) -assert-position: (".scraped-example .prev", {"y": 287 + |offset_y| + |title_height|}) +assert-position: (".scraped-example", {"y": 291}) +assert-position: (".scraped-example .prev", {"y": 291 + |offset_y| + |title_height|}) define-function: ( "check_title_and_code_position", diff --git a/tests/rustdoc-gui/sidebar-source-code-display.goml b/tests/rustdoc-gui/sidebar-source-code-display.goml index 742453c173b..1e77bcc2273 100644 --- a/tests/rustdoc-gui/sidebar-source-code-display.goml +++ b/tests/rustdoc-gui/sidebar-source-code-display.goml @@ -141,7 +141,7 @@ click: "#sidebar-button" wait-for-css: (".src .sidebar > *", {"visibility": "hidden"}) // We scroll to line 117 to change the scroll position. scroll-to: '//*[@id="117"]' -store-value: (y_offset, "2570") +store-value: (y_offset, "2578") assert-window-property: {"pageYOffset": |y_offset|} // Expanding the sidebar... click: "#sidebar-button" diff --git a/tests/rustdoc-gui/source-anchor-scroll.goml b/tests/rustdoc-gui/source-anchor-scroll.goml index f8794645705..4ad65bbbd61 100644 --- a/tests/rustdoc-gui/source-anchor-scroll.goml +++ b/tests/rustdoc-gui/source-anchor-scroll.goml @@ -8,13 +8,13 @@ set-window-size: (600, 800) assert-property: ("html", {"scrollTop": "0"}) click: '//a[text() = "barbar" and @href="#5-7"]' -assert-property: ("html", {"scrollTop": "200"}) +assert-property: ("html", {"scrollTop": "208"}) click: '//a[text() = "bar" and @href="#28-36"]' -assert-property: ("html", {"scrollTop": "231"}) +assert-property: ("html", {"scrollTop": "239"}) click: '//a[normalize-space() = "sub_fn" and @href="#2-4"]' -assert-property: ("html", {"scrollTop": "128"}) +assert-property: ("html", {"scrollTop": "136"}) // We now check that clicking on lines doesn't change the scroll // Extra information: the "sub_fn" function header is on line 1. click: '//*[@id="6"]' -assert-property: ("html", {"scrollTop": "128"}) +assert-property: ("html", {"scrollTop": "136"}) diff --git a/tests/rustdoc-gui/source-code-page.goml b/tests/rustdoc-gui/source-code-page.goml index 095354c2f4c..afb19462521 100644 --- a/tests/rustdoc-gui/source-code-page.goml +++ b/tests/rustdoc-gui/source-code-page.goml @@ -89,7 +89,7 @@ assert-css: (".src-line-numbers", {"text-align": "right"}) // do anything (and certainly not add a `#NaN` to the URL!). go-to: "file://" + |DOC_PATH| + "/src/test_docs/lib.rs.html" // We use this assert-position to know where we will click. -assert-position: ("//*[@id='1']", {"x": 88, "y": 163}) +assert-position: ("//*[@id='1']", {"x": 88, "y": 171}) // We click on the left of the "1" anchor but still in the "src-line-number" `<pre>`. click: (163, 77) assert-document-property: ({"URL": "/lib.rs.html"}, ENDS_WITH) @@ -165,7 +165,7 @@ assert-css: ("nav.sub", {"flex-direction": "row"}) // offsetTop[nav.sub form] = offsetTop[#main-content] - offsetHeight[nav.sub form] - offsetTop[nav.sub form] assert-position: ("nav.sub form", {"y": 15}) assert-property: ("nav.sub form", {"offsetHeight": 34}) -assert-position: ("h1", {"y": 64}) +assert-position: ("h1", {"y": 68}) // 15 = 64 - 34 - 15 // Now do the same check on moderately-sized, tablet mobile. @@ -173,7 +173,7 @@ set-window-size: (700, 700) assert-css: ("nav.sub", {"flex-direction": "row"}) assert-position: ("nav.sub form", {"y": 8}) assert-property: ("nav.sub form", {"offsetHeight": 34}) -assert-position: ("h1", {"y": 50}) +assert-position: ("h1", {"y": 54}) // 8 = 50 - 34 - 8 // Check the sidebar directory entries have a marker and spacing (tablet). |
