Skip to content

Commit 8ef557d

Browse files
authored
Rollup merge of #101693 - GuillaumeGomez:update-browser-ui-test-0-10, r=notriddle
Update browser UI test 0 10 The biggest change from this browser-ui-test update is the upgrade of the puppeteer version to `17.1.3` (the latest in short). I also added the command `click-with-offset` to still allow us to click on the `[-]` part. cc `@jsha` r? `@notriddle`
2 parents 6bacb6f + d010f95 commit 8ef557d

File tree

6 files changed

+16
-13
lines changed

6 files changed

+16
-13
lines changed
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.9.8
1+
0.10.0

Diff for: src/test/rustdoc-gui/docblock-table-overflow.goml

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ size: (1100, 800)
66
compare-elements-property: (".top-doc .docblock", ".top-doc .docblock > p", ["scrollWidth"])
77
assert-property: (".top-doc .docblock", {"scrollWidth": "801"})
88
// However, since there is overflow in the <table>, its scroll width is bigger.
9-
assert-property: (".top-doc .docblock table", {"scrollWidth": "1573"})
9+
assert-property: (".top-doc .docblock table", {"scrollWidth": "1572"})
1010

1111
// Checking it works on other doc blocks as well...
1212

@@ -18,4 +18,4 @@ compare-elements-property: (
1818
)
1919
assert-property: ("#implementations-list > details .docblock", {"scrollWidth": "801"})
2020
// However, since there is overflow in the <table>, its scroll width is bigger.
21-
assert-property: ("#implementations-list > details .docblock table", {"scrollWidth": "1573"})
21+
assert-property: ("#implementations-list > details .docblock table", {"scrollWidth": "1572"})

Diff for: src/test/rustdoc-gui/sidebar-mobile-scroll.goml

+4-4
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ assert-css: (".sidebar", {"display": "block", "left": "-1000px"})
66

77
// Scroll down.
88
scroll-to: "//h2[@id='blanket-implementations']"
9-
assert-window-property: {"pageYOffset": "702"}
9+
assert-window-property: {"pageYOffset": "643"}
1010

1111
// Open the sidebar menu.
1212
click: ".sidebar-menu-toggle"
@@ -21,11 +21,11 @@ assert-window-property: {"pageYOffset": "0"}
2121
// Close the sidebar menu. Make sure the scroll position gets restored.
2222
click: ".sidebar-menu-toggle"
2323
wait-for-css: (".sidebar", {"left": "-1000px"})
24-
assert-window-property: {"pageYOffset": "702"}
24+
assert-window-property: {"pageYOffset": "643"}
2525

2626
// Now test that scrollability returns when the browser window is just resized.
2727
click: ".sidebar-menu-toggle"
2828
wait-for-css: (".sidebar", {"left": "0px"})
2929
assert-window-property: {"pageYOffset": "0"}
30-
size: (900, 900)
31-
assert-window-property: {"pageYOffset": "702"}
30+
size: (900, 600)
31+
assert-window-property: {"pageYOffset": "643"}

Diff for: src/test/rustdoc-gui/sidebar-source-code-display.goml

+3-3
Original file line numberDiff line numberDiff line change
@@ -224,22 +224,22 @@ click: "#sidebar-toggle"
224224
wait-for-css: (".sidebar", {"width": "0px"})
225225
// We scroll to line 117 to change the scroll position.
226226
scroll-to: '//*[@id="117"]'
227-
assert-window-property: {"pageYOffset": "2519"}
227+
assert-window-property: {"pageYOffset": "2542"}
228228
// Expanding the sidebar...
229229
click: "#sidebar-toggle"
230230
wait-for-css: (".sidebar", {"width": "500px"})
231231
click: "#sidebar-toggle"
232232
wait-for-css: (".sidebar", {"width": "0px"})
233233
// The "scrollTop" property should be the same.
234-
assert-window-property: {"pageYOffset": "2519"}
234+
assert-window-property: {"pageYOffset": "2542"}
235235

236236
// We now check that the scroll position is restored if the window is resized.
237237
size: (500, 700)
238238
click: "#sidebar-toggle"
239239
wait-for-css: ("#source-sidebar", {"visibility": "visible"})
240240
assert-window-property: {"pageYOffset": "0"}
241241
size: (900, 900)
242-
assert-window-property: {"pageYOffset": "2519"}
242+
assert-window-property: {"pageYOffset": "2542"}
243243
size: (500, 700)
244244
click: "#sidebar-toggle"
245245
wait-for-css: ("#source-sidebar", {"visibility": "hidden"})

Diff for: src/test/rustdoc-gui/toggle-click-deadspace.goml

+4-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@ goto: file://|DOC_PATH|/lib2/struct.Foo.html
44
assert-attribute: (".impl-items .rustdoc-toggle", {"open": ""})
55
click: "h4.code-header" // This is the position of "pub" in "pub fn a_method"
66
assert-attribute: (".impl-items .rustdoc-toggle", {"open": ""})
7-
click: ".impl-items .rustdoc-toggle summary::before" // This is the position of "[-]" next to that pub fn.
7+
click-with-offset: (
8+
".impl-items .rustdoc-toggle summary",
9+
{"x": -24, "y": 8}, // This is the position of "[-]" next to that pub fn.
10+
)
811
assert-attribute-false: (".impl-items .rustdoc-toggle", {"open": ""})
912

1013
// Click the "Trait" part of "impl Trait" and verify it navigates.

Diff for: src/test/rustdoc-gui/type-declation-overflow.goml

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,6 @@ assert-property: (".item-decl pre", {"scrollWidth": "950"})
3232
size: (600, 600)
3333
goto: file://|DOC_PATH|/lib2/too_long/struct.SuperIncrediblyLongLongLongLongLongLongLongGigaGigaGigaMegaLongLongLongStructName.html
3434
// It shouldn't have an overflow in the topbar either.
35-
assert-property: (".mobile-topbar .location", {"scrollWidth": "502"})
36-
assert-property: (".mobile-topbar .location", {"clientWidth": "502"})
35+
assert-property: (".mobile-topbar .location", {"scrollWidth": "500"})
36+
assert-property: (".mobile-topbar .location", {"clientWidth": "500"})
3737
assert-css: (".mobile-topbar .location", {"overflow-x": "hidden"})

0 commit comments

Comments
 (0)