about summary refs log tree commit diff
diff options
context:
space:
mode:
authorDylan DPC <99973273+Dylan-DPC@users.noreply.github.com>2022-09-12 15:21:34 +0530
committerGitHub <noreply@github.com>2022-09-12 15:21:34 +0530
commit8ef557d343a94c3dd4569e6bdbfb7fe34252d0e6 (patch)
treebfd034ca4d579ccc513c89ec66d18488335ed015
parent6bacb6f6e9e1f8519392a08c98201cbd10bc4c5e (diff)
parentd010f95af1b5bc3188b8fcf5bfcaf9aadbfe2299 (diff)
downloadrust-8ef557d343a94c3dd4569e6bdbfb7fe34252d0e6.tar.gz
rust-8ef557d343a94c3dd4569e6bdbfb7fe34252d0e6.zip
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`
-rw-r--r--src/ci/docker/host-x86_64/x86_64-gnu-tools/browser-ui-test.version2
-rw-r--r--src/test/rustdoc-gui/docblock-table-overflow.goml4
-rw-r--r--src/test/rustdoc-gui/sidebar-mobile-scroll.goml8
-rw-r--r--src/test/rustdoc-gui/sidebar-source-code-display.goml6
-rw-r--r--src/test/rustdoc-gui/toggle-click-deadspace.goml5
-rw-r--r--src/test/rustdoc-gui/type-declation-overflow.goml4
6 files changed, 16 insertions, 13 deletions
diff --git a/src/ci/docker/host-x86_64/x86_64-gnu-tools/browser-ui-test.version b/src/ci/docker/host-x86_64/x86_64-gnu-tools/browser-ui-test.version
index b5d0ec558fd..2774f8587f4 100644
--- a/src/ci/docker/host-x86_64/x86_64-gnu-tools/browser-ui-test.version
+++ b/src/ci/docker/host-x86_64/x86_64-gnu-tools/browser-ui-test.version
@@ -1 +1 @@
-0.9.8
\ No newline at end of file
+0.10.0
\ No newline at end of file
diff --git a/src/test/rustdoc-gui/docblock-table-overflow.goml b/src/test/rustdoc-gui/docblock-table-overflow.goml
index af76d2ea427..7f97cf220cc 100644
--- a/src/test/rustdoc-gui/docblock-table-overflow.goml
+++ b/src/test/rustdoc-gui/docblock-table-overflow.goml
@@ -6,7 +6,7 @@ size: (1100, 800)
 compare-elements-property: (".top-doc .docblock", ".top-doc .docblock > p", ["scrollWidth"])
 assert-property: (".top-doc .docblock", {"scrollWidth": "801"})
 // However, since there is overflow in the <table>, its scroll width is bigger.
-assert-property: (".top-doc .docblock table", {"scrollWidth": "1573"})
+assert-property: (".top-doc .docblock table", {"scrollWidth": "1572"})
 
 // Checking it works on other doc blocks as well...
 
@@ -18,4 +18,4 @@ compare-elements-property: (
 )
 assert-property: ("#implementations-list > details .docblock", {"scrollWidth": "801"})
 // However, since there is overflow in the <table>, its scroll width is bigger.
-assert-property: ("#implementations-list > details .docblock table", {"scrollWidth": "1573"})
+assert-property: ("#implementations-list > details .docblock table", {"scrollWidth": "1572"})
diff --git a/src/test/rustdoc-gui/sidebar-mobile-scroll.goml b/src/test/rustdoc-gui/sidebar-mobile-scroll.goml
index b3bcea25338..dc50185f01b 100644
--- a/src/test/rustdoc-gui/sidebar-mobile-scroll.goml
+++ b/src/test/rustdoc-gui/sidebar-mobile-scroll.goml
@@ -6,7 +6,7 @@ assert-css: (".sidebar", {"display": "block", "left": "-1000px"})
 
 // Scroll down.
 scroll-to: "//h2[@id='blanket-implementations']"
-assert-window-property: {"pageYOffset": "702"}
+assert-window-property: {"pageYOffset": "643"}
 
 // Open the sidebar menu.
 click: ".sidebar-menu-toggle"
@@ -21,11 +21,11 @@ assert-window-property: {"pageYOffset": "0"}
 // Close the sidebar menu. Make sure the scroll position gets restored.
 click: ".sidebar-menu-toggle"
 wait-for-css: (".sidebar", {"left": "-1000px"})
-assert-window-property: {"pageYOffset": "702"}
+assert-window-property: {"pageYOffset": "643"}
 
 // Now test that scrollability returns when the browser window is just resized.
 click: ".sidebar-menu-toggle"
 wait-for-css: (".sidebar", {"left": "0px"})
 assert-window-property: {"pageYOffset": "0"}
-size: (900, 900)
-assert-window-property: {"pageYOffset": "702"}
+size: (900, 600)
+assert-window-property: {"pageYOffset": "643"}
diff --git a/src/test/rustdoc-gui/sidebar-source-code-display.goml b/src/test/rustdoc-gui/sidebar-source-code-display.goml
index e4662a10ed5..4321efcdb17 100644
--- a/src/test/rustdoc-gui/sidebar-source-code-display.goml
+++ b/src/test/rustdoc-gui/sidebar-source-code-display.goml
@@ -224,14 +224,14 @@ click: "#sidebar-toggle"
 wait-for-css: (".sidebar", {"width": "0px"})
 // We scroll to line 117 to change the scroll position.
 scroll-to: '//*[@id="117"]'
-assert-window-property: {"pageYOffset": "2519"}
+assert-window-property: {"pageYOffset": "2542"}
 // Expanding the sidebar...
 click: "#sidebar-toggle"
 wait-for-css: (".sidebar", {"width": "500px"})
 click: "#sidebar-toggle"
 wait-for-css: (".sidebar", {"width": "0px"})
 // The "scrollTop" property should be the same.
-assert-window-property: {"pageYOffset": "2519"}
+assert-window-property: {"pageYOffset": "2542"}
 
 // We now check that the scroll position is restored if the window is resized.
 size: (500, 700)
@@ -239,7 +239,7 @@ click: "#sidebar-toggle"
 wait-for-css: ("#source-sidebar", {"visibility": "visible"})
 assert-window-property: {"pageYOffset": "0"}
 size: (900, 900)
-assert-window-property: {"pageYOffset": "2519"}
+assert-window-property: {"pageYOffset": "2542"}
 size: (500, 700)
 click: "#sidebar-toggle"
 wait-for-css: ("#source-sidebar", {"visibility": "hidden"})
diff --git a/src/test/rustdoc-gui/toggle-click-deadspace.goml b/src/test/rustdoc-gui/toggle-click-deadspace.goml
index 4a328c9f9e0..8c3a0bf5bb7 100644
--- a/src/test/rustdoc-gui/toggle-click-deadspace.goml
+++ b/src/test/rustdoc-gui/toggle-click-deadspace.goml
@@ -4,7 +4,10 @@ goto: file://|DOC_PATH|/lib2/struct.Foo.html
 assert-attribute: (".impl-items .rustdoc-toggle", {"open": ""})
 click: "h4.code-header" // This is the position of "pub" in "pub fn a_method"
 assert-attribute: (".impl-items .rustdoc-toggle", {"open": ""})
-click: ".impl-items .rustdoc-toggle summary::before" // This is the position of "[-]" next to that pub fn.
+click-with-offset: (
+    ".impl-items .rustdoc-toggle summary",
+    {"x": -24, "y": 8}, // This is the position of "[-]" next to that pub fn.
+)
 assert-attribute-false: (".impl-items .rustdoc-toggle", {"open": ""})
 
 // Click the "Trait" part of "impl Trait" and verify it navigates.
diff --git a/src/test/rustdoc-gui/type-declation-overflow.goml b/src/test/rustdoc-gui/type-declation-overflow.goml
index 85e03c45e70..9a46908f933 100644
--- a/src/test/rustdoc-gui/type-declation-overflow.goml
+++ b/src/test/rustdoc-gui/type-declation-overflow.goml
@@ -32,6 +32,6 @@ assert-property: (".item-decl pre", {"scrollWidth": "950"})
 size: (600, 600)
 goto: file://|DOC_PATH|/lib2/too_long/struct.SuperIncrediblyLongLongLongLongLongLongLongGigaGigaGigaMegaLongLongLongStructName.html
 // It shouldn't have an overflow in the topbar either.
-assert-property: (".mobile-topbar .location", {"scrollWidth": "502"})
-assert-property: (".mobile-topbar .location", {"clientWidth": "502"})
+assert-property: (".mobile-topbar .location", {"scrollWidth": "500"})
+assert-property: (".mobile-topbar .location", {"clientWidth": "500"})
 assert-css: (".mobile-topbar .location", {"overflow-x": "hidden"})