From 1e222ba58aded9a220c5a270e48b47c2878a50fb Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Sat, 19 Jun 2021 12:56:55 +0200 Subject: [PATCH] Update browser-ui-test version --- .../host-x86_64/x86_64-gnu-tools/Dockerfile | 2 +- src/test/rustdoc-gui/basic-code.goml | 2 +- .../rustdoc-gui/check_info_sign_position.goml | 8 +-- src/test/rustdoc-gui/code-sidebar-toggle.goml | 2 +- src/test/rustdoc-gui/escape-key.goml | 26 ++++----- src/test/rustdoc-gui/font-weight.goml | 10 ++-- src/test/rustdoc-gui/hash-item-expansion.goml | 10 ++-- .../rustdoc-gui/impl-default-expansion.goml | 2 +- .../rustdoc-gui/search-result-colors.goml | 4 +- .../search-result-description.goml | 2 +- .../rustdoc-gui/search-result-display.goml | 4 +- .../rustdoc-gui/search-result-keyword.goml | 4 +- ...rch-tab-selection-if-current-is-empty.goml | 6 +-- src/test/rustdoc-gui/shortcuts.goml | 14 ++--- src/test/rustdoc-gui/sidebar.goml | 54 +++++++++---------- src/test/rustdoc-gui/source-code-page.goml | 12 ++--- src/test/rustdoc-gui/theme-change.goml | 4 +- src/test/rustdoc-gui/toggle-docs-mobile.goml | 16 +++--- src/test/rustdoc-gui/toggle-docs.goml | 6 +-- .../toggled-open-implementations.goml | 2 +- .../rustdoc-gui/trait-sidebar-item-order.goml | 12 ++--- 21 files changed, 101 insertions(+), 101 deletions(-) diff --git a/src/ci/docker/host-x86_64/x86_64-gnu-tools/Dockerfile b/src/ci/docker/host-x86_64/x86_64-gnu-tools/Dockerfile index e2c064ee75d..c33d5b4e4dc 100644 --- a/src/ci/docker/host-x86_64/x86_64-gnu-tools/Dockerfile +++ b/src/ci/docker/host-x86_64/x86_64-gnu-tools/Dockerfile @@ -71,7 +71,7 @@ ENV PATH="/node-v14.4.0-linux-x64/bin:${PATH}" # https://github.com/puppeteer/puppeteer/issues/375 # # We also specify the version in case we need to update it to go around cache limitations. -RUN npm install -g browser-ui-test@0.2.14 --unsafe-perm=true +RUN npm install -g browser-ui-test@0.3.0 --unsafe-perm=true ENV RUST_CONFIGURE_ARGS \ --build=x86_64-unknown-linux-gnu \ diff --git a/src/test/rustdoc-gui/basic-code.goml b/src/test/rustdoc-gui/basic-code.goml index d014ed60eb0..27deb2c989c 100644 --- a/src/test/rustdoc-gui/basic-code.goml +++ b/src/test/rustdoc-gui/basic-code.goml @@ -1,3 +1,3 @@ goto: file://|DOC_PATH|/test_docs/index.html click: ".srclink" -assert: (".line-numbers", 1) +assert-count: (".line-numbers", 1) diff --git a/src/test/rustdoc-gui/check_info_sign_position.goml b/src/test/rustdoc-gui/check_info_sign_position.goml index d64ee026137..94e3fe79c94 100644 --- a/src/test/rustdoc-gui/check_info_sign_position.goml +++ b/src/test/rustdoc-gui/check_info_sign_position.goml @@ -2,8 +2,8 @@ goto: file://|DOC_PATH|/test_docs/index.html goto: ./fn.check_list_code_block.html // If the codeblock is the first element of the docblock, the information tooltip must have // have some top margin to avoid going over the toggle (the "[+]"). -assert: (".docblock > .information > .compile_fail", { "margin-top": "16px" }) +assert-css: (".docblock > .information > .compile_fail", { "margin-top": "16px" }) // Checks that the other codeblocks don't have this top margin. -assert: ("ol > li > .information > .compile_fail", { "margin-top": "0px" }) -assert: ("ol > li > .information > .ignore", { "margin-top": "0px" }) -assert: (".docblock > .information > .ignore", { "margin-top": "0px" }) +assert-css: ("ol > li > .information > .compile_fail", { "margin-top": "0px" }) +assert-css: ("ol > li > .information > .ignore", { "margin-top": "0px" }) +assert-css: (".docblock > .information > .ignore", { "margin-top": "0px" }) diff --git a/src/test/rustdoc-gui/code-sidebar-toggle.goml b/src/test/rustdoc-gui/code-sidebar-toggle.goml index 7e7003d4340..00326e9bbc4 100644 --- a/src/test/rustdoc-gui/code-sidebar-toggle.goml +++ b/src/test/rustdoc-gui/code-sidebar-toggle.goml @@ -3,4 +3,4 @@ click: ".srclink" click: "#sidebar-toggle" wait-for: 500 fail: true -assert: ("#source-sidebar", { "left": "-300px" }) +assert-css: ("#source-sidebar", { "left": "-300px" }) diff --git a/src/test/rustdoc-gui/escape-key.goml b/src/test/rustdoc-gui/escape-key.goml index ec034f52c97..a81bd9a4c03 100644 --- a/src/test/rustdoc-gui/escape-key.goml +++ b/src/test/rustdoc-gui/escape-key.goml @@ -2,25 +2,25 @@ goto: file://|DOC_PATH|/test_docs/index.html // First, we check that the search results are hidden when the Escape key is pressed. write: (".search-input", "test") wait-for: "#search > h1" // The search element is empty before the first search -assert: ("#search", "class", "content") -assert: ("#main", "class", "content hidden") +assert-attr: ("#search", {"class": "content"}) +assert-attr: ("#main", {"class": "content hidden"}) press-key: "Escape" -assert: ("#search", "class", "content hidden") -assert: ("#main", "class", "content") +assert-attr: ("#search", {"class": "content hidden"}) +assert-attr: ("#main", {"class": "content"}) // Check that focusing the search input brings back the search results focus: ".search-input" -assert: ("#search", "class", "content") -assert: ("#main", "class", "content hidden") +assert-attr: ("#search", {"class": "content"}) +assert-attr: ("#main", {"class": "content hidden"}) // Now let's check that when the help popup is displayed and we press Escape, it doesn't // hide the search results too. click: "#help-button" -assert: ("#help", "class", "") +assert-attr: ("#help", {"class": ""}) press-key: "Escape" -assert: ("#help", "class", "hidden") -assert: ("#search", "class", "content") -assert: ("#main", "class", "content hidden") +assert-attr: ("#help", {"class": "hidden"}) +assert-attr: ("#search", {"class": "content"}) +assert-attr: ("#main", {"class": "content hidden"}) // Check that Escape hides the search results when a search result is focused. focus: ".search-input" @@ -29,6 +29,6 @@ press-key: "ArrowDown" assert-false: ".search-input:focus" assert: "#results a:focus" press-key: "Escape" -assert: ("#help", "class", "hidden") -assert: ("#search", "class", "content hidden") -assert: ("#main", "class", "content") +assert-attr: ("#help", {"class": "hidden"}) +assert-attr: ("#search", {"class": "content hidden"}) +assert-attr: ("#main", {"class": "content"}) diff --git a/src/test/rustdoc-gui/font-weight.goml b/src/test/rustdoc-gui/font-weight.goml index d8ad6c2e3f5..80618112103 100644 --- a/src/test/rustdoc-gui/font-weight.goml +++ b/src/test/rustdoc-gui/font-weight.goml @@ -1,7 +1,7 @@ goto: file://|DOC_PATH|/lib2/struct.Foo.html // This test checks that the font weight is correctly applied. -assert: ("//*[@class='docblock type-decl']//a[text()='Alias']", {"font-weight": "400"}) -assert: ("//*[@class='structfield small-section-header']//a[text()='Alias']", {"font-weight": "400"}) -assert: ("#method\.a_method > code", {"font-weight": "600"}) -assert: ("#associatedtype\.X > code", {"font-weight": "600"}) -assert: ("#associatedconstant\.Y > code", {"font-weight": "600"}) +assert-css: ("//*[@class='docblock type-decl']//a[text()='Alias']", {"font-weight": "400"}) +assert-css: ("//*[@class='structfield small-section-header']//a[text()='Alias']", {"font-weight": "400"}) +assert-css: ("#method\.a_method > code", {"font-weight": "600"}) +assert-css: ("#associatedtype\.X > code", {"font-weight": "600"}) +assert-css: ("#associatedconstant\.Y > code", {"font-weight": "600"}) diff --git a/src/test/rustdoc-gui/hash-item-expansion.goml b/src/test/rustdoc-gui/hash-item-expansion.goml index d5f9d4fc58b..62c1f200123 100644 --- a/src/test/rustdoc-gui/hash-item-expansion.goml +++ b/src/test/rustdoc-gui/hash-item-expansion.goml @@ -1,15 +1,15 @@ // This test ensures that the element corresponding to the hash is displayed. goto: file://|DOC_PATH|/test_docs/struct.Foo.html#method.borrow // In the blanket implementations list, "Borrow" is the second one, hence the ":nth(2)". -assert: ("#blanket-implementations-list > details:nth-child(2)", "open", "") +assert-attr: ("#blanket-implementations-list > details:nth-child(2)", {"open": ""}) // We first check that the impl block is open by default. -assert: ("#implementations + details", "open", "") +assert-attr: ("#implementations + details", {"open": ""}) // We collapse it. click: "#implementations + details > summary" // We check that it was collapsed as expected. -assert-false: ("#implementations + details", "open", "") +assert-attr-false: ("#implementations + details", {"open": ""}) // To ensure that we will click on the currently hidden method. -assert: (".sidebar-links > a", "must_use") +assert-text: (".sidebar-links > a", "must_use") click: ".sidebar-links > a" // We check that the impl block was opened as expected so that we can see the method. -assert: ("#implementations + details", "open", "") +assert-attr: ("#implementations + details", {"open": ""}) diff --git a/src/test/rustdoc-gui/impl-default-expansion.goml b/src/test/rustdoc-gui/impl-default-expansion.goml index 3f1e7ec4a78..266b66d586f 100644 --- a/src/test/rustdoc-gui/impl-default-expansion.goml +++ b/src/test/rustdoc-gui/impl-default-expansion.goml @@ -1,3 +1,3 @@ // This test ensures that the impl blocks are open by default. goto: file://|DOC_PATH|/test_docs/struct.Foo.html -assert: ("#main > details.implementors-toggle", "open", "") +assert-attr: ("#main > details.implementors-toggle", {"open": ""}) diff --git a/src/test/rustdoc-gui/search-result-colors.goml b/src/test/rustdoc-gui/search-result-colors.goml index 25a01512159..6ed62006151 100644 --- a/src/test/rustdoc-gui/search-result-colors.goml +++ b/src/test/rustdoc-gui/search-result-colors.goml @@ -10,5 +10,5 @@ write: (".search-input", "thisisanalias") // Waiting for the search results to appear... wait-for: "#titles" // Checking that the colors for the alias element are the ones expected. -assert: (".result-name > .alias", {"color": "rgb(255, 255, 255)"}) -assert: (".result-name > .alias > .grey", {"color": "rgb(204, 204, 204)"}) +assert-css: (".result-name > .alias", {"color": "rgb(255, 255, 255)"}) +assert-css: (".result-name > .alias > .grey", {"color": "rgb(204, 204, 204)"}) diff --git a/src/test/rustdoc-gui/search-result-description.goml b/src/test/rustdoc-gui/search-result-description.goml index a50d03cf489..d8cb6ee5731 100644 --- a/src/test/rustdoc-gui/search-result-description.goml +++ b/src/test/rustdoc-gui/search-result-description.goml @@ -2,4 +2,4 @@ goto: file://|DOC_PATH|/test_docs/index.html?search=some_more_function // Waiting for the search results to appear... wait-for: "#titles" -assert: (".search-results .desc code", "format!") +assert-text: (".search-results .desc code", "format!") diff --git a/src/test/rustdoc-gui/search-result-display.goml b/src/test/rustdoc-gui/search-result-display.goml index 96d15c624f1..ea94e5640fb 100644 --- a/src/test/rustdoc-gui/search-result-display.goml +++ b/src/test/rustdoc-gui/search-result-display.goml @@ -5,8 +5,8 @@ write: (".search-input", "test") wait-for: "#titles" // The width is returned by "getComputedStyle" which returns the exact number instead of the // CSS rule which is "50%"... -assert: (".search-results div.desc", {"width": "320px"}) +assert-css: (".search-results div.desc", {"width": "320px"}) size: (600, 100) // As counter-intuitive as it may seem, in this width, the width is "100%", which is why // when computed it's larger. -assert: (".search-results div.desc", {"width": "570px"}) +assert-css: (".search-results div.desc", {"width": "570px"}) diff --git a/src/test/rustdoc-gui/search-result-keyword.goml b/src/test/rustdoc-gui/search-result-keyword.goml index e7612d66371..5342d431d99 100644 --- a/src/test/rustdoc-gui/search-result-keyword.goml +++ b/src/test/rustdoc-gui/search-result-keyword.goml @@ -6,5 +6,5 @@ wait-for: "#titles" // less good. // // Checking that the CSS is displaying " (keyword)" in italic. -assert: (".result-name span.keyword > i", "(keyword)") -assert: (".result-name span.keyword", "CookieMonster (keyword)") +assert-text: (".result-name span.keyword > i", "(keyword)") +assert-text: (".result-name span.keyword", "CookieMonster (keyword)") diff --git a/src/test/rustdoc-gui/search-tab-selection-if-current-is-empty.goml b/src/test/rustdoc-gui/search-tab-selection-if-current-is-empty.goml index c828c72e910..88a0b340415 100644 --- a/src/test/rustdoc-gui/search-tab-selection-if-current-is-empty.goml +++ b/src/test/rustdoc-gui/search-tab-selection-if-current-is-empty.goml @@ -2,7 +2,7 @@ goto: file://|DOC_PATH|/test_docs/index.html write: (".search-input", "Foo") // Waiting for the search results to appear... wait-for: "#titles" -assert: ("#titles > button:nth-of-type(1)", "class", "selected") +assert-attr: ("#titles > button:nth-of-type(1)", {"class": "selected"}) // To go back to the original "state" goto: file://|DOC_PATH|/test_docs/index.html @@ -10,7 +10,7 @@ write: (".search-input", "-> String") // Waiting for the search results to appear... wait-for: "#titles" // With this search, only the last tab shouldn't be empty so it should be selected. -assert: ("#titles > button:nth-of-type(3)", "class", "selected") +assert-attr: ("#titles > button:nth-of-type(3)", {"class": "selected"}) // To go back to the original "state" goto: file://|DOC_PATH|/test_docs/index.html @@ -18,4 +18,4 @@ write: (".search-input", "-> Something") // Waiting for the search results to appear... wait-for: "#titles" // With this search, all the tabs are empty so the first one should remain selected. -assert: ("#titles > button:nth-of-type(1)", "class", "selected") +assert-attr: ("#titles > button:nth-of-type(1)", {"class": "selected"}) diff --git a/src/test/rustdoc-gui/shortcuts.goml b/src/test/rustdoc-gui/shortcuts.goml index 884c38d85fb..42d945d0eb8 100644 --- a/src/test/rustdoc-gui/shortcuts.goml +++ b/src/test/rustdoc-gui/shortcuts.goml @@ -8,19 +8,19 @@ press-key: "Escape" assert-false: "input.search-input:focus" // We now check for the help popup. press-key: "?" -assert: ("#help", {"display": "flex"}) +assert-css: ("#help", {"display": "flex"}) assert-false: "#help.hidden" press-key: "Escape" -assert: ("#help.hidden", {"display": "none"}) +assert-css: ("#help.hidden", {"display": "none"}) // Check for the themes list. -assert: ("#theme-choices", {"display": "none"}) +assert-css: ("#theme-choices", {"display": "none"}) press-key: "t" -assert: ("#theme-choices", {"display": "block"}) +assert-css: ("#theme-choices", {"display": "block"}) press-key: "t" // We ensure that 't' hides back the menu. -assert: ("#theme-choices", {"display": "none"}) +assert-css: ("#theme-choices", {"display": "none"}) press-key: "t" -assert: ("#theme-choices", {"display": "block"}) +assert-css: ("#theme-choices", {"display": "block"}) press-key: "Escape" // We ensure that 'Escape' hides the menu too. -assert: ("#theme-choices", {"display": "none"}) +assert-css: ("#theme-choices", {"display": "none"}) diff --git a/src/test/rustdoc-gui/sidebar.goml b/src/test/rustdoc-gui/sidebar.goml index e0e6d19cace..4f6b3aded18 100644 --- a/src/test/rustdoc-gui/sidebar.goml +++ b/src/test/rustdoc-gui/sidebar.goml @@ -1,23 +1,23 @@ goto: file://|DOC_PATH|/test_docs/index.html -assert: (".sidebar > .location", "Crate test_docs") +assert-text: (".sidebar > .location", "Crate test_docs") // In modules, we only have one "location" element. -assert: (".sidebar .location", 1) -assert: (".sidebar-elems > #all-types", "See all test_docs's items") +assert-count: (".sidebar .location", 1) +assert-text: (".sidebar-elems > #all-types", "See all test_docs's items") // We check that we have the crates list and that the "current" on is "test_docs". -assert: (".sidebar-elems > .crate > ul > li > a.current", "test_docs") +assert-text: (".sidebar-elems > .crate > ul > li > a.current", "test_docs") // And we're also supposed to have the list of items in the current module. -assert: (".sidebar-elems > .items > ul > li:nth-child(1)", "Modules") -assert: (".sidebar-elems > .items > ul > li:nth-child(2)", "Structs") -assert: (".sidebar-elems > .items > ul > li:nth-child(3)", "Enums") -assert: (".sidebar-elems > .items > ul > li:nth-child(4)", "Traits") -assert: (".sidebar-elems > .items > ul > li:nth-child(5)", "Functions") -assert: (".sidebar-elems > .items > ul > li:nth-child(6)", "Type Definitions") -assert: (".sidebar-elems > .items > ul > li:nth-child(7)", "Keywords") -assert: ("#structs + table td > a", "Foo") +assert-text: (".sidebar-elems > .items > ul > li:nth-child(1)", "Modules") +assert-text: (".sidebar-elems > .items > ul > li:nth-child(2)", "Structs") +assert-text: (".sidebar-elems > .items > ul > li:nth-child(3)", "Enums") +assert-text: (".sidebar-elems > .items > ul > li:nth-child(4)", "Traits") +assert-text: (".sidebar-elems > .items > ul > li:nth-child(5)", "Functions") +assert-text: (".sidebar-elems > .items > ul > li:nth-child(6)", "Type Definitions") +assert-text: (".sidebar-elems > .items > ul > li:nth-child(7)", "Keywords") +assert-text: ("#structs + table td > a", "Foo") click: "#structs + table td > a" // PAGE: struct.Foo.html -assert: (".sidebar .location", 2) +assert-count: (".sidebar .location", 2) // We check that there is no crate listed outside of the top level. assert-false: ".sidebar-elems > .crate" // We now go back to the crate page to click on the "lib2" crate link. @@ -26,35 +26,35 @@ click: ".sidebar-elems > .crate > ul > li:first-child > a" // PAGE: lib2/index.html goto: file://|DOC_PATH|/lib2/index.html -assert: (".sidebar > .location", "Crate lib2") +assert-text: (".sidebar > .location", "Crate lib2") // We check that we have the crates list and that the "current" on is now "lib2". -assert: (".sidebar-elems > .crate > ul > li > a.current", "lib2") +assert-text: (".sidebar-elems > .crate > ul > li > a.current", "lib2") // We now go to the "foobar" function page. -assert: (".sidebar-elems > .items > ul > li:nth-child(1)", "Modules") -assert: (".sidebar-elems > .items > ul > li:nth-child(2)", "Structs") -assert: (".sidebar-elems > .items > ul > li:nth-child(3)", "Traits") -assert: (".sidebar-elems > .items > ul > li:nth-child(4)", "Functions") -assert: (".sidebar-elems > .items > ul > li:nth-child(5)", "Type Definitions") -assert: ("#functions + table td > a", "foobar") +assert-text: (".sidebar-elems > .items > ul > li:nth-child(1)", "Modules") +assert-text: (".sidebar-elems > .items > ul > li:nth-child(2)", "Structs") +assert-text: (".sidebar-elems > .items > ul > li:nth-child(3)", "Traits") +assert-text: (".sidebar-elems > .items > ul > li:nth-child(4)", "Functions") +assert-text: (".sidebar-elems > .items > ul > li:nth-child(5)", "Type Definitions") +assert-text: ("#functions + table td > a", "foobar") click: "#functions + table td > a" // PAGE: fn.foobar.html // In items containing no items (like functions or constants) and in modules, we have one // "location" elements. -assert: (".sidebar .location", 1) +assert-count: (".sidebar .location", 1) // There is a "
" tag between "in" and "lib2", but it doesn't count as a space. -assert: (".sidebar .sidebar-elems .location", "Other items inlib2") +assert-text: (".sidebar .sidebar-elems .location", "Other items inlib2") // We check that we don't have the crate list. assert-false: ".sidebar-elems > .crate" goto: ./module/index.html -assert: (".sidebar > .location", "Module module") +assert-text: (".sidebar > .location", "Module module") // We check that we don't have the crate list. assert-false: ".sidebar-elems > .crate" goto: ./sub_module/sub_sub_module/index.html -assert: (".sidebar > .location", "Module sub_sub_module") +assert-text: (".sidebar > .location", "Module sub_sub_module") // We check that we don't have the crate list. assert-false: ".sidebar-elems > .crate" -assert: (".sidebar-elems > .items > ul > li:nth-child(1)", "Functions") -assert: ("#functions + table td > a", "foo") +assert-text: (".sidebar-elems > .items > ul > li:nth-child(1)", "Functions") +assert-text: ("#functions + table td > a", "foo") diff --git a/src/test/rustdoc-gui/source-code-page.goml b/src/test/rustdoc-gui/source-code-page.goml index ff33a541a18..20396e26895 100644 --- a/src/test/rustdoc-gui/source-code-page.goml +++ b/src/test/rustdoc-gui/source-code-page.goml @@ -3,11 +3,11 @@ goto: file://|DOC_PATH|/src/test_docs/lib.rs.html click: (40, 224) // This is the position of the span for line 4. // Unfortunately, "#4" isn't a valid query selector, so we have to go around that limitation // by instead getting the nth span. -assert: (".line-numbers > span:nth-child(4)", "class", "line-highlighted") +assert-attr: (".line-numbers > span:nth-child(4)", {"class": "line-highlighted"}) // We now check that the good spans are highlighted goto: file://|DOC_PATH|/src/test_docs/lib.rs.html#4-6 -assert-false: (".line-numbers > span:nth-child(3)", "class", "line-highlighted") -assert: (".line-numbers > span:nth-child(4)", "class", "line-highlighted") -assert: (".line-numbers > span:nth-child(5)", "class", "line-highlighted") -assert: (".line-numbers > span:nth-child(6)", "class", "line-highlighted") -assert-false: (".line-numbers > span:nth-child(7)", "class", "line-highlighted") +assert-attr-false: (".line-numbers > span:nth-child(3)", {"class": "line-highlighted"}) +assert-attr: (".line-numbers > span:nth-child(4)", {"class": "line-highlighted"}) +assert-attr: (".line-numbers > span:nth-child(5)", {"class": "line-highlighted"}) +assert-attr: (".line-numbers > span:nth-child(6)", {"class": "line-highlighted"}) +assert-attr-false: (".line-numbers > span:nth-child(7)", {"class": "line-highlighted"}) diff --git a/src/test/rustdoc-gui/theme-change.goml b/src/test/rustdoc-gui/theme-change.goml index bc9063edd1e..5221cda2f1f 100644 --- a/src/test/rustdoc-gui/theme-change.goml +++ b/src/test/rustdoc-gui/theme-change.goml @@ -3,8 +3,8 @@ click: "#theme-picker" click: "#theme-choices > button:first-child" wait-for: 500 // should be the ayu theme so let's check the color -assert: ("body", { "background-color": "rgb(15, 20, 25)" }) +assert-css: ("body", { "background-color": "rgb(15, 20, 25)" }) click: "#theme-choices > button:last-child" wait-for: 500 // should be the light theme so let's check the color -assert: ("body", { "background-color": "rgb(255, 255, 255)" }) +assert-css: ("body", { "background-color": "rgb(255, 255, 255)" }) diff --git a/src/test/rustdoc-gui/toggle-docs-mobile.goml b/src/test/rustdoc-gui/toggle-docs-mobile.goml index fcdfc0344db..9ec91aba881 100644 --- a/src/test/rustdoc-gui/toggle-docs-mobile.goml +++ b/src/test/rustdoc-gui/toggle-docs-mobile.goml @@ -1,21 +1,21 @@ goto: file://|DOC_PATH|/test_docs/struct.Foo.html size: (433, 600) -assert: (".top-doc", "open", "") +assert-attr: (".top-doc", {"open": ""}) click: (4, 280) // This is the position of the top doc comment toggle -assert-false: (".top-doc", "open", "") +assert-attr-false: (".top-doc", {"open": ""}) click: (4, 280) -assert: (".top-doc", "open", "") +assert-attr: (".top-doc", {"open": ""}) // To ensure that the toggle isn't over the text, we check that the toggle isn't clicked. click: (3, 280) -assert: (".top-doc", "open", "") +assert-attr: (".top-doc", {"open": ""}) // Now we do the same but with a little bigger width size: (600, 600) -assert: (".top-doc", "open", "") +assert-attr: (".top-doc", {"open": ""}) click: (4, 240) // New Y position since all search elements are back on one line. -assert-false: (".top-doc", "open", "") +assert-attr-false: (".top-doc", {"open": ""}) click: (4, 240) -assert: (".top-doc", "open", "") +assert-attr: (".top-doc", {"open": ""}) // To ensure that the toggle isn't over the text, we check that the toggle isn't clicked. click: (3, 240) -assert: (".top-doc", "open", "") +assert-attr: (".top-doc", {"open": ""}) diff --git a/src/test/rustdoc-gui/toggle-docs.goml b/src/test/rustdoc-gui/toggle-docs.goml index 062bc7d51e5..601998b7bd2 100644 --- a/src/test/rustdoc-gui/toggle-docs.goml +++ b/src/test/rustdoc-gui/toggle-docs.goml @@ -1,10 +1,10 @@ goto: file://|DOC_PATH|/test_docs/index.html -assert: ("#main > details.top-doc", "open", "") +assert-attr: ("#main > details.top-doc", {"open": ""}) click: "#toggle-all-docs" wait-for: 1000 // This is now collapsed so there shouldn't be the "open" attribute on details. -assert-false: ("#main > details.top-doc", "open", "") +assert-attr-false: ("#main > details.top-doc", {"open": ""}) click: "#toggle-all-docs" wait-for: 1000 // Not collapsed anymore so the "open" attribute should be back. -assert: ("#main > details.top-doc", "open", "") +assert-attr: ("#main > details.top-doc", {"open": ""}) diff --git a/src/test/rustdoc-gui/toggled-open-implementations.goml b/src/test/rustdoc-gui/toggled-open-implementations.goml index 96a5492edef..d8615c207b2 100644 --- a/src/test/rustdoc-gui/toggled-open-implementations.goml +++ b/src/test/rustdoc-gui/toggled-open-implementations.goml @@ -2,4 +2,4 @@ // has all the implementations toggled open by default, so users can // find method names in those implementations with Ctrl-F. goto: file://|DOC_PATH|/test_docs/struct.Foo.html -assert: (".rustdoc-toggle.implementors-toggle", "open", "") +assert-attr: (".rustdoc-toggle.implementors-toggle", {"open": ""}) diff --git a/src/test/rustdoc-gui/trait-sidebar-item-order.goml b/src/test/rustdoc-gui/trait-sidebar-item-order.goml index 2e9f85336ec..739745792c2 100644 --- a/src/test/rustdoc-gui/trait-sidebar-item-order.goml +++ b/src/test/rustdoc-gui/trait-sidebar-item-order.goml @@ -1,7 +1,7 @@ goto: file://|DOC_PATH|/test_docs/trait.AnotherOne.html -assert: (".sidebar-links a:nth-of-type(1)", "another") -assert: (".sidebar-links a:nth-of-type(2)", "func1") -assert: (".sidebar-links a:nth-of-type(3)", "func2") -assert: (".sidebar-links a:nth-of-type(4)", "func3") -assert: (".sidebar-links a:nth-of-type(5)", "hello") -assert: (".sidebar-links a:nth-of-type(6)", "why_not") +assert-text: (".sidebar-links a:nth-of-type(1)", "another") +assert-text: (".sidebar-links a:nth-of-type(2)", "func1") +assert-text: (".sidebar-links a:nth-of-type(3)", "func2") +assert-text: (".sidebar-links a:nth-of-type(4)", "func3") +assert-text: (".sidebar-links a:nth-of-type(5)", "hello") +assert-text: (".sidebar-links a:nth-of-type(6)", "why_not")