diff --git a/src/test/rustdoc-gui/basic-code.goml b/src/test/rustdoc-gui/basic-code.goml deleted file mode 100644 index d014ed60eb039..0000000000000 --- a/src/test/rustdoc-gui/basic-code.goml +++ /dev/null @@ -1,3 +0,0 @@ -goto: file://|DOC_PATH|/test_docs/index.html -click: ".srclink" -assert: (".line-numbers", 1) diff --git a/src/test/rustdoc-gui/basic.goml b/src/test/rustdoc-gui/basic.goml deleted file mode 100644 index 44fcec3393744..0000000000000 --- a/src/test/rustdoc-gui/basic.goml +++ /dev/null @@ -1,4 +0,0 @@ -goto: file://|DOC_PATH|/test_docs/index.html -assert: ("#functions") -goto: ./struct.Foo.html -assert: ("div.type-decl") diff --git a/src/test/rustdoc-gui/check_info_sign_position.goml b/src/test/rustdoc-gui/check_info_sign_position.goml deleted file mode 100644 index d64ee0261370c..0000000000000 --- a/src/test/rustdoc-gui/check_info_sign_position.goml +++ /dev/null @@ -1,9 +0,0 @@ -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" }) -// 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" }) diff --git a/src/test/rustdoc-gui/code-sidebar-toggle.goml b/src/test/rustdoc-gui/code-sidebar-toggle.goml deleted file mode 100644 index 7e7003d4340a3..0000000000000 --- a/src/test/rustdoc-gui/code-sidebar-toggle.goml +++ /dev/null @@ -1,6 +0,0 @@ -goto: file://|DOC_PATH|/test_docs/index.html -click: ".srclink" -click: "#sidebar-toggle" -wait-for: 500 -fail: true -assert: ("#source-sidebar", { "left": "-300px" }) diff --git a/src/test/rustdoc-gui/escape-key.goml b/src/test/rustdoc-gui/escape-key.goml deleted file mode 100644 index ec034f52c972c..0000000000000 --- a/src/test/rustdoc-gui/escape-key.goml +++ /dev/null @@ -1,34 +0,0 @@ -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") -press-key: "Escape" -assert: ("#search", "class", "content hidden") -assert: ("#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") - -// 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", "") -press-key: "Escape" -assert: ("#help", "class", "hidden") -assert: ("#search", "class", "content") -assert: ("#main", "class", "content hidden") - -// Check that Escape hides the search results when a search result is focused. -focus: ".search-input" -assert: ".search-input:focus" -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") diff --git a/src/test/rustdoc-gui/hash-item-expansion.goml b/src/test/rustdoc-gui/hash-item-expansion.goml deleted file mode 100644 index 1248d11200e6c..0000000000000 --- a/src/test/rustdoc-gui/hash-item-expansion.goml +++ /dev/null @@ -1,18 +0,0 @@ -// 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", "") -// Please note the "\" below is needed because otherwise ".borrow" would be interpreted as -// a class selector. -assert: ("#method\.borrow", {"display": "flex"}) -// We first check that the impl block is open by default. -assert: ("#implementations + details", "open", "") -// We collapse it. -click: "#implementations + details > summary" -// We check that it was collapsed as expected. -assert-false: ("#implementations + details", "open", "") -// To ensure that we will click on the currently hidden method. -assert: (".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", "") diff --git a/src/test/rustdoc-gui/impl-default-expansion.goml b/src/test/rustdoc-gui/impl-default-expansion.goml deleted file mode 100644 index 3f1e7ec4a789c..0000000000000 --- a/src/test/rustdoc-gui/impl-default-expansion.goml +++ /dev/null @@ -1,3 +0,0 @@ -// 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", "") diff --git a/src/test/rustdoc-gui/list_code_block.goml b/src/test/rustdoc-gui/list_code_block.goml deleted file mode 100644 index 7d3490e9d9410..0000000000000 --- a/src/test/rustdoc-gui/list_code_block.goml +++ /dev/null @@ -1,3 +0,0 @@ -goto: file://|DOC_PATH|/test_docs/index.html -goto: ./fn.check_list_code_block.html -assert: ("pre.rust.fn") diff --git a/src/test/rustdoc-gui/search-input-mobile.goml b/src/test/rustdoc-gui/search-input-mobile.goml deleted file mode 100644 index 5c95db70aecdd..0000000000000 --- a/src/test/rustdoc-gui/search-input-mobile.goml +++ /dev/null @@ -1,11 +0,0 @@ -// Test to ensure that you can click on the search input, whatever the width. -// The PR which fixed it is: https://github.com/rust-lang/rust/pull/81592 -goto: file://|DOC_PATH|/test_docs/index.html -size: (463, 700) -// We first check that the search input isn't already focused. -assert-false: ("input.search-input:focus") -click: "input.search-input" -reload: -size: (750, 700) -click: "input.search-input" -assert: ("input.search-input:focus") diff --git a/src/test/rustdoc-gui/search-result-colors.goml b/src/test/rustdoc-gui/search-result-colors.goml deleted file mode 100644 index 25a015121592c..0000000000000 --- a/src/test/rustdoc-gui/search-result-colors.goml +++ /dev/null @@ -1,14 +0,0 @@ -goto: file://|DOC_PATH|/test_docs/index.html -// We set the theme so we're sure that the corect values will be used, whatever the computer -// this test is running on. -local-storage: {"rustdoc-theme": "dark", "rustdoc-preferred-dark-theme": "dark", "rustdoc-use-system-theme": "false"} -// If the text isn't displayed, the browser doesn't compute color style correctly... -show-text: true -// We reload the page so the local storage settings are being used. -reload: -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)"}) diff --git a/src/test/rustdoc-gui/search-result-description.goml b/src/test/rustdoc-gui/search-result-description.goml deleted file mode 100644 index a50d03cf48912..0000000000000 --- a/src/test/rustdoc-gui/search-result-description.goml +++ /dev/null @@ -1,5 +0,0 @@ -// This test is to ensure that the codeblocks are correctly rendered in the search results. -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!") diff --git a/src/test/rustdoc-gui/search-result-display.goml b/src/test/rustdoc-gui/search-result-display.goml deleted file mode 100644 index 96d15c624f115..0000000000000 --- a/src/test/rustdoc-gui/search-result-display.goml +++ /dev/null @@ -1,12 +0,0 @@ -goto: file://|DOC_PATH|/test_docs/index.html -size: (900, 1000) -write: (".search-input", "test") -// Waiting for the search results to appear... -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"}) -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"}) diff --git a/src/test/rustdoc-gui/search-result-keyword.goml b/src/test/rustdoc-gui/search-result-keyword.goml deleted file mode 100644 index e7612d663717a..0000000000000 --- a/src/test/rustdoc-gui/search-result-keyword.goml +++ /dev/null @@ -1,10 +0,0 @@ -goto: file://|DOC_PATH|/test_docs/index.html -write: (".search-input", "CookieMonster") -// Waiting for the search results to appear... -wait-for: "#titles" -// Note: The two next assert commands could be merged as one but readability would be -// 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)") 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 deleted file mode 100644 index c828c72e910d5..0000000000000 --- a/src/test/rustdoc-gui/search-tab-selection-if-current-is-empty.goml +++ /dev/null @@ -1,21 +0,0 @@ -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") - -// To go back to the original "state" -goto: file://|DOC_PATH|/test_docs/index.html -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") - -// To go back to the original "state" -goto: file://|DOC_PATH|/test_docs/index.html -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") diff --git a/src/test/rustdoc-gui/shortcuts.goml b/src/test/rustdoc-gui/shortcuts.goml deleted file mode 100644 index 884c38d85fbdb..0000000000000 --- a/src/test/rustdoc-gui/shortcuts.goml +++ /dev/null @@ -1,26 +0,0 @@ -// Check that the various shortcuts are working. -goto: file://|DOC_PATH|/test_docs/index.html -// We first check that the search input isn't already focused. -assert-false: "input.search-input:focus" -press-key: "s" -assert: "input.search-input:focus" -press-key: "Escape" -assert-false: "input.search-input:focus" -// We now check for the help popup. -press-key: "?" -assert: ("#help", {"display": "flex"}) -assert-false: "#help.hidden" -press-key: "Escape" -assert: ("#help.hidden", {"display": "none"}) -// Check for the themes list. -assert: ("#theme-choices", {"display": "none"}) -press-key: "t" -assert: ("#theme-choices", {"display": "block"}) -press-key: "t" -// We ensure that 't' hides back the menu. -assert: ("#theme-choices", {"display": "none"}) -press-key: "t" -assert: ("#theme-choices", {"display": "block"}) -press-key: "Escape" -// We ensure that 'Escape' hides the menu too. -assert: ("#theme-choices", {"display": "none"}) diff --git a/src/test/rustdoc-gui/sidebar-mobile.goml b/src/test/rustdoc-gui/sidebar-mobile.goml deleted file mode 100644 index 9a1442e48a9ea..0000000000000 --- a/src/test/rustdoc-gui/sidebar-mobile.goml +++ /dev/null @@ -1,10 +0,0 @@ -// This test ensure that the sidebar isn't "hidden" on mobile but instead moved out of the viewport. -// This is especially important for devices for "text-first" content (like for users with -// sight issues). -goto: file://|DOC_PATH|/test_docs/struct.Foo.html -// Switching to "mobile view" by reducing the width to 600px. -size: (600, 600) -assert-css: (".sidebar-elems", {"display": "block", "left": "-246px"}) -// Opening the sidebar menu. -click: ".sidebar-menu" -assert-css: (".sidebar-elems", {"display": "block", "left": "0px"}) diff --git a/src/test/rustdoc-gui/sidebar.goml b/src/test/rustdoc-gui/sidebar.goml deleted file mode 100644 index 7703677154ef9..0000000000000 --- a/src/test/rustdoc-gui/sidebar.goml +++ /dev/null @@ -1,57 +0,0 @@ -goto: file://|DOC_PATH|/test_docs/index.html -assert: (".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") -// 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") -// 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") -click: "#structs + table td > a" - -// PAGE: struct.Foo.html -assert: (".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. -goto: file://|DOC_PATH|/test_docs/index.html -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") -// 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") -// 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)", "Functions") -assert: ("#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) -// There is a "
" tag between "in" and "lib2", but it doesn't count as a space. -assert: (".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") -// 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") -// 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") diff --git a/src/test/rustdoc-gui/source-code-page.goml b/src/test/rustdoc-gui/source-code-page.goml deleted file mode 100644 index ff33a541a1801..0000000000000 --- a/src/test/rustdoc-gui/source-code-page.goml +++ /dev/null @@ -1,13 +0,0 @@ -goto: file://|DOC_PATH|/src/test_docs/lib.rs.html -// Check that we can click on the line number. -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") -// 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") diff --git a/src/test/rustdoc-gui/theme-change.goml b/src/test/rustdoc-gui/theme-change.goml deleted file mode 100644 index bc9063edd1e7a..0000000000000 --- a/src/test/rustdoc-gui/theme-change.goml +++ /dev/null @@ -1,10 +0,0 @@ -goto: file://|DOC_PATH|/test_docs/index.html -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)" }) -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)" }) diff --git a/src/test/rustdoc-gui/toggle-docs-mobile.goml b/src/test/rustdoc-gui/toggle-docs-mobile.goml deleted file mode 100644 index fcdfc0344db80..0000000000000 --- a/src/test/rustdoc-gui/toggle-docs-mobile.goml +++ /dev/null @@ -1,21 +0,0 @@ -goto: file://|DOC_PATH|/test_docs/struct.Foo.html -size: (433, 600) -assert: (".top-doc", "open", "") -click: (4, 280) // This is the position of the top doc comment toggle -assert-false: (".top-doc", "open", "") -click: (4, 280) -assert: (".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", "") - -// Now we do the same but with a little bigger width -size: (600, 600) -assert: (".top-doc", "open", "") -click: (4, 240) // New Y position since all search elements are back on one line. -assert-false: (".top-doc", "open", "") -click: (4, 240) -assert: (".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", "") diff --git a/src/test/rustdoc-gui/toggle-docs.goml b/src/test/rustdoc-gui/toggle-docs.goml deleted file mode 100644 index 062bc7d51e542..0000000000000 --- a/src/test/rustdoc-gui/toggle-docs.goml +++ /dev/null @@ -1,10 +0,0 @@ -goto: file://|DOC_PATH|/test_docs/index.html -assert: ("#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", "") -click: "#toggle-all-docs" -wait-for: 1000 -// Not collapsed anymore so the "open" attribute should be back. -assert: ("#main > details.top-doc", "open", "") diff --git a/src/test/rustdoc-gui/trait-sidebar-item-order.goml b/src/test/rustdoc-gui/trait-sidebar-item-order.goml deleted file mode 100644 index 2e9f85336ecd8..0000000000000 --- a/src/test/rustdoc-gui/trait-sidebar-item-order.goml +++ /dev/null @@ -1,7 +0,0 @@ -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")