From a4046e93e2d22af856e16aaa0b281785d4df8c1c Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Fri, 23 Sep 2022 18:12:23 +0200 Subject: [PATCH 1/2] Update browser-ui-test version to 0.11.0 --- .../docker/host-x86_64/x86_64-gnu-tools/browser-ui-test.version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 2774f8587f40e..142464bf22b42 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.10.0 \ No newline at end of file +0.11.0 \ No newline at end of file From d30cb5b6633bef645e076fedcc77c5e1d55349b6 Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Fri, 23 Sep 2022 18:12:37 +0200 Subject: [PATCH 2/2] Improve GUI tests by using variables --- src/test/rustdoc-gui/check-stab-in-docblock.goml | 12 +++++++++--- src/test/rustdoc-gui/type-declation-overflow.goml | 4 ++-- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/src/test/rustdoc-gui/check-stab-in-docblock.goml b/src/test/rustdoc-gui/check-stab-in-docblock.goml index 7f965ada594d8..afe25195100c5 100644 --- a/src/test/rustdoc-gui/check-stab-in-docblock.goml +++ b/src/test/rustdoc-gui/check-stab-in-docblock.goml @@ -7,15 +7,21 @@ size: (786, 600) // Confirms that there 3 paragraphs. assert-count: (".top-doc .docblock p", 3) // Checking that there is no scrollable content. +store-property: (clientHeight, ".top-doc .docblock p:nth-of-type(1)", "clientHeight") +store-property: (clientWidth, ".top-doc .docblock p:nth-of-type(1)", "clientWidth") assert-property: ( ".top-doc .docblock p:nth-of-type(1)", - {"scrollHeight": "120", "clientHeight": "120", "scrollWidth": "502", "clientWidth": "502"}, + {"scrollHeight": |clientHeight|, "scrollWidth": |clientWidth|}, ) +store-property: (clientHeight, ".top-doc .docblock p:nth-of-type(2)", "clientHeight") +store-property: (clientWidth, ".top-doc .docblock p:nth-of-type(2)", "clientWidth") assert-property: ( ".top-doc .docblock p:nth-of-type(2)", - {"scrollHeight": "48", "clientHeight": "48", "scrollWidth": "502", "clientWidth": "502"}, + {"scrollHeight": |clientHeight|, "scrollWidth": |clientWidth|}, ) +store-property: (clientHeight, ".top-doc .docblock p:nth-of-type(3)", "clientHeight") +store-property: (clientWidth, ".top-doc .docblock p:nth-of-type(3)", "clientWidth") assert-property: ( ".top-doc .docblock p:nth-of-type(3)", - {"scrollHeight": "48", "clientHeight": "48", "scrollWidth": "502", "clientWidth": "502"}, + {"scrollHeight": |clientHeight|, "scrollWidth": |clientWidth|}, ) diff --git a/src/test/rustdoc-gui/type-declation-overflow.goml b/src/test/rustdoc-gui/type-declation-overflow.goml index 9a46908f9333b..e54ff8ddabe23 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": "500"}) -assert-property: (".mobile-topbar .location", {"clientWidth": "500"}) +store-property: (scrollWidth, ".mobile-topbar .location", "scrollWidth") +assert-property: (".mobile-topbar .location", {"clientWidth": |scrollWidth|}) assert-css: (".mobile-topbar .location", {"overflow-x": "hidden"})