Update rustdoc GUI tests to new browser-ui-test version
This commit is contained in:
parent
8aba3f3264
commit
010fa00b80
@ -4,7 +4,7 @@
|
||||
// anchor and the `impl Foo`. If there were a gap, this would cause an annoying
|
||||
// problem: you hover `impl Foo` to see the anchor, then when you move your
|
||||
// mouse to the left, the anchor disappears before you reach it.
|
||||
goto: "file://" + |DOC_PATH| + "/test_docs/struct.Foo.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/test_docs/struct.Foo.html"
|
||||
// We check that ".item-info" is bigger than its content.
|
||||
move-cursor-to: ".impl"
|
||||
assert-property: (".impl > a.anchor", {"offsetWidth": "8"})
|
||||
|
@ -4,12 +4,12 @@ define-function: (
|
||||
"check-colors",
|
||||
(theme, main_color, title_color, main_heading_color, main_heading_type_color, src_link_color, sidebar_link_color),
|
||||
block {
|
||||
goto: "file://" + |DOC_PATH| + "/staged_api/struct.Foo.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/staged_api/struct.Foo.html"
|
||||
// This is needed to ensure that the text color is computed.
|
||||
show-text: true
|
||||
|
||||
// Setting the theme.
|
||||
local-storage: {"rustdoc-theme": |theme|, "rustdoc-use-system-theme": "false"}
|
||||
set-local-storage: {"rustdoc-theme": |theme|, "rustdoc-use-system-theme": "false"}
|
||||
// We reload the page so the local storage settings are being used.
|
||||
reload:
|
||||
|
||||
@ -48,9 +48,9 @@ define-function: (
|
||||
{"color": |src_link_color|, "text-decoration": "none solid " + |src_link_color|},
|
||||
)
|
||||
|
||||
goto: "file://" + |DOC_PATH| + "/test_docs/struct.HeavilyDocumentedStruct.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/test_docs/struct.HeavilyDocumentedStruct.html"
|
||||
// Since we changed page, we need to set the theme again.
|
||||
local-storage: {"rustdoc-theme": |theme|, "rustdoc-use-system-theme": "false"}
|
||||
set-local-storage: {"rustdoc-theme": |theme|, "rustdoc-use-system-theme": "false"}
|
||||
// We reload the page so the local storage settings are being used.
|
||||
reload:
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
// Small test to ensure the "src-line-numbers" element is only present once on
|
||||
// the page.
|
||||
goto: "file://" + |DOC_PATH| + "/test_docs/index.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
|
||||
click: ".srclink"
|
||||
wait-for: ".src-line-numbers"
|
||||
assert-count: (".src-line-numbers", 1)
|
||||
|
@ -1,5 +1,5 @@
|
||||
// This test ensures that the docblock elements have the appropriate left margin.
|
||||
goto: "file://" + |DOC_PATH| + "/test_docs/fn.foo.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/test_docs/fn.foo.html"
|
||||
// The top docblock elements shouldn't have left margin...
|
||||
assert-css: ("#main-content .item-decl", {"margin-left": "0px"})
|
||||
// ... but all the others should!
|
||||
|
@ -1,9 +1,9 @@
|
||||
// This test checks that using `.stab` attributes in `.docblock` elements doesn't
|
||||
// create scrollable paragraphs.
|
||||
goto: "file://" + |DOC_PATH| + "/test_docs/index.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
|
||||
// Needs the text to be display to check for scrollable content.
|
||||
show-text: true
|
||||
size: (786, 600)
|
||||
set-window-size: (786, 600)
|
||||
// Confirms that there 3 paragraphs.
|
||||
assert-count: (".top-doc .docblock p", 3)
|
||||
// Checking that there is no scrollable content.
|
||||
|
@ -1,7 +1,7 @@
|
||||
// This test checks the position of the information on the code blocks (like
|
||||
// `compile_fail` or `ignore`).
|
||||
goto: "file://" + |DOC_PATH| + "/test_docs/index.html"
|
||||
goto: "./fn.check_list_code_block.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
|
||||
go-to: "./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-css: (".docblock > .example-wrap.compile_fail .tooltip", { "margin-top": "16px" })
|
||||
|
@ -1,6 +1,6 @@
|
||||
// This test ensures that codeblocks content don't overflow.
|
||||
goto: "file://" + |DOC_PATH| + "/lib2/sub_mod/struct.Foo.html"
|
||||
size: (1080, 600)
|
||||
go-to: "file://" + |DOC_PATH| + "/lib2/sub_mod/struct.Foo.html"
|
||||
set-window-size: (1080, 600)
|
||||
// There should be two codeblocks: a rust one and a non-rust one.
|
||||
assert-count: (".docblock > .example-wrap", 2)
|
||||
assert: ".docblock > .example-wrap > .language-txt"
|
||||
|
@ -2,7 +2,7 @@
|
||||
// check that the rule isn't applied on other "<code>" elements.
|
||||
//
|
||||
// While we're at it, we also check it for the other themes.
|
||||
goto: "file://" + |DOC_PATH| + "/test_docs/fn.foo.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/test_docs/fn.foo.html"
|
||||
// If the text isn't displayed, the browser doesn't compute color style correctly...
|
||||
show-text: true
|
||||
|
||||
@ -11,7 +11,7 @@ define-function: (
|
||||
(theme, doc_code_color, doc_inline_code_color),
|
||||
block {
|
||||
// Set the theme.
|
||||
local-storage: {"rustdoc-theme": |theme|, "rustdoc-use-system-theme": "false"}
|
||||
set-local-storage: {"rustdoc-theme": |theme|, "rustdoc-use-system-theme": "false"}
|
||||
// We reload the page so the local storage settings are being used.
|
||||
reload:
|
||||
assert-css: (".docblock pre > code", {"color": |doc_code_color|}, ALL)
|
||||
|
@ -1,7 +1,7 @@
|
||||
// This test checks that the source code pages sidebar toggle is working as expected.
|
||||
goto: "file://" + |DOC_PATH| + "/test_docs/index.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
|
||||
click: ".srclink"
|
||||
wait-for: "#src-sidebar-toggle"
|
||||
click: "#src-sidebar-toggle"
|
||||
fail: true
|
||||
expect-failure: true
|
||||
assert-css: ("#source-sidebar", { "left": "-300px" })
|
||||
|
@ -3,22 +3,22 @@
|
||||
// We need to disable this check because `implementors/test_docs/trait.AnotherOne.js`
|
||||
// doesn't exist.
|
||||
fail-on-request-error: false
|
||||
goto: "file://" + |DOC_PATH| + "/test_docs/fn.foo.html"
|
||||
size: (1080, 600)
|
||||
go-to: "file://" + |DOC_PATH| + "/test_docs/fn.foo.html"
|
||||
set-window-size: (1080, 600)
|
||||
// There should be four doc codeblocks.
|
||||
// Check that their content is inside <pre><code>
|
||||
assert-count: (".example-wrap pre > code", 4)
|
||||
// Check that function signature is inside <pre><code>
|
||||
assert: "pre.rust.item-decl > code"
|
||||
|
||||
goto: "file://" + |DOC_PATH| + "/test_docs/struct.Foo.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/test_docs/struct.Foo.html"
|
||||
assert: "pre.rust.item-decl > code"
|
||||
|
||||
goto: "file://" + |DOC_PATH| + "/test_docs/enum.AnEnum.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/test_docs/enum.AnEnum.html"
|
||||
assert: "pre.rust.item-decl > code"
|
||||
|
||||
goto: "file://" + |DOC_PATH| + "/test_docs/trait.AnotherOne.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/test_docs/trait.AnotherOne.html"
|
||||
assert: "pre.rust.item-decl > code"
|
||||
|
||||
goto: "file://" + |DOC_PATH| + "/test_docs/type.SomeType.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/test_docs/type.SomeType.html"
|
||||
assert: "pre.rust.item-decl > code"
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Test that code blocks nested within <sub> do not have a line height of 0.
|
||||
goto: "file://" + |DOC_PATH| + "/test_docs/codeblock_sub/index.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/test_docs/codeblock_sub/index.html"
|
||||
|
||||
store-property: (codeblock_sub_1, "#codeblock-sub-1", "offsetHeight")
|
||||
assert-property-false: ("#codeblock-sub-3", { "offsetHeight": |codeblock_sub_1| })
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Checking the colors of the codeblocks tooltips.
|
||||
goto: "file://" + |DOC_PATH| + "/test_docs/fn.foo.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/test_docs/fn.foo.html"
|
||||
show-text: true
|
||||
|
||||
define-function: (
|
||||
@ -7,7 +7,7 @@ define-function: (
|
||||
(theme, background, color, border),
|
||||
block {
|
||||
// Setting the theme.
|
||||
local-storage: {"rustdoc-theme": |theme|, "rustdoc-use-system-theme": "false"}
|
||||
set-local-storage: {"rustdoc-theme": |theme|, "rustdoc-use-system-theme": "false"}
|
||||
reload:
|
||||
|
||||
// compile_fail block
|
||||
|
@ -1,5 +1,5 @@
|
||||
// This test ensures that several clickable items actually have the pointer cursor.
|
||||
goto: "file://" + |DOC_PATH| + "/lib2/struct.Foo.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/lib2/struct.Foo.html"
|
||||
|
||||
// the `[+]/[-]` button
|
||||
assert-css: ("#toggle-all-docs", {"cursor": "pointer"})
|
||||
@ -16,9 +16,9 @@ wait-for: "#search-tabs"
|
||||
assert-css: ("#search-tabs > button", {"cursor": "pointer"})
|
||||
|
||||
// mobile sidebar toggle button
|
||||
size: (500, 700)
|
||||
set-window-size: (500, 700)
|
||||
assert-css: (".sidebar-menu-toggle", {"cursor": "pointer"})
|
||||
|
||||
// the sidebar toggle button on the source code pages
|
||||
goto: "file://" + |DOC_PATH| + "/src/lib2/lib.rs.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/src/lib2/lib.rs.html"
|
||||
assert-css: ("#src-sidebar-toggle > button", {"cursor": "pointer"})
|
||||
|
@ -2,7 +2,7 @@
|
||||
//
|
||||
// The "settings" crate uses "ayu" as default setting, which is what we will
|
||||
// check.
|
||||
goto: "file://" + |DOC_PATH| + "/settings/index.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/settings/index.html"
|
||||
// Wait a bit to be sure the default theme is applied.
|
||||
// If the theme isn't applied, the command will time out.
|
||||
wait-for-css: ("body", {"background-color": "rgb(15, 20, 25)"})
|
||||
|
@ -1,7 +1,7 @@
|
||||
// If we have a long `<code>`, we need to ensure that it'll be fully displayed on mobile, meaning
|
||||
// that it'll be on two lines.
|
||||
emulate: "iPhone 8" // it has the following size: (375, 667)
|
||||
goto: "file://" + |DOC_PATH| + "/test_docs/long_code_block/index.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/test_docs/long_code_block/index.html"
|
||||
// We now check that the block is on two lines:
|
||||
show-text: true // We need to enable text draw to be able to have the "real" size
|
||||
// Little explanations for this test: if the text wasn't displayed on two lines, it would take
|
||||
@ -9,5 +9,5 @@ show-text: true // We need to enable text draw to be able to have the "real" siz
|
||||
assert-property: (".docblock p > code", {"offsetHeight": "44"})
|
||||
|
||||
// Same check, but where the long code block is also a link
|
||||
goto: "file://" + |DOC_PATH| + "/test_docs/long_code_block_link/index.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/test_docs/long_code_block_link/index.html"
|
||||
assert-property: (".docblock p > a > code", {"offsetHeight": "44"})
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Checks that the setting "line numbers" is working as expected.
|
||||
goto: "file://" + |DOC_PATH| + "/test_docs/fn.foo.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/test_docs/fn.foo.html"
|
||||
|
||||
// Otherwise, we can't check text color
|
||||
show-text: true
|
||||
@ -13,7 +13,7 @@ define-function: (
|
||||
(theme, color),
|
||||
block {
|
||||
// We now set the setting to show the line numbers on code examples.
|
||||
local-storage: {
|
||||
set-local-storage: {
|
||||
"rustdoc-theme": |theme|,
|
||||
"rustdoc-use-system-theme": "false",
|
||||
"rustdoc-line-numbers": "true"
|
||||
|
@ -1,7 +1,7 @@
|
||||
// This ensures that the `<details>`/`<summary>` elements are displayed as expected.
|
||||
goto: "file://" + |DOC_PATH| + "/test_docs/details/struct.Details.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/test_docs/details/struct.Details.html"
|
||||
show-text: true
|
||||
local-storage: {"rustdoc-theme": "dark", "rustdoc-use-system-theme": "false"}
|
||||
set-local-storage: {"rustdoc-theme": "dark", "rustdoc-use-system-theme": "false"}
|
||||
reload:
|
||||
|
||||
// We first check that the headers in the `.top-doc` doc block still have their
|
||||
|
@ -1,7 +1,7 @@
|
||||
// This test ensures that the type declaration content overflow is handled inside the <pre> directly.
|
||||
goto: "file://" + |DOC_PATH| + "/lib2/long_table/struct.Foo.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/lib2/long_table/struct.Foo.html"
|
||||
// We set a fixed size so there is no chance of "random" resize.
|
||||
size: (1100, 800)
|
||||
set-window-size: (1100, 800)
|
||||
// Logically, the ".docblock" and the "<p>" should have the same scroll width.
|
||||
compare-elements-property: (".top-doc .docblock", ".top-doc .docblock > p", ["scrollWidth"])
|
||||
assert-property: (".top-doc .docblock", {"scrollWidth": "816"})
|
||||
|
@ -1,5 +1,5 @@
|
||||
// This test checks the appearance of the tables in the doc comments.
|
||||
goto: "file://" + |DOC_PATH| + "/test_docs/doc_block_table/struct.DocBlockTable.html#method.func"
|
||||
go-to: "file://" + |DOC_PATH| + "/test_docs/doc_block_table/struct.DocBlockTable.html#method.func"
|
||||
|
||||
compare-elements-css: (".impl-items .docblock table th", ".top-doc .docblock table th", ["border"])
|
||||
compare-elements-css: (".impl-items .docblock table td", ".top-doc .docblock table td", ["border"])
|
||||
@ -8,7 +8,7 @@ define-function: (
|
||||
"check-colors",
|
||||
(theme, border_color, zebra_stripe_color),
|
||||
block {
|
||||
local-storage: {"rustdoc-use-system-theme": "false", "rustdoc-theme": |theme|}
|
||||
set-local-storage: {"rustdoc-use-system-theme": "false", "rustdoc-theme": |theme|}
|
||||
reload:
|
||||
assert-css: (".top-doc .docblock table tbody tr:nth-child(1)", {
|
||||
"background-color": "rgba(0, 0, 0, 0)",
|
||||
|
@ -1,5 +1,5 @@
|
||||
// This test ensures that there is no macro duplicates in the sidebar.
|
||||
goto: "file://" + |DOC_PATH| + "/test_docs/macro.a.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/test_docs/macro.a.html"
|
||||
// Waiting for the elements in the sidebar to be rendered.
|
||||
wait-for: ".sidebar-elems .macro"
|
||||
// Check there is only one macro named "a" listed in the sidebar.
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Verifies that there is non-zero margin on variants and their docblocks.
|
||||
goto: "file://" + |DOC_PATH| + "/test_docs/enum.WhoLetTheDogOut.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/test_docs/enum.WhoLetTheDogOut.html"
|
||||
|
||||
assert-css: (".variants > .variant", {"margin": "0px 0px 12px"})
|
||||
assert-css: (".variants > .docblock", {"margin": "0px 0px 32px 24px"})
|
||||
|
@ -1,6 +1,6 @@
|
||||
// This test ensures that the "Escape" shortcut is handled correctly based on the
|
||||
// current content displayed.
|
||||
goto: "file://" + |DOC_PATH| + "/test_docs/index.html"
|
||||
go-to: "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")
|
||||
// To be SURE that the search will be run.
|
||||
|
@ -1,5 +1,5 @@
|
||||
// This test checks that the font weight is correctly applied.
|
||||
goto: "file://" + |DOC_PATH| + "/lib2/struct.Foo.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/lib2/struct.Foo.html"
|
||||
assert-css: ("//*[@class='rust item-decl']//a[text()='Alias']", {"font-weight": "400"})
|
||||
assert-css: (
|
||||
"//*[@class='structfield small-section-header']//a[text()='Alias']",
|
||||
@ -9,13 +9,13 @@ assert-css: ("#method\.a_method > .code-header", {"font-weight": "600"})
|
||||
assert-css: ("#associatedtype\.X > .code-header", {"font-weight": "600"})
|
||||
assert-css: ("#associatedconstant\.Y > .code-header", {"font-weight": "600"})
|
||||
|
||||
goto: "file://" + |DOC_PATH| + "/test_docs/type.SomeType.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/test_docs/type.SomeType.html"
|
||||
assert-css: (".top-doc .docblock p", {"font-weight": "400"}, ALL)
|
||||
|
||||
goto: "file://" + |DOC_PATH| + "/test_docs/struct.Foo.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/test_docs/struct.Foo.html"
|
||||
assert-css: (".impl-items .method > .code-header", {"font-weight": "600"}, ALL)
|
||||
|
||||
goto: "file://" + |DOC_PATH| + "/lib2/trait.Trait.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/lib2/trait.Trait.html"
|
||||
|
||||
// This is a complex selector, so here's how it works:
|
||||
//
|
||||
|
@ -1,10 +1,10 @@
|
||||
// This test ensures that when clicking on a link which leads to an item inside a collapsed element,
|
||||
// the collapsed element will be expanded.
|
||||
goto: "file://" + |DOC_PATH| + "/test_docs/struct.Foo.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/test_docs/struct.Foo.html"
|
||||
// We check that the implementors block is expanded.
|
||||
assert-property: ("#implementations-list .implementors-toggle", {"open": "true"})
|
||||
// We now collapse the implementors block.
|
||||
property: ("#implementations-list .implementors-toggle", {"open": "false"})
|
||||
set-property: ("#implementations-list .implementors-toggle", {"open": "false"})
|
||||
// And now we click on the link to the method to ensure it'll expand the implementors block.
|
||||
click: "//*[@class='sidebar']//a[@href='#method.must_use']"
|
||||
assert-property: ("#implementations-list .implementors-toggle", {"open": "true"})
|
||||
@ -12,9 +12,9 @@ assert-property: ("#implementations-list .implementors-toggle", {"open": "true"}
|
||||
define-function: ("collapsed-from-search", (), block {
|
||||
// Now we do the same through search result.
|
||||
// First we reload the page without the anchor in the URL.
|
||||
goto: "file://" + |DOC_PATH| + "/test_docs/struct.Foo.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/test_docs/struct.Foo.html"
|
||||
// Then we collapse the section again...
|
||||
property: ("#implementations-list .implementors-toggle", {"open": "false"})
|
||||
set-property: ("#implementations-list .implementors-toggle", {"open": "false"})
|
||||
// Then we run the search.
|
||||
write: (".search-input", "foo::must_use")
|
||||
wait-for: "//*[@id='search']//a[@href='../test_docs/struct.Foo.html#method.must_use']"
|
||||
@ -25,12 +25,12 @@ define-function: ("collapsed-from-search", (), block {
|
||||
call-function: ("collapsed-from-search", {})
|
||||
|
||||
// Now running the same check but with mobile.
|
||||
size: (600, 600)
|
||||
goto: "file://" + |DOC_PATH| + "/test_docs/struct.Foo.html"
|
||||
set-window-size: (600, 600)
|
||||
go-to: "file://" + |DOC_PATH| + "/test_docs/struct.Foo.html"
|
||||
// We check that the implementors block is expanded.
|
||||
assert-property: ("#implementations-list .implementors-toggle", {"open": "true"})
|
||||
// We now collapse the implementors block.
|
||||
property: ("#implementations-list .implementors-toggle", {"open": "false"})
|
||||
set-property: ("#implementations-list .implementors-toggle", {"open": "false"})
|
||||
// First we expand the mobile menu.
|
||||
click: ".sidebar-menu-toggle"
|
||||
// Then we click on the link to the method to ensure it'll expand the implementors block.
|
||||
|
@ -1,5 +1,5 @@
|
||||
// This test ensures that the element corresponding to the hash is displayed.
|
||||
goto: "file://" + |DOC_PATH| + "/test_docs/struct.Foo.html#method.borrow"
|
||||
go-to: "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-attribute: ("#blanket-implementations-list > details:nth-child(2)", {"open": ""})
|
||||
// We first check that the impl block is open by default.
|
||||
|
@ -4,10 +4,10 @@ define-function: (
|
||||
"check-colors",
|
||||
(theme, color, code_header_color, focus_background_color, headings_color),
|
||||
block {
|
||||
goto: "file://" + |DOC_PATH| + "/test_docs/struct.Foo.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/test_docs/struct.Foo.html"
|
||||
// This is needed so that the text color is computed.
|
||||
show-text: true
|
||||
local-storage: {"rustdoc-theme": |theme|, "rustdoc-use-system-theme": "false"}
|
||||
set-local-storage: {"rustdoc-theme": |theme|, "rustdoc-use-system-theme": "false"}
|
||||
reload:
|
||||
assert-css: (
|
||||
".impl",
|
||||
@ -19,20 +19,20 @@ define-function: (
|
||||
{"color": |code_header_color|, "background-color": "rgba(0, 0, 0, 0)"},
|
||||
ALL,
|
||||
)
|
||||
goto: "file://" + |DOC_PATH| + "/test_docs/struct.Foo.html#impl-Foo"
|
||||
go-to: "file://" + |DOC_PATH| + "/test_docs/struct.Foo.html#impl-Foo"
|
||||
assert-css: (
|
||||
"#impl-Foo",
|
||||
{"color": |color|, "background-color": |focus_background_color|},
|
||||
)
|
||||
goto: "file://" + |DOC_PATH| + "/test_docs/struct.Foo.html#method.must_use"
|
||||
go-to: "file://" + |DOC_PATH| + "/test_docs/struct.Foo.html#method.must_use"
|
||||
assert-css: (
|
||||
"#method\.must_use",
|
||||
{"color": |color|, "background-color": |focus_background_color|},
|
||||
ALL,
|
||||
)
|
||||
goto: "file://" + |DOC_PATH| + "/test_docs/index.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
|
||||
assert-css: (".small-section-header a", {"color": |color|}, ALL)
|
||||
goto: "file://" + |DOC_PATH| + "/test_docs/struct.HeavilyDocumentedStruct.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/test_docs/struct.HeavilyDocumentedStruct.html"
|
||||
// We select headings (h2, h3, h...).
|
||||
assert-css: (".docblock > :not(p) > a", {"color": |headings_color|}, ALL)
|
||||
},
|
||||
|
@ -11,7 +11,7 @@
|
||||
// 18px 1.125em
|
||||
// 16px 1rem
|
||||
// 14px 0.875rem
|
||||
goto: "file://" + |DOC_PATH| + "/test_docs/struct.HeavilyDocumentedStruct.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/test_docs/struct.HeavilyDocumentedStruct.html"
|
||||
|
||||
assert-css: (".main-heading h1", {"font-size": "24px"})
|
||||
|
||||
@ -50,7 +50,7 @@ assert-css: ("h6#sub-heading-for-struct-impl-item-doc", {"font-size": "14px"})
|
||||
assert-css: ("h6#sub-heading-for-struct-impl-item-doc", {"border-bottom-width": "0px"})
|
||||
assert-css: ("h6#sub-sub-heading-for-struct-impl-item-doc", {"font-size": "14px"})
|
||||
|
||||
goto: "file://" + |DOC_PATH| + "/test_docs/enum.HeavilyDocumentedEnum.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/test_docs/enum.HeavilyDocumentedEnum.html"
|
||||
|
||||
assert-css: (".main-heading h1", {"font-size": "24px"})
|
||||
|
||||
@ -109,7 +109,7 @@ assert-css: ("h6#sub-sub-heading-for-enum-impl-item-doc", {"border-bottom-width"
|
||||
assert-text: ("//ul[@class='block mod']/preceding-sibling::h3", "Modules")
|
||||
assert-css: ("//ul[@class='block mod']/preceding-sibling::h3", {"border-bottom-width": "0px"}, ALL)
|
||||
|
||||
goto: "file://" + |DOC_PATH| + "/test_docs/union.HeavilyDocumentedUnion.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/test_docs/union.HeavilyDocumentedUnion.html"
|
||||
|
||||
assert-css: (".main-heading h1", {"font-size": "24px"})
|
||||
|
||||
@ -141,7 +141,7 @@ assert-css: ("h5#title-for-union-impl-item-doc", {"border-bottom-width": "0px"})
|
||||
assert-css: ("h6#sub-heading-for-union-impl-item-doc", {"font-size": "14px"})
|
||||
assert-css: ("h6#sub-heading-for-union-impl-item-doc", {"border-bottom-width": "0px"})
|
||||
|
||||
goto: "file://" + |DOC_PATH| + "/test_docs/macro.heavily_documented_macro.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/test_docs/macro.heavily_documented_macro.html"
|
||||
|
||||
assert-css: (".main-heading h1", {"font-size": "24px"})
|
||||
|
||||
@ -152,13 +152,13 @@ assert-css: ("h3#top-doc-prose-sub-heading", {"border-bottom-width": "1px"})
|
||||
|
||||
// Needed to check colors
|
||||
show-text: true
|
||||
goto: "file://" + |DOC_PATH| + "/test_docs/struct.HeavilyDocumentedStruct.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/test_docs/struct.HeavilyDocumentedStruct.html"
|
||||
|
||||
define-function: (
|
||||
"check-colors",
|
||||
(theme, heading_color, small_heading_color, heading_border_color),
|
||||
block {
|
||||
local-storage: {"rustdoc-theme": |theme|, "rustdoc-use-system-theme": "false"}
|
||||
set-local-storage: {"rustdoc-theme": |theme|, "rustdoc-use-system-theme": "false"}
|
||||
reload:
|
||||
assert-css: (
|
||||
".top-doc .docblock h2",
|
||||
@ -222,13 +222,13 @@ define-function: (
|
||||
"check-since-color",
|
||||
(theme),
|
||||
block {
|
||||
local-storage: {"rustdoc-theme": |theme|}
|
||||
set-local-storage: {"rustdoc-theme": |theme|}
|
||||
reload:
|
||||
assert-css: (".since", {"color": "rgb(128, 128, 128)"}, ALL)
|
||||
},
|
||||
)
|
||||
|
||||
goto: "file://" + |DOC_PATH| + "/staged_api/struct.Foo.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/staged_api/struct.Foo.html"
|
||||
call-function: ("check-since-color", ("ayu"))
|
||||
call-function: ("check-since-color", ("dark"))
|
||||
call-function: ("check-since-color", ("light"))
|
||||
|
@ -1,6 +1,6 @@
|
||||
// This test ensures that opening the help page in its own tab works.
|
||||
goto: "file://" + |DOC_PATH| + "/help.html"
|
||||
size: (1000, 1000) // Try desktop size first.
|
||||
go-to: "file://" + |DOC_PATH| + "/help.html"
|
||||
set-window-size: (1000, 1000) // Try desktop size first.
|
||||
wait-for: "#help"
|
||||
assert-css: ("#help", {"display": "block"})
|
||||
assert-css: ("#help dd", {"font-size": "16px"})
|
||||
@ -8,7 +8,7 @@ click: "#help-button > a"
|
||||
assert-css: ("#help", {"display": "block"})
|
||||
compare-elements-property: (".sub", "#help", ["offsetWidth"])
|
||||
compare-elements-position: (".sub", "#help", ("x"))
|
||||
size: (500, 1000) // Try mobile next.
|
||||
set-window-size: (500, 1000) // Try mobile next.
|
||||
assert-css: ("#help", {"display": "block"})
|
||||
compare-elements-property: (".sub", "#help", ["offsetWidth"])
|
||||
compare-elements-position: (".sub", "#help", ("x"))
|
||||
@ -20,7 +20,7 @@ define-function: (
|
||||
(theme, color, background, box_shadow),
|
||||
block {
|
||||
// Setting the theme.
|
||||
local-storage: {"rustdoc-theme": |theme|, "rustdoc-use-system-theme": "false"}
|
||||
set-local-storage: {"rustdoc-theme": |theme|, "rustdoc-use-system-theme": "false"}
|
||||
// We reload the page so the local storage settings are being used.
|
||||
reload:
|
||||
assert-css: ("#help kbd", {
|
||||
@ -51,8 +51,8 @@ call-function: ("check-colors", {
|
||||
})
|
||||
|
||||
// This test ensures that opening the help popover without switching pages works.
|
||||
goto: "file://" + |DOC_PATH| + "/test_docs/index.html"
|
||||
size: (1000, 1000) // Only supported on desktop.
|
||||
go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
|
||||
set-window-size: (1000, 1000) // Only supported on desktop.
|
||||
assert-false: "#help"
|
||||
click: "#help-button > a"
|
||||
assert-css: ("#help", {"display": "block"})
|
||||
@ -63,8 +63,8 @@ compare-elements-property-false: (".sub", "#help", ["offsetWidth"])
|
||||
compare-elements-position-false: (".sub", "#help", ("x"))
|
||||
|
||||
// This test ensures that the "the rustdoc book" anchor link within the help popover works.
|
||||
goto: "file://" + |DOC_PATH| + "/test_docs/index.html"
|
||||
size: (1000, 1000) // Popover only appears when the screen width is >700px.
|
||||
go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
|
||||
set-window-size: (1000, 1000) // Popover only appears when the screen width is >700px.
|
||||
assert-false: "#help"
|
||||
click: "#help-button > a"
|
||||
click: ".popover a[href='https://doc.rust-lang.org/rustdoc/']"
|
||||
|
@ -1,5 +1,5 @@
|
||||
// This test checks the highlight colors in the source code pages.
|
||||
goto: "file://" + |DOC_PATH| + "/src/test_docs/lib.rs.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/src/test_docs/lib.rs.html"
|
||||
show-text: true
|
||||
|
||||
define-function: (
|
||||
@ -22,7 +22,7 @@ define-function: (
|
||||
doc_comment,
|
||||
),
|
||||
block {
|
||||
local-storage: {"rustdoc-theme": |theme|, "rustdoc-use-system-theme": "false"}
|
||||
set-local-storage: {"rustdoc-theme": |theme|, "rustdoc-use-system-theme": "false"}
|
||||
reload:
|
||||
assert-css: ("pre.rust .kw", {"color": |kw|}, ALL)
|
||||
assert-css: ("pre.rust .kw-2", {"color": |kw2|}, ALL)
|
||||
|
@ -1,6 +1,6 @@
|
||||
// Make sure that the last two entries are more than 12 pixels apart and not stacked on each other.
|
||||
|
||||
goto: "file://" + |DOC_PATH| + "/test_docs/huge_amount_of_consts/index.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/test_docs/huge_amount_of_consts/index.html"
|
||||
|
||||
compare-elements-position-near-false: (
|
||||
"//ul[@class='item-table']/li[last()-1]",
|
||||
|
@ -1,23 +1,23 @@
|
||||
// huge_logo crate has a custom 712x860 logo
|
||||
// test to ensure the maximum size in the layout works correctly
|
||||
goto: "file://" + |DOC_PATH| + "/huge_logo/index.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/huge_logo/index.html"
|
||||
|
||||
size: (1280, 1024)
|
||||
set-window-size: (1280, 1024)
|
||||
// offsetWidth = width of sidebar
|
||||
assert-property: (".sidebar .logo-container", {"offsetWidth": "200", "offsetHeight": 100})
|
||||
assert-property: (".sidebar .logo-container img", {"offsetWidth": "100", "offsetHeight": 100})
|
||||
|
||||
size: (400, 600)
|
||||
set-window-size: (400, 600)
|
||||
// offset = size + margin
|
||||
assert-property: (".mobile-topbar .logo-container", {"offsetWidth": "55", "offsetHeight": 45})
|
||||
assert-property: (".mobile-topbar .logo-container img", {"offsetWidth": "35", "offsetHeight": 35})
|
||||
|
||||
goto: "file://" + |DOC_PATH| + "/src/huge_logo/lib.rs.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/src/huge_logo/lib.rs.html"
|
||||
|
||||
size: (1280, 1024)
|
||||
set-window-size: (1280, 1024)
|
||||
assert-property: (".sub-logo-container", {"offsetWidth": "60", "offsetHeight": 60})
|
||||
|
||||
size: (400, 600)
|
||||
set-window-size: (400, 600)
|
||||
// 43 because 35px + 8px of margin
|
||||
assert-css: (".sub-logo-container > img", {"margin-bottom": "8px"})
|
||||
assert-property: (".sub-logo-container", {"offsetWidth": "35", "offsetHeight": 43})
|
||||
|
@ -1,3 +1,3 @@
|
||||
// This test ensures that the impl blocks are open by default.
|
||||
goto: "file://" + |DOC_PATH| + "/test_docs/struct.Foo.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/test_docs/struct.Foo.html"
|
||||
assert-attribute: ("#implementations-list details.implementors-toggle", {"open": ""})
|
||||
|
@ -1,5 +1,5 @@
|
||||
// A docblock on an impl must have a margin to separate it from the contents.
|
||||
goto: "file://" + |DOC_PATH| + "/test_docs/struct.TypeWithImplDoc.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/test_docs/struct.TypeWithImplDoc.html"
|
||||
|
||||
// The text is about 24px tall, so if there's a margin, then their position will be >24px apart
|
||||
compare-elements-position-near-false: (
|
||||
|
@ -1,6 +1,6 @@
|
||||
// The goal of this test is to check that the external trait implementors, generated with JS,
|
||||
// have the same display than the "local" ones.
|
||||
goto: "file://" + |DOC_PATH| + "/implementors/trait.Whatever.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/implementors/trait.Whatever.html"
|
||||
assert: "#implementors-list"
|
||||
// There are supposed to be two implementors listed.
|
||||
assert-count: ("#implementors-list .impl", 2)
|
||||
@ -15,7 +15,7 @@ assert-attribute: ("#implementors-list .impl:nth-child(2)", {"id": "impl-Whateve
|
||||
assert-attribute: ("#implementors-list .impl:nth-child(2) > a.anchor", {"href": "#impl-Whatever-1"})
|
||||
assert: "#implementors-list .impl:nth-child(2) > .code-header"
|
||||
|
||||
goto: "file://" + |DOC_PATH| + "/test_docs/struct.HasEmptyTraits.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/test_docs/struct.HasEmptyTraits.html"
|
||||
compare-elements-position-near-false: (
|
||||
"#impl-EmptyTrait1-for-HasEmptyTraits",
|
||||
"#impl-EmptyTrait2-for-HasEmptyTraits",
|
||||
@ -29,13 +29,13 @@ compare-elements-position-near: (
|
||||
|
||||
// Now check that re-exports work correctly.
|
||||
// There should be exactly one impl shown on both of these pages.
|
||||
goto: "file://" + |DOC_PATH| + "/lib2/trait.TraitToReexport.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/lib2/trait.TraitToReexport.html"
|
||||
assert-count: ("#implementors-list .impl", 1)
|
||||
goto: "file://" + |DOC_PATH| + "/implementors/trait.TraitToReexport.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/implementors/trait.TraitToReexport.html"
|
||||
assert-count: ("#implementors-list .impl", 1)
|
||||
|
||||
// Now check that the link is properly rewritten for a crate called `http`.
|
||||
// An older version of rustdoc had a buggy check for absolute links.
|
||||
goto: "file://" + |DOC_PATH| + "/http/trait.HttpTrait.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/http/trait.HttpTrait.html"
|
||||
assert-count: ("#implementors-list .impl", 1)
|
||||
assert-attribute: ("#implementors-list .impl a.trait", {"href": "../http/trait.HttpTrait.html"})
|
||||
|
@ -18,9 +18,9 @@ define-function: (
|
||||
assoc_type_color,
|
||||
),
|
||||
block {
|
||||
goto: "file://" + |DOC_PATH| + "/test_docs/struct.WithGenerics.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/test_docs/struct.WithGenerics.html"
|
||||
show-text: true
|
||||
local-storage: {"rustdoc-theme": |theme|, "rustdoc-use-system-theme": "false"}
|
||||
set-local-storage: {"rustdoc-theme": |theme|, "rustdoc-use-system-theme": "false"}
|
||||
reload:
|
||||
assert-css: (".item-decl .code-attribute", {"color": |attr_color|}, ALL)
|
||||
assert-css: (".item-decl .trait", {"color": |trait_color|}, ALL)
|
||||
@ -29,7 +29,7 @@ define-function: (
|
||||
assert-css: (".item-decl .enum", {"color": |enum_color|}, ALL)
|
||||
assert-css: (".item-decl .primitive", {"color": |primitive_color|}, ALL)
|
||||
|
||||
goto: "file://" + |DOC_PATH| + "/test_docs/trait.TraitWithoutGenerics.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/test_docs/trait.TraitWithoutGenerics.html"
|
||||
assert-css: (".item-decl .constant", {"color": |constant_color|}, ALL)
|
||||
assert-css: (".item-decl .fn", {"color": |fn_color|}, ALL)
|
||||
assert-css: (".item-decl .associatedtype", {"color": |assoc_type_color|}, ALL)
|
||||
|
@ -1,10 +1,10 @@
|
||||
// This test ensures that the "item-info" looks about the same
|
||||
// whether or not it's inside a toggle.
|
||||
goto: "file://" + |DOC_PATH| + "/lib2/struct.ItemInfoAlignmentTest.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/lib2/struct.ItemInfoAlignmentTest.html"
|
||||
|
||||
// First, we try it in "desktop" mode.
|
||||
size: (1200, 870)
|
||||
set-window-size: (1200, 870)
|
||||
compare-elements-position: (".impl-items > .item-info", "summary > .item-info", ("x"))
|
||||
// Next, we try it in "mobile" mode (max-width: 700px).
|
||||
size: (650, 650)
|
||||
set-window-size: (650, 650)
|
||||
compare-elements-position: (".impl-items > .item-info", "summary > .item-info", ("x"))
|
||||
|
@ -1,7 +1,7 @@
|
||||
// This test ensures that the "item-info" elements don't overflow.
|
||||
goto: "file://" + |DOC_PATH| + "/lib2/struct.LongItemInfo.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/lib2/struct.LongItemInfo.html"
|
||||
// We set a fixed size so there is no chance of "random" resize.
|
||||
size: (1200, 870)
|
||||
set-window-size: (1200, 870)
|
||||
// Logically, the "item-decl" and the "item-info" should have the same scroll width.
|
||||
compare-elements-property: (".item-decl", ".item-info", ["scrollWidth"])
|
||||
assert-property: (".item-info", {"scrollWidth": "940"})
|
||||
@ -13,7 +13,7 @@ assert-text: (
|
||||
)
|
||||
|
||||
// Checking the "item-info" on an impl block as well:
|
||||
goto: "file://" + |DOC_PATH| + "/lib2/struct.LongItemInfo2.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/lib2/struct.LongItemInfo2.html"
|
||||
compare-elements-property: (
|
||||
"#impl-SimpleTrait-for-LongItemInfo2 .item-info",
|
||||
"#impl-SimpleTrait-for-LongItemInfo2 + .docblock",
|
||||
|
@ -1,15 +1,15 @@
|
||||
// This test ensures a few things for item info elements.
|
||||
goto: "file://" + |DOC_PATH| + "/lib2/struct.Foo.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/lib2/struct.Foo.html"
|
||||
// Ensuring that the item information don't take 100% of the width if unnecessary.
|
||||
// We set a fixed size so there is no chance of "random" resize.
|
||||
size: (1100, 800)
|
||||
set-window-size: (1100, 800)
|
||||
// We check that ".item-info" is bigger than its content.
|
||||
assert-css: (".item-info", {"width": "840px"})
|
||||
assert-css: (".item-info .stab", {"width": "289px"})
|
||||
assert-position: (".item-info .stab", {"x": 245})
|
||||
|
||||
// Now we ensure that they're not rendered on the same line.
|
||||
goto: "file://" + |DOC_PATH| + "/lib2/trait.Trait.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/lib2/trait.Trait.html"
|
||||
// We first ensure that there are two item info on the trait.
|
||||
assert-count: ("#main-content > .item-info .stab", 2)
|
||||
// They should not have the same `y` position!
|
||||
|
@ -1,5 +1,5 @@
|
||||
// This test ensures that <table> elements aren't display in items summary.
|
||||
goto: "file://" + |DOC_PATH| + "/lib2/summary_table/index.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/lib2/summary_table/index.html"
|
||||
// We check that we picked the right item first.
|
||||
assert-text: (".item-table .item-name", "Foo")
|
||||
// Then we check that its summary is empty.
|
||||
|
@ -2,5 +2,5 @@
|
||||
// can't be used without JS.
|
||||
javascript: false
|
||||
|
||||
goto: "file://" + |DOC_PATH| + "/test_docs/struct.Foo.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/test_docs/struct.Foo.html"
|
||||
assert-css: (".sub", {"display": "none"})
|
||||
|
@ -1,12 +1,12 @@
|
||||
// We check the background color on the jump to definition links in the source code page.
|
||||
goto: "file://" + |DOC_PATH| + "/src/link_to_definition/lib.rs.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/src/link_to_definition/lib.rs.html"
|
||||
|
||||
define-function: (
|
||||
"check-background-color",
|
||||
(theme, background_color),
|
||||
block {
|
||||
// Set the theme.
|
||||
local-storage: { "rustdoc-theme": |theme|, "rustdoc-use-system-theme": "false" }
|
||||
set-local-storage: { "rustdoc-theme": |theme|, "rustdoc-use-system-theme": "false" }
|
||||
// We reload the page so the local storage settings are being used.
|
||||
reload:
|
||||
assert-css: (
|
||||
|
@ -1,9 +1,9 @@
|
||||
// These tests verify that labels like "UNIX" and "Deprecated" stay on the same line as their symbol.
|
||||
// It also verifies the staggered layout on mobile.
|
||||
goto: "file://" + |DOC_PATH| + "/test_docs/index.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
|
||||
|
||||
// Desktop view
|
||||
size: (1080, 600)
|
||||
set-window-size: (1080, 600)
|
||||
assert: (".stab.deprecated")
|
||||
assert: (".stab.portability")
|
||||
|
||||
@ -39,7 +39,7 @@ compare-elements-position: (
|
||||
|
||||
|
||||
// Mobile view
|
||||
size: (600, 600)
|
||||
set-window-size: (600, 600)
|
||||
// staggered layout with 2em spacing
|
||||
assert-css: (".desc.docblock-short", { "padding-left": "32px" })
|
||||
compare-elements-position-near: (
|
||||
|
@ -1,5 +1,5 @@
|
||||
// This test checks links colors.
|
||||
goto: "file://" + |DOC_PATH| + "/test_docs/index.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
|
||||
|
||||
// This is needed so that the text color is computed.
|
||||
show-text: true
|
||||
@ -9,7 +9,7 @@ define-function: (
|
||||
(theme, mod, macro, struct, enum, trait, fn, type, union, keyword,
|
||||
sidebar, sidebar_current, sidebar_current_background),
|
||||
block {
|
||||
local-storage: {
|
||||
set-local-storage: {
|
||||
"rustdoc-theme": |theme|,
|
||||
"rustdoc-use-system-theme": "false",
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
// This test checks that code blocks in list are supported.
|
||||
goto: "file://" + |DOC_PATH| + "/test_docs/index.html"
|
||||
goto: "./fn.check_list_code_block.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
|
||||
go-to: "./fn.check_list_code_block.html"
|
||||
assert: ("pre.rust.item-decl")
|
||||
|
@ -1,5 +1,5 @@
|
||||
// This test ensures that the margins on methods are coherent inside an impl block.
|
||||
goto: "file://" + |DOC_PATH| + "/test_docs/trait_members/struct.HasTrait.html#impl-TraitMembers-for-HasTrait"
|
||||
go-to: "file://" + |DOC_PATH| + "/test_docs/trait_members/struct.HasTrait.html#impl-TraitMembers-for-HasTrait"
|
||||
|
||||
assert-count: ("#trait-implementations-list > .toggle", 1)
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
// Test various properties of the mobile UI
|
||||
goto: "file://" + |DOC_PATH| + "/staged_api/struct.Foo.html"
|
||||
size: (400, 600)
|
||||
go-to: "file://" + |DOC_PATH| + "/staged_api/struct.Foo.html"
|
||||
set-window-size: (400, 600)
|
||||
|
||||
font-size: 18
|
||||
set-font-size: 18
|
||||
wait-for: 100 // wait a bit for the resize and the font-size change to be fully taken into account.
|
||||
|
||||
// The out-of-band info (source, stable version, collapse) should be below the
|
||||
@ -18,14 +18,14 @@ assert-property: (".mobile-topbar h2", {"offsetHeight": 33})
|
||||
// is therefore not part of the DOM.
|
||||
assert-css: (".content .out-of-band .since::before", { "content": "\"Since \"" })
|
||||
|
||||
size: (1000, 1000)
|
||||
set-window-size: (1000, 1000)
|
||||
wait-for: 100 // wait a bit for the resize to be fully taken into account.
|
||||
assert-css-false: (".content .out-of-band .since::before", { "content": "\"Since \"" })
|
||||
|
||||
// On the settings page, the theme buttons should not line-wrap. Instead, they should
|
||||
// all be placed as a group on a line below the setting name "Theme."
|
||||
goto: "file://" + |DOC_PATH| + "/settings.html"
|
||||
size: (400, 600)
|
||||
go-to: "file://" + |DOC_PATH| + "/settings.html"
|
||||
set-window-size: (400, 600)
|
||||
// Ignored for now https://github.com/rust-lang/rust/issues/93784.
|
||||
// compare-elements-position-near-false: (
|
||||
// "#preferred-light-theme .setting-radio-name",
|
||||
|
@ -1,5 +1,5 @@
|
||||
// This test checks that the correct font is used on module items (in index.html pages).
|
||||
goto: "file://" + |DOC_PATH| + "/test_docs/index.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
|
||||
assert-css: (
|
||||
".item-table .item-name > a",
|
||||
{"font-family": '"Fira Sans", Arial, NanumBarunGothic, sans-serif'},
|
||||
|
@ -4,10 +4,10 @@
|
||||
// doesn't exist.
|
||||
fail-on-request-error: false
|
||||
|
||||
goto: "file://" + |DOC_PATH| + "/test_docs/trait.TraitWithNoDocblocks.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/test_docs/trait.TraitWithNoDocblocks.html"
|
||||
// Check that the two methods are more than 24px apart.
|
||||
compare-elements-position-near-false: ("//*[@id='tymethod.first_fn']", "//*[@id='tymethod.second_fn']", {"y": 24})
|
||||
|
||||
goto: "file://" + |DOC_PATH| + "/test_docs/struct.TypeWithNoDocblocks.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/test_docs/struct.TypeWithNoDocblocks.html"
|
||||
// Check that the two methods are more than 24px apart.
|
||||
compare-elements-position-near-false: ("//*[@id='method.first_fn']", "//*[@id='method.second_fn']", {"y": 24})
|
||||
|
@ -1,8 +1,8 @@
|
||||
// This test checks the position of the `i` for the notable traits.
|
||||
goto: "file://" + |DOC_PATH| + "/test_docs/struct.NotableStructWithLongName.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/test_docs/struct.NotableStructWithLongName.html"
|
||||
show-text: true
|
||||
// We start with a wide screen.
|
||||
size: (1100, 600)
|
||||
set-window-size: (1100, 600)
|
||||
// Checking they have the same y position.
|
||||
compare-elements-position: (
|
||||
"//*[@id='method.create_an_iterator_from_read']//a[text()='NotableStructWithLongName']",
|
||||
@ -44,7 +44,7 @@ move-cursor-to: "//h1"
|
||||
assert-count: ("//*[@class='tooltip popover']", 0)
|
||||
|
||||
// Now only the `i` should be on the next line.
|
||||
size: (1055, 600)
|
||||
set-window-size: (1055, 600)
|
||||
compare-elements-position-false: (
|
||||
"//*[@id='method.create_an_iterator_from_read']//a[text()='NotableStructWithLongName']",
|
||||
"//*[@id='method.create_an_iterator_from_read']//*[@class='tooltip']",
|
||||
@ -52,7 +52,7 @@ compare-elements-position-false: (
|
||||
)
|
||||
|
||||
// Now both the `i` and the struct name should be on the next line.
|
||||
size: (980, 600)
|
||||
set-window-size: (980, 600)
|
||||
// Checking they have the same y position.
|
||||
compare-elements-position: (
|
||||
"//*[@id='method.create_an_iterator_from_read']//a[text()='NotableStructWithLongName']",
|
||||
@ -76,7 +76,7 @@ assert-position: (
|
||||
)
|
||||
|
||||
// Checking on mobile now.
|
||||
size: (650, 600)
|
||||
set-window-size: (650, 600)
|
||||
// Checking they have the same y position.
|
||||
compare-elements-position: (
|
||||
"//*[@id='method.create_an_iterator_from_read']//a[text()='NotableStructWithLongName']",
|
||||
@ -124,12 +124,12 @@ define-function: (
|
||||
"check-colors",
|
||||
(theme, header_color, content_color, type_color, trait_color),
|
||||
block {
|
||||
goto: "file://" + |DOC_PATH| + "/test_docs/struct.NotableStructWithLongName.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/test_docs/struct.NotableStructWithLongName.html"
|
||||
// This is needed to ensure that the text color is computed.
|
||||
show-text: true
|
||||
|
||||
// Setting the theme.
|
||||
local-storage: {"rustdoc-theme": |theme|, "rustdoc-use-system-theme": "false"}
|
||||
set-local-storage: {"rustdoc-theme": |theme|, "rustdoc-use-system-theme": "false"}
|
||||
// We reload the page so the local storage settings are being used.
|
||||
reload:
|
||||
|
||||
@ -253,7 +253,7 @@ press-key: "Escape"
|
||||
assert-window-property-false: {"scrollY": |scroll|}
|
||||
|
||||
// Opening the mobile sidebar should close the popover.
|
||||
size: (650, 600)
|
||||
set-window-size: (650, 600)
|
||||
click: "//*[@id='method.create_an_iterator_from_read']//*[@class='tooltip']"
|
||||
assert-count: ("//*[@class='tooltip popover']", 1)
|
||||
click: ".sidebar-menu-toggle"
|
||||
@ -266,7 +266,7 @@ assert-count: ("//*[@class='tooltip popover']", 1)
|
||||
assert-false: "//*[@class='sidebar shown']"
|
||||
|
||||
// Also check the focus handling for the help button.
|
||||
size: (1100, 600)
|
||||
set-window-size: (1100, 600)
|
||||
reload:
|
||||
assert-count: ("//*[@class='tooltip popover']", 0)
|
||||
click: "//*[@id='method.create_an_iterator_from_read']//*[@class='tooltip']"
|
||||
|
@ -1,7 +1,7 @@
|
||||
// The goal of this test is to ensure that the tooltip `.information` class doesn't
|
||||
// have overflow and max-width CSS rules set because they create a bug in firefox on
|
||||
// mac. For more information: https://github.com/rust-lang/rust/issues/89185
|
||||
goto: "file://" + |DOC_PATH| + "/test_docs/fn.foo.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/test_docs/fn.foo.html"
|
||||
assert-css: (".docblock > .example-wrap .tooltip", {
|
||||
"overflow-x": "visible",
|
||||
"max-width": "none"
|
||||
|
@ -1,5 +1,5 @@
|
||||
// This test ensures that the "pocket menus" are working as expected.
|
||||
goto: "file://" + |DOC_PATH| + "/test_docs/index.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
|
||||
// First we check that the help menu doesn't exist yet.
|
||||
assert-false: "#help-button .popover"
|
||||
// Then we display the help menu.
|
||||
@ -32,7 +32,7 @@ assert-css: ("#settings-menu .popover", {"display": "none"})
|
||||
// We check the borders color now:
|
||||
|
||||
// Ayu theme
|
||||
local-storage: {
|
||||
set-local-storage: {
|
||||
"rustdoc-theme": "ayu",
|
||||
"rustdoc-use-system-theme": "false",
|
||||
}
|
||||
@ -47,7 +47,7 @@ compare-elements-css: ("#help-button .popover", "#help-button .top", ["border-co
|
||||
compare-elements-css: ("#help-button .popover", "#help-button .bottom", ["border-color"])
|
||||
|
||||
// Dark theme
|
||||
local-storage: {
|
||||
set-local-storage: {
|
||||
"rustdoc-theme": "dark",
|
||||
"rustdoc-use-system-theme": "false",
|
||||
}
|
||||
@ -62,7 +62,7 @@ compare-elements-css: ("#help-button .popover", "#help-button .top", ["border-co
|
||||
compare-elements-css: ("#help-button .popover", "#help-button .bottom", ["border-color"])
|
||||
|
||||
// Light theme
|
||||
local-storage: {
|
||||
set-local-storage: {
|
||||
"rustdoc-theme": "light",
|
||||
"rustdoc-use-system-theme": "false",
|
||||
}
|
||||
@ -77,7 +77,7 @@ compare-elements-css: ("#help-button .popover", "#help-button .top", ["border-co
|
||||
compare-elements-css: ("#help-button .popover", "#help-button .bottom", ["border-color"])
|
||||
|
||||
// Opening the mobile sidebar should close the settings popover.
|
||||
size: (650, 600)
|
||||
set-window-size: (650, 600)
|
||||
click: "#settings-menu a"
|
||||
assert-css: ("#settings-menu .popover", {"display": "block"})
|
||||
click: ".sidebar-menu-toggle"
|
||||
|
@ -2,14 +2,14 @@
|
||||
// Playground. That button is hidden until the user hovers over the code block.
|
||||
// This test checks that it is hidden, and that it shows on hover. It also
|
||||
// checks for its color.
|
||||
goto: "file://" + |DOC_PATH| + "/test_docs/fn.foo.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/test_docs/fn.foo.html"
|
||||
show-text: true
|
||||
|
||||
define-function: (
|
||||
"check-run-button",
|
||||
(theme, color, background, hover_color, hover_background),
|
||||
block {
|
||||
local-storage: {"rustdoc-theme": |theme|, "rustdoc-use-system-theme": "false"}
|
||||
set-local-storage: {"rustdoc-theme": |theme|, "rustdoc-use-system-theme": "false"}
|
||||
reload:
|
||||
assert-css: (".test-arrow", {"visibility": "hidden"})
|
||||
move-cursor-to: ".example-wrap"
|
||||
|
@ -1,26 +1,26 @@
|
||||
// This test ensures that the correct style is applied to the rust logo in the sidebar.
|
||||
goto: "file://" + |DOC_PATH| + "/test_docs/index.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
|
||||
|
||||
define-function: (
|
||||
"check-logo",
|
||||
(theme, filter),
|
||||
block {
|
||||
// Going to the doc page.
|
||||
goto: "file://" + |DOC_PATH| + "/test_docs/index.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
|
||||
// Changing theme.
|
||||
local-storage: {"rustdoc-theme": |theme|, "rustdoc-use-system-theme": "false"}
|
||||
set-local-storage: {"rustdoc-theme": |theme|, "rustdoc-use-system-theme": "false"}
|
||||
reload:
|
||||
assert-css: (".rust-logo", {"filter": |filter|})
|
||||
// Going to the source code page.
|
||||
goto: "file://" + |DOC_PATH| + "/src/test_docs/lib.rs.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/src/test_docs/lib.rs.html"
|
||||
// Changing theme (since it's local files, the local storage works by folder).
|
||||
local-storage: {"rustdoc-theme": |theme|, "rustdoc-use-system-theme": "false"}
|
||||
set-local-storage: {"rustdoc-theme": |theme|, "rustdoc-use-system-theme": "false"}
|
||||
reload:
|
||||
assert-css: (".rust-logo", {"filter": |filter|})
|
||||
// Now we check that the non-rust logos don't have a CSS filter set.
|
||||
goto: "file://" + |DOC_PATH| + "/huge_logo/index.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/huge_logo/index.html"
|
||||
// Changing theme on the new page (again...).
|
||||
local-storage: {"rustdoc-theme": |theme|, "rustdoc-use-system-theme": "false"}
|
||||
set-local-storage: {"rustdoc-theme": |theme|, "rustdoc-use-system-theme": "false"}
|
||||
reload:
|
||||
// Check there is no rust logo
|
||||
assert-false: ".rust-logo"
|
||||
|
@ -1,6 +1,6 @@
|
||||
// This test ensures that the scraped examples buttons are working as expecting
|
||||
// when 'Enter' key is pressed when they're focused.
|
||||
goto: "file://" + |DOC_PATH| + "/scrape_examples/fn.test.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/scrape_examples/fn.test.html"
|
||||
|
||||
// The next/prev buttons vertically scroll the code viewport between examples
|
||||
store-property: (initialScrollTop, ".scraped-example-list > .scraped-example pre", "scrollTop")
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Check that scrape example code blocks have the expected colors.
|
||||
goto: "file://" + |DOC_PATH| + "/scrape_examples/fn.test_many.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/scrape_examples/fn.test_many.html"
|
||||
show-text: true
|
||||
|
||||
define-function: (
|
||||
@ -7,7 +7,7 @@ define-function: (
|
||||
(theme, highlight, highlight_focus, help_border, help_color, help_hover_border,
|
||||
help_hover_color),
|
||||
block {
|
||||
local-storage: { "rustdoc-theme": |theme|, "rustdoc-use-system-theme": "false", }
|
||||
set-local-storage: { "rustdoc-theme": |theme|, "rustdoc-use-system-theme": "false", }
|
||||
reload:
|
||||
wait-for: ".more-examples-toggle"
|
||||
assert-css: (".scraped-example .example-wrap .rust span.highlight:not(.focus)", {
|
||||
@ -60,13 +60,13 @@ call-function: ("check-colors", {
|
||||
})
|
||||
|
||||
// Now testing the top and bottom background in case there is only one scraped examples.
|
||||
goto: "file://" + |DOC_PATH| + "/scrape_examples/fn.test.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/scrape_examples/fn.test.html"
|
||||
|
||||
define-function: (
|
||||
"check-background",
|
||||
(theme, background_color_start, background_color_end),
|
||||
block {
|
||||
local-storage: { "rustdoc-theme": |theme|, "rustdoc-use-system-theme": "false", }
|
||||
set-local-storage: { "rustdoc-theme": |theme|, "rustdoc-use-system-theme": "false", }
|
||||
reload:
|
||||
assert-css: (".scraped-example:not(.expanded) .code-wrapper::before", {
|
||||
"background-image": "linear-gradient(" + |background_color_start| + ", " +
|
||||
|
@ -1,5 +1,5 @@
|
||||
// This test ensures that the correct font is used in scraped examples.
|
||||
goto: "file://" + |DOC_PATH| + "/scrape_examples/fn.test_many.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/scrape_examples/fn.test_many.html"
|
||||
|
||||
store-value: (font, '"Fira Sans", Arial, NanumBarunGothic, sans-serif')
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Check that the line number column has the correct layout.
|
||||
goto: "file://" + |DOC_PATH| + "/scrape_examples/fn.test_many.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/scrape_examples/fn.test_many.html"
|
||||
|
||||
// Check that it's not zero.
|
||||
assert-property-false: (
|
||||
@ -44,6 +44,6 @@ assert-position: (".scraped-example .code-wrapper", {"y": 253})
|
||||
assert-position: (".scraped-example .code-wrapper .prev", {"y": 253 + |offset_y|})
|
||||
|
||||
// Then with mobile
|
||||
size: (600, 600)
|
||||
set-window-size: (600, 600)
|
||||
assert-position: (".scraped-example .code-wrapper", {"y": 308})
|
||||
assert-position: (".scraped-example .code-wrapper .prev", {"y": 308 + |offset_y|})
|
||||
|
@ -1,5 +1,5 @@
|
||||
// This tests checks that the "scraped examples" toggle is working as expected.
|
||||
goto: "file://" + |DOC_PATH| + "/scrape_examples/fn.test_many.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/scrape_examples/fn.test_many.html"
|
||||
|
||||
// Checking the color of the toggle line.
|
||||
show-text: true
|
||||
@ -7,7 +7,7 @@ define-function: (
|
||||
"check-color",
|
||||
(theme, toggle_line_color, toggle_line_hover_color),
|
||||
block {
|
||||
local-storage: {"rustdoc-theme": |theme|, "rustdoc-use-system-theme": "false"}
|
||||
set-local-storage: {"rustdoc-theme": |theme|, "rustdoc-use-system-theme": "false"}
|
||||
reload:
|
||||
|
||||
// Clicking "More examples..." will open additional examples
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Checks that the crate search filtering is handled correctly and changes the results.
|
||||
goto: "file://" + |DOC_PATH| + "/test_docs/index.html?search=sa'%3Bda'%3Bds"
|
||||
go-to: "file://" + |DOC_PATH| + "/test_docs/index.html?search=sa'%3Bda'%3Bds"
|
||||
show-text: true
|
||||
|
||||
define-function: (
|
||||
@ -7,7 +7,7 @@ define-function: (
|
||||
(theme, error_background),
|
||||
block {
|
||||
// Setting the theme.
|
||||
local-storage: {"rustdoc-theme": |theme|, "rustdoc-use-system-theme": "false"}
|
||||
set-local-storage: {"rustdoc-theme": |theme|, "rustdoc-use-system-theme": "false"}
|
||||
// We reload the page so the local storage settings are being used.
|
||||
reload:
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Checks that the crate search filtering is handled correctly and changes the results.
|
||||
goto: "file://" + |DOC_PATH| + "/test_docs/index.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
|
||||
show-text: true
|
||||
write: (".search-input", "test")
|
||||
// To be SURE that the search will be run.
|
||||
@ -47,7 +47,7 @@ wait-for: "#search-tabs"
|
||||
assert-property: ("#crate-search", {"value": "all crates"})
|
||||
|
||||
// Checking that the URL parameter is taken into account for crate filtering.
|
||||
goto: "file://" + |DOC_PATH| + "/test_docs/index.html?search=test&filter-crate=lib2"
|
||||
go-to: "file://" + |DOC_PATH| + "/test_docs/index.html?search=test&filter-crate=lib2"
|
||||
wait-for: "#crate-search"
|
||||
assert-property: ("#crate-search", {"value": "lib2"})
|
||||
assert-false: "#results .externcrate"
|
||||
@ -57,10 +57,10 @@ assert-text: (".search-results-title", "Results in all crates", STARTS_WITH)
|
||||
|
||||
// Checking the display of the crate filter.
|
||||
// We start with the light theme.
|
||||
local-storage: {"rustdoc-theme": "light", "rustdoc-use-system-theme": "false"}
|
||||
set-local-storage: {"rustdoc-theme": "light", "rustdoc-use-system-theme": "false"}
|
||||
reload:
|
||||
|
||||
timeout: 2000
|
||||
set-timeout: 2000
|
||||
wait-for: "#crate-search"
|
||||
assert-css: ("#crate-search", {
|
||||
"border": "1px solid rgb(224, 224, 224)",
|
||||
|
@ -1,9 +1,9 @@
|
||||
// This test ensures that the elements in ".search-form" have the expected display.
|
||||
goto: "file://" + |DOC_PATH| + "/test_docs/index.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
|
||||
show-text: true
|
||||
|
||||
// Ayu theme
|
||||
local-storage: {
|
||||
set-local-storage: {
|
||||
"rustdoc-theme": "ayu",
|
||||
"rustdoc-use-system-theme": "false",
|
||||
}
|
||||
@ -89,7 +89,7 @@ assert-css: (
|
||||
)
|
||||
|
||||
// Dark theme
|
||||
local-storage: {
|
||||
set-local-storage: {
|
||||
"rustdoc-theme": "dark",
|
||||
"rustdoc-use-system-theme": "false",
|
||||
}
|
||||
@ -176,7 +176,7 @@ assert-css: (
|
||||
)
|
||||
|
||||
// Light theme
|
||||
local-storage: {
|
||||
set-local-storage: {
|
||||
"rustdoc-theme": "light",
|
||||
"rustdoc-use-system-theme": "false",
|
||||
}
|
||||
|
@ -1,11 +1,11 @@
|
||||
// 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)
|
||||
go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
|
||||
set-window-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)
|
||||
set-window-size: (750, 700)
|
||||
click: "input.search-input"
|
||||
assert: ("input.search-input:focus")
|
||||
|
@ -1,6 +1,6 @@
|
||||
// Checks that the search tab results work correctly with function signature syntax
|
||||
// First, try a search-by-name
|
||||
goto: "file://" + |DOC_PATH| + "/test_docs/index.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
|
||||
write: (".search-input", "Foo")
|
||||
// To be SURE that the search will be run.
|
||||
press-key: 'Enter'
|
||||
|
@ -1,5 +1,5 @@
|
||||
// The goal of this test is to check the color of the "no result" links.
|
||||
goto: "file://" + |DOC_PATH| + "/lib2/index.html?search=sdkfskjfsdks"
|
||||
go-to: "file://" + |DOC_PATH| + "/lib2/index.html?search=sdkfskjfsdks"
|
||||
show-text: true
|
||||
|
||||
define-function: (
|
||||
@ -7,7 +7,7 @@ define-function: (
|
||||
(theme, link, link_hover),
|
||||
block {
|
||||
// Changing theme.
|
||||
local-storage: {"rustdoc-theme": |theme|, "rustdoc-use-system-theme": "false"}
|
||||
set-local-storage: {"rustdoc-theme": |theme|, "rustdoc-use-system-theme": "false"}
|
||||
reload:
|
||||
wait-for: "#results"
|
||||
assert: ".search-failed.active"
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Checks that the reexports are present in the search index, can have
|
||||
// doc aliases and are highligted when their ID is the hash of the page.
|
||||
goto: "file://" + |DOC_PATH| + "/test_docs/index.html"
|
||||
local-storage: {"rustdoc-theme": "dark", "rustdoc-use-system-theme": "false"}
|
||||
go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
|
||||
set-local-storage: {"rustdoc-theme": "dark", "rustdoc-use-system-theme": "false"}
|
||||
reload:
|
||||
// First we check that the reexport has the correct ID and no background color.
|
||||
assert-text: ("//*[@id='reexport.TheStdReexport']", "pub use ::std as TheStdReexport;")
|
||||
|
@ -31,13 +31,13 @@ define-function: (
|
||||
},
|
||||
)
|
||||
|
||||
goto: "file://" + |DOC_PATH| + "/test_docs/index.html?search=coo"
|
||||
go-to: "file://" + |DOC_PATH| + "/test_docs/index.html?search=coo"
|
||||
|
||||
// This is needed so that the text color is computed.
|
||||
show-text: true
|
||||
|
||||
// Ayu theme
|
||||
local-storage: {
|
||||
set-local-storage: {
|
||||
"rustdoc-theme": "ayu",
|
||||
"rustdoc-use-system-theme": "false",
|
||||
}
|
||||
@ -154,7 +154,7 @@ assert-css: (
|
||||
)
|
||||
|
||||
// Dark theme
|
||||
local-storage: {
|
||||
set-local-storage: {
|
||||
"rustdoc-theme": "dark",
|
||||
"rustdoc-use-system-theme": "false",
|
||||
}
|
||||
@ -259,7 +259,7 @@ assert-css: (
|
||||
)
|
||||
|
||||
// Light theme
|
||||
local-storage: {"rustdoc-theme": "light", "rustdoc-use-system-theme": "false"}
|
||||
set-local-storage: {"rustdoc-theme": "light", "rustdoc-use-system-theme": "false"}
|
||||
reload:
|
||||
|
||||
// Waiting for the search results to appear...
|
||||
@ -361,7 +361,7 @@ assert-css: (
|
||||
)
|
||||
|
||||
// Check the alias.
|
||||
goto: "file://" + |DOC_PATH| + "/test_docs/index.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
|
||||
// If the text isn't displayed, the browser doesn't compute color style correctly...
|
||||
show-text: true
|
||||
|
||||
@ -369,7 +369,7 @@ define-function: (
|
||||
"check-alias",
|
||||
(theme, alias, grey),
|
||||
block {
|
||||
local-storage: {"rustdoc-theme": |theme|, "rustdoc-use-system-theme": "false"}
|
||||
set-local-storage: {"rustdoc-theme": |theme|, "rustdoc-use-system-theme": "false"}
|
||||
reload:
|
||||
write: (".search-input", "thisisanalias")
|
||||
// To be SURE that the search will be run.
|
||||
|
@ -1,5 +1,5 @@
|
||||
// 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"
|
||||
go-to: "file://" + |DOC_PATH| + "/test_docs/index.html?search=some_more_function"
|
||||
// Waiting for the search results to appear...
|
||||
wait-for: "#search-tabs"
|
||||
assert-text: (".search-results .desc code", "format!")
|
||||
|
@ -1,6 +1,6 @@
|
||||
// Checks that the search results have the expected width.
|
||||
goto: "file://" + |DOC_PATH| + "/test_docs/index.html"
|
||||
size: (900, 1000)
|
||||
go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
|
||||
set-window-size: (900, 1000)
|
||||
write: (".search-input", "test")
|
||||
// To be SURE that the search will be run.
|
||||
press-key: 'Enter'
|
||||
@ -8,7 +8,7 @@ wait-for: "#crate-search"
|
||||
// The width is returned by "getComputedStyle" which returns the exact number instead of the
|
||||
// CSS rule which is "50%"...
|
||||
assert-css: (".search-results div.desc", {"width": "310px"})
|
||||
size: (600, 100)
|
||||
set-window-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-css: (".search-results div.desc", {"width": "566px"})
|
||||
@ -18,7 +18,7 @@ assert-css: (".search-results .result-name > span", {"display": "inline"})
|
||||
|
||||
// Check that the crate filter `<select>` is correctly handled when it goes to next line.
|
||||
// To do so we need to update the length of one of its `<option>`.
|
||||
size: (900, 900)
|
||||
set-window-size: (900, 900)
|
||||
|
||||
// First we check the current width, height and position.
|
||||
assert-css: ("#crate-search", {"width": "223px"})
|
||||
@ -26,7 +26,7 @@ assert-css: (".search-results-title", {"height": "50px", "width": "640px"})
|
||||
assert-css: ("#search", {"width": "640px"})
|
||||
|
||||
// Then we update the text of one of the `<option>`.
|
||||
text: (
|
||||
set-text: (
|
||||
"#crate-search option",
|
||||
"sdjfaksdjfaksjdbfkadsbfkjsadbfkdsbkfbsadkjfbkdsabfkadsfkjdsafa",
|
||||
)
|
||||
@ -43,7 +43,7 @@ define-function: (
|
||||
"check-filter",
|
||||
(theme, border, filter, hover_border, hover_filter),
|
||||
block {
|
||||
local-storage: {"rustdoc-theme": |theme|, "rustdoc-use-system-theme": "false"}
|
||||
set-local-storage: {"rustdoc-theme": |theme|, "rustdoc-use-system-theme": "false"}
|
||||
reload:
|
||||
wait-for: "#crate-search"
|
||||
assert-css: ("#crate-search", {"border": "1px solid " + |border|})
|
||||
|
@ -2,11 +2,11 @@
|
||||
|
||||
// First, we check that the first page doesn't have the string we're looking for to ensure
|
||||
// that the feature is changing page as expected.
|
||||
goto: "file://" + |DOC_PATH| + "/test_docs/index.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
|
||||
assert-text-false: (".main-heading h1", "Struct test_docs::Foo")
|
||||
|
||||
// We now check that we land on the search result page if "go_to_first" isn't set.
|
||||
goto: "file://" + |DOC_PATH| + "/test_docs/index.html?search=struct%3AFoo"
|
||||
go-to: "file://" + |DOC_PATH| + "/test_docs/index.html?search=struct%3AFoo"
|
||||
// Waiting for the search results to appear...
|
||||
wait-for: "#search-tabs"
|
||||
assert-text-false: (".main-heading h1", "Struct test_docs::Foo")
|
||||
@ -14,6 +14,6 @@ assert-text-false: (".main-heading h1", "Struct test_docs::Foo")
|
||||
assert-css: ("#main-content", {"display": "none"})
|
||||
|
||||
// Now we can check that the feature is working as expected!
|
||||
goto: "file://" + |DOC_PATH| + "/test_docs/index.html?search=struct%3AFoo&go_to_first=true"
|
||||
go-to: "file://" + |DOC_PATH| + "/test_docs/index.html?search=struct%3AFoo&go_to_first=true"
|
||||
// Waiting for the page to load...
|
||||
wait-for-text: (".main-heading h1", "Struct test_docs::Foo")
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Checks that the "keyword" results have the expected text alongside them.
|
||||
goto: "file://" + |DOC_PATH| + "/test_docs/index.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
|
||||
write: (".search-input", "CookieMonster")
|
||||
// To be SURE that the search will be run.
|
||||
press-key: 'Enter'
|
||||
|
@ -1,6 +1,6 @@
|
||||
// Checks that the search tab results work correctly with function signature syntax
|
||||
// First, try a search-by-name
|
||||
goto: "file://" + |DOC_PATH| + "/test_docs/index.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
|
||||
write: (".search-input", "Foo")
|
||||
// To be SURE that the search will be run.
|
||||
press-key: 'Enter'
|
||||
@ -22,7 +22,7 @@ press-key: "ArrowLeft"
|
||||
wait-for-attribute: ("#search-tabs > button:nth-of-type(3)", {"class": "selected"})
|
||||
|
||||
// Now try search-by-return
|
||||
goto: "file://" + |DOC_PATH| + "/test_docs/index.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
|
||||
write: (".search-input", "-> String")
|
||||
// To be SURE that the search will be run.
|
||||
press-key: 'Enter'
|
||||
@ -44,7 +44,7 @@ press-key: "ArrowLeft"
|
||||
wait-for-attribute: ("#search-tabs > button:nth-of-type(1)", {"class": "selected"})
|
||||
|
||||
// Try with a search-by-return with no results
|
||||
goto: "file://" + |DOC_PATH| + "/test_docs/index.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
|
||||
write: (".search-input", "-> Something")
|
||||
// To be SURE that the search will be run.
|
||||
press-key: 'Enter'
|
||||
@ -54,7 +54,7 @@ assert-attribute: ("#search-tabs > button:nth-of-type(1)", {"class": "selected"}
|
||||
assert-text: ("#search-tabs > button:nth-of-type(1)", "In Function Return Types", STARTS_WITH)
|
||||
|
||||
// Try with a search-by-parameter
|
||||
goto: "file://" + |DOC_PATH| + "/test_docs/index.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
|
||||
write: (".search-input", "usize pattern")
|
||||
// To be SURE that the search will be run.
|
||||
press-key: 'Enter'
|
||||
@ -64,7 +64,7 @@ assert-attribute: ("#search-tabs > button:nth-of-type(1)", {"class": "selected"}
|
||||
assert-text: ("#search-tabs > button:nth-of-type(1)", "In Function Parameters", STARTS_WITH)
|
||||
|
||||
// Try with a search-by-parameter-and-return
|
||||
goto: "file://" + |DOC_PATH| + "/test_docs/index.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
|
||||
write: (".search-input", "pattern -> str")
|
||||
// To be SURE that the search will be run.
|
||||
press-key: 'Enter'
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Checking the colors of the search tab headers.
|
||||
goto: "file://" + |DOC_PATH| + "/test_docs/fn.foo.html?search=something"
|
||||
go-to: "file://" + |DOC_PATH| + "/test_docs/fn.foo.html?search=something"
|
||||
show-text: true
|
||||
|
||||
define-function: (
|
||||
@ -9,7 +9,7 @@ define-function: (
|
||||
border_top_hover),
|
||||
block {
|
||||
// Setting the theme.
|
||||
local-storage: {"rustdoc-theme": |theme|, "rustdoc-use-system-theme": "false"}
|
||||
set-local-storage: {"rustdoc-theme": |theme|, "rustdoc-use-system-theme": "false"}
|
||||
reload:
|
||||
|
||||
// These two commands are used to be sure the search will be run.
|
||||
|
@ -16,7 +16,7 @@ define-function: (
|
||||
}
|
||||
)
|
||||
|
||||
goto: "file://" + |DOC_PATH| + "/lib2/scroll_traits/trait.Iterator.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/lib2/scroll_traits/trait.Iterator.html"
|
||||
|
||||
// We check that the setting is enabled by default and is working.
|
||||
call-function: ("check-setting", {
|
||||
|
@ -13,7 +13,7 @@ define-function: (
|
||||
}
|
||||
)
|
||||
|
||||
goto: "file://" + |DOC_PATH| + "/lib2/struct.Foo.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/lib2/struct.Foo.html"
|
||||
|
||||
// We check that the setting is disabled by default.
|
||||
call-function: ("check-setting", {
|
||||
|
@ -12,7 +12,7 @@ define-function: (
|
||||
}
|
||||
)
|
||||
|
||||
goto: "file://" + |DOC_PATH| + "/test_docs/struct.Foo.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/test_docs/struct.Foo.html"
|
||||
|
||||
// By default, the trait implementations are not collapsed.
|
||||
call-function: ("check-setting", {
|
||||
|
@ -11,7 +11,7 @@ define-function: (
|
||||
}
|
||||
)
|
||||
|
||||
goto: "file://" + |DOC_PATH| + "/lib2/index.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/lib2/index.html"
|
||||
|
||||
call-function: ("check-setting", {
|
||||
"storage_value": null,
|
||||
@ -19,7 +19,7 @@ call-function: ("check-setting", {
|
||||
})
|
||||
|
||||
// By default, the search doesn't automatically go to the page if there is only one result.
|
||||
goto: "file://" + |DOC_PATH| + "/lib2/index.html?search=HasALongTraitWithParams"
|
||||
go-to: "file://" + |DOC_PATH| + "/lib2/index.html?search=HasALongTraitWithParams"
|
||||
// It will timeout if the setting isn't working.
|
||||
wait-for: "#search"
|
||||
assert-document-property: ({"URL": "/lib2/index.html"}, CONTAINS)
|
||||
@ -30,14 +30,14 @@ wait-for: "#settings"
|
||||
click: "#go-to-only-result"
|
||||
assert-local-storage: {"rustdoc-go-to-only-result": "true"}
|
||||
|
||||
goto: "file://" + |DOC_PATH| + "/lib2/index.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/lib2/index.html"
|
||||
// We enter it into the search.
|
||||
write: (".search-input", "HasALongTraitWithParams")
|
||||
wait-for-document-property: {"title": "HasALongTraitWithParams in lib2 - Rust"}
|
||||
assert-document-property: ({"URL": "/lib2/struct.HasALongTraitWithParams.html"}, ENDS_WITH)
|
||||
|
||||
// We try again to see if it goes to the only result
|
||||
goto: "file://" + |DOC_PATH| + "/lib2/index.html?search=HasALongTraitWithParams"
|
||||
go-to: "file://" + |DOC_PATH| + "/lib2/index.html?search=HasALongTraitWithParams"
|
||||
wait-for-document-property: {"title": "HasALongTraitWithParams in lib2 - Rust"}
|
||||
assert-document-property: ({"URL": "/lib2/struct.HasALongTraitWithParams.html"}, ENDS_WITH)
|
||||
|
||||
@ -51,7 +51,7 @@ call-function: ("check-setting", {
|
||||
click: "#go-to-only-result"
|
||||
assert-local-storage: {"rustdoc-go-to-only-result": "false"}
|
||||
|
||||
goto: "file://" + |DOC_PATH| + "/lib2/index.html?search=HasALongTraitWithParams"
|
||||
go-to: "file://" + |DOC_PATH| + "/lib2/index.html?search=HasALongTraitWithParams"
|
||||
// It will timeout if the setting isn't working.
|
||||
wait-for: "#search"
|
||||
assert-document-property: ({"URL": "/lib2/index.html"}, CONTAINS)
|
||||
|
@ -1,6 +1,6 @@
|
||||
// This test ensures that the settings menu display is working as expected and that
|
||||
// the settings page is also rendered as expected.
|
||||
goto: "file://" + |DOC_PATH| + "/test_docs/index.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
|
||||
show-text: true // needed when we check for colors below.
|
||||
// First, we check that the settings page doesn't exist.
|
||||
assert-false: "#settings"
|
||||
@ -35,7 +35,7 @@ wait-for: "#alternative-display #search"
|
||||
assert: "#main-content.hidden"
|
||||
|
||||
// Now let's check the content of the settings menu.
|
||||
local-storage: {"rustdoc-theme": "dark", "rustdoc-use-system-theme": "false"}
|
||||
set-local-storage: {"rustdoc-theme": "dark", "rustdoc-use-system-theme": "false"}
|
||||
reload:
|
||||
click: "#settings-menu"
|
||||
wait-for: "#settings"
|
||||
@ -189,7 +189,7 @@ assert-text: ("#preferred-light-theme .setting-radio-name", "Preferred light the
|
||||
|
||||
// We now check that clicking on the toggles' text is like clicking on the checkbox.
|
||||
// To test it, we use the "Disable keyboard shortcuts".
|
||||
local-storage: {"rustdoc-disable-shortcuts": "false"}
|
||||
set-local-storage: {"rustdoc-disable-shortcuts": "false"}
|
||||
click: ".setting-line:last-child .setting-check span"
|
||||
assert-local-storage: {"rustdoc-disable-shortcuts": "true"}
|
||||
|
||||
@ -227,7 +227,7 @@ wait-for-css: ("#settings-menu .popover", {"display": "none"})
|
||||
wait-for-css: ("#help-button .popover", {"display": "block"})
|
||||
|
||||
// Now we go to the settings page to check that the CSS is loaded as expected.
|
||||
goto: "file://" + |DOC_PATH| + "/settings.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/settings.html"
|
||||
wait-for: "#settings"
|
||||
assert-css: (".setting-line", {"position": "relative"})
|
||||
|
||||
@ -247,7 +247,7 @@ javascript: true
|
||||
// Check for the display on small screen
|
||||
show-text: true
|
||||
reload:
|
||||
size: (300, 1000)
|
||||
set-window-size: (300, 1000)
|
||||
click: "#settings-menu"
|
||||
wait-for: "#settings"
|
||||
assert-css: (".setting-line", {"position": "relative"})
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Check that the various shortcuts are working.
|
||||
goto: "file://" + |DOC_PATH| + "/test_docs/index.html"
|
||||
go-to: "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"
|
||||
|
@ -1,5 +1,5 @@
|
||||
// This test checks links colors in sidebar before and after hover.
|
||||
goto: "file://" + |DOC_PATH| + "/test_docs/struct.Foo.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/test_docs/struct.Foo.html"
|
||||
|
||||
// This is needed so that the text color is computed.
|
||||
show-text: true
|
||||
@ -13,7 +13,7 @@ define-function: (
|
||||
type_hover_background, keyword, keyword_hover, keyword_hover_background,
|
||||
),
|
||||
block {
|
||||
local-storage: { "rustdoc-theme": |theme|, "rustdoc-use-system-theme": "false" }
|
||||
set-local-storage: { "rustdoc-theme": |theme|, "rustdoc-use-system-theme": "false" }
|
||||
reload:
|
||||
// Struct
|
||||
assert-css: (
|
||||
|
@ -1,5 +1,5 @@
|
||||
// This test ensures that the reexport of a macro doesn't make the original macro
|
||||
// displayed twice in the sidebar.
|
||||
goto: "file://" + |DOC_PATH| + "/test_docs/macro.repro.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/test_docs/macro.repro.html"
|
||||
wait-for: ".sidebar-elems .block.macro a"
|
||||
assert-count: ("//*[@class='sidebar-elems']//*[@class='block macro']//a[text()='repro']", 1)
|
||||
|
@ -1,7 +1,7 @@
|
||||
// This test ensures that the mobile sidebar preserves scroll position.
|
||||
goto: "file://" + |DOC_PATH| + "/test_docs/struct.Foo.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/test_docs/struct.Foo.html"
|
||||
// Switching to "mobile view" by reducing the width to 600px.
|
||||
size: (700, 600)
|
||||
set-window-size: (700, 600)
|
||||
assert-css: (".sidebar", {"display": "block", "left": "-1000px"})
|
||||
|
||||
// Scroll down.
|
||||
@ -27,5 +27,5 @@ assert-window-property: {"pageYOffset": "622"}
|
||||
click: ".sidebar-menu-toggle"
|
||||
wait-for-css: (".sidebar", {"left": "0px"})
|
||||
assert-window-property: {"pageYOffset": "0"}
|
||||
size: (900, 600)
|
||||
set-window-size: (900, 600)
|
||||
assert-window-property: {"pageYOffset": "622"}
|
||||
|
@ -1,9 +1,9 @@
|
||||
// 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"
|
||||
go-to: "file://" + |DOC_PATH| + "/test_docs/struct.Foo.html"
|
||||
// Switching to "mobile view" by reducing the width to 600px.
|
||||
size: (600, 600)
|
||||
set-window-size: (600, 600)
|
||||
assert-css: (".sidebar", {"display": "block", "left": "-1000px"})
|
||||
// Opening the sidebar menu.
|
||||
click: ".sidebar-menu-toggle"
|
||||
@ -59,7 +59,7 @@ define-function: (
|
||||
"check-colors",
|
||||
(theme, color, background),
|
||||
block {
|
||||
local-storage: {"rustdoc-use-system-theme": "false", "rustdoc-theme": |theme|}
|
||||
set-local-storage: {"rustdoc-use-system-theme": "false", "rustdoc-theme": |theme|}
|
||||
reload:
|
||||
|
||||
// Open the sidebar menu.
|
||||
|
@ -1,6 +1,6 @@
|
||||
// This test ensures that the elements in the sidebar are displayed correctly.
|
||||
javascript: false
|
||||
goto: "file://" + |DOC_PATH| + "/src/test_docs/lib.rs.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/src/test_docs/lib.rs.html"
|
||||
// Since the javascript is disabled, there shouldn't be a toggle.
|
||||
assert-false: "#src-sidebar-toggle"
|
||||
wait-for-css: (".sidebar", {"display": "none"})
|
||||
@ -22,7 +22,7 @@ wait-for-css: ("#src-sidebar-toggle", {"visibility": "visible"})
|
||||
wait-for-css: (".sidebar", {"width": "300px"})
|
||||
assert-local-storage: {"rustdoc-source-sidebar-show": "true"}
|
||||
click: ".sidebar a.selected"
|
||||
goto: "file://" + |DOC_PATH| + "/src/test_docs/lib.rs.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/src/test_docs/lib.rs.html"
|
||||
wait-for-css: (".sidebar", {"width": "300px"})
|
||||
assert-local-storage: {"rustdoc-source-sidebar-show": "true"}
|
||||
|
||||
@ -36,7 +36,7 @@ define-function: (
|
||||
background_toggle_hover,
|
||||
),
|
||||
block {
|
||||
local-storage: {"rustdoc-theme": |theme|, "rustdoc-use-system-theme": "false"}
|
||||
set-local-storage: {"rustdoc-theme": |theme|, "rustdoc-use-system-theme": "false"}
|
||||
reload:
|
||||
wait-for-css: ("#src-sidebar-toggle", {"visibility": "visible"})
|
||||
assert-css: (
|
||||
@ -148,7 +148,7 @@ call-function: ("check-colors", {
|
||||
})
|
||||
|
||||
// Now checking on mobile devices.
|
||||
size: (500, 700)
|
||||
set-window-size: (500, 700)
|
||||
reload:
|
||||
// Waiting for the sidebar to be displayed...
|
||||
wait-for-css: ("#src-sidebar-toggle", {"visibility": "visible"})
|
||||
@ -184,13 +184,13 @@ wait-for-css: (".sidebar", {"left": "-1000px"})
|
||||
assert-window-property: {"pageYOffset": "2542"}
|
||||
|
||||
// We now check that the scroll position is restored if the window is resized.
|
||||
size: (500, 700)
|
||||
set-window-size: (500, 700)
|
||||
click: "#src-sidebar-toggle"
|
||||
wait-for-css: ("#source-sidebar", {"visibility": "visible"})
|
||||
assert-window-property: {"pageYOffset": "0"}
|
||||
size: (900, 900)
|
||||
set-window-size: (900, 900)
|
||||
assert-window-property: {"pageYOffset": "2542"}
|
||||
size: (500, 700)
|
||||
set-window-size: (500, 700)
|
||||
click: "#src-sidebar-toggle"
|
||||
wait-for-css: ("#source-sidebar", {"visibility": "hidden"})
|
||||
|
||||
@ -203,11 +203,11 @@ click: "#src-sidebar-toggle"
|
||||
wait-for-css: ("#source-sidebar", {"visibility": "visible"})
|
||||
assert-local-storage: {"rustdoc-source-sidebar-show": "true"}
|
||||
click: ".sidebar a.selected"
|
||||
goto: "file://" + |DOC_PATH| + "/src/test_docs/lib.rs.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/src/test_docs/lib.rs.html"
|
||||
wait-for-css: ("#source-sidebar", {"visibility": "hidden"})
|
||||
assert-local-storage: {"rustdoc-source-sidebar-show": "false"}
|
||||
// Resize back to desktop size, to check that the sidebar doesn't spontaneously open.
|
||||
size: (1000, 1000)
|
||||
set-window-size: (1000, 1000)
|
||||
wait-for-css: ("#source-sidebar", {"visibility": "hidden"})
|
||||
assert-local-storage: {"rustdoc-source-sidebar-show": "false"}
|
||||
click: "#src-sidebar-toggle"
|
||||
|
@ -1,6 +1,6 @@
|
||||
// The goal of this test is to ensure that the sidebar is working as expected in the source
|
||||
// code pages.
|
||||
goto: "file://" + |DOC_PATH| + "/src/test_docs/lib.rs.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/src/test_docs/lib.rs.html"
|
||||
show-text: true
|
||||
|
||||
// First, check the sidebar colors.
|
||||
@ -8,7 +8,7 @@ define-function: (
|
||||
"check-colors",
|
||||
(theme, color, background_color),
|
||||
block {
|
||||
local-storage: {
|
||||
set-local-storage: {
|
||||
"rustdoc-theme": |theme|,
|
||||
"rustdoc-use-system-theme": "false",
|
||||
}
|
||||
@ -47,7 +47,7 @@ call-function: (
|
||||
)
|
||||
|
||||
// Next, desktop mode layout.
|
||||
size: (1100, 800)
|
||||
set-window-size: (1100, 800)
|
||||
// We check that the sidebar isn't expanded and has the expected width.
|
||||
assert-css: ("nav.sidebar", {"width": "50px"})
|
||||
// We now click on the button to expand the sidebar.
|
||||
@ -62,7 +62,7 @@ wait-for: "html:not(.expanded)"
|
||||
assert: "nav.sidebar"
|
||||
|
||||
// Checking that only the path to the current file is "open".
|
||||
goto: "file://" + |DOC_PATH| + "/src/lib2/another_folder/sub_mod/mod.rs.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/src/lib2/another_folder/sub_mod/mod.rs.html"
|
||||
// First we expand the sidebar again.
|
||||
click: (10, 10)
|
||||
// We wait for the sidebar to be expanded.
|
||||
@ -76,7 +76,7 @@ assert: "//*[@class='dir-entry' and not(@open)]/*[text()='another_mod']"
|
||||
assert-count: ("//*[@id='source-sidebar']/details[not(text()='lib2') and not(@open)]", 8)
|
||||
|
||||
// We now switch to mobile mode.
|
||||
size: (600, 600)
|
||||
set-window-size: (600, 600)
|
||||
wait-for-css: (".source-sidebar-expanded nav.sidebar", {"left": "0px"})
|
||||
// We collapse the sidebar.
|
||||
click: (10, 10)
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Checks multiple things on the sidebar display (width of its elements, colors, etc).
|
||||
goto: "file://" + |DOC_PATH| + "/test_docs/index.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
|
||||
assert-property: (".sidebar", {"clientWidth": "200"})
|
||||
show-text: true
|
||||
|
||||
@ -8,7 +8,7 @@ define-function: (
|
||||
"check-colors",
|
||||
(theme, color, background_color),
|
||||
block {
|
||||
local-storage: {
|
||||
set-local-storage: {
|
||||
"rustdoc-theme": |theme|,
|
||||
"rustdoc-use-system-theme": "false",
|
||||
}
|
||||
@ -46,7 +46,7 @@ call-function: (
|
||||
}
|
||||
)
|
||||
|
||||
local-storage: {"rustdoc-theme": "light"}
|
||||
set-local-storage: {"rustdoc-theme": "light"}
|
||||
// We reload the page so the local storage settings are being used.
|
||||
reload:
|
||||
|
||||
@ -86,13 +86,13 @@ click: ".sidebar h2.location a"
|
||||
assert-property: ("html", {"scrollTop": "0"})
|
||||
|
||||
// We now go back to the crate page to click on the "lib2" crate link.
|
||||
goto: "file://" + |DOC_PATH| + "/test_docs/index.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
|
||||
assert-property: (".sidebar", {"clientWidth": "200"})
|
||||
assert-css: (".sidebar-elems ul.crate > li:first-child > a", {"color": "rgb(53, 109, 164)"})
|
||||
click: ".sidebar-elems ul.crate > li:first-child > a"
|
||||
|
||||
// PAGE: lib2/index.html
|
||||
goto: "file://" + |DOC_PATH| + "/lib2/index.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/lib2/index.html"
|
||||
assert-property: (".sidebar", {"clientWidth": "200"})
|
||||
assert-text: (".sidebar > .location", "Crate lib2")
|
||||
// We check that we have the crates list and that the "current" on is now "lib2".
|
||||
@ -115,13 +115,13 @@ assert-text: (".sidebar .sidebar-elems h2", "In lib2")
|
||||
// We check that we don't have the crate list.
|
||||
assert-false: ".sidebar-elems > .crate"
|
||||
|
||||
goto: "./module/index.html"
|
||||
go-to: "./module/index.html"
|
||||
assert-property: (".sidebar", {"clientWidth": "200"})
|
||||
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"
|
||||
go-to: "./sub_module/sub_sub_module/index.html"
|
||||
assert-property: (".sidebar", {"clientWidth": "200"})
|
||||
assert-text: (".sidebar > .location", "Module sub_sub_module")
|
||||
// We check that we don't have the crate list.
|
||||
@ -130,13 +130,13 @@ assert-text: (".sidebar-elems > section ul > li:nth-child(1)", "Functions")
|
||||
assert-text: ("#functions + .item-table .item-name > a", "foo")
|
||||
|
||||
// Links to trait implementations in the sidebar should not wrap even if they are long.
|
||||
goto: "file://" + |DOC_PATH| + "/lib2/struct.HasALongTraitWithParams.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/lib2/struct.HasALongTraitWithParams.html"
|
||||
assert-property: (".sidebar", {"clientWidth": "200"})
|
||||
assert-property: (".sidebar-elems section .block li > a", {"offsetHeight": 29})
|
||||
|
||||
// Test that clicking on of the "In <module>" headings in the sidebar links to the
|
||||
// appropriate anchor in index.html.
|
||||
goto: "file://" + |DOC_PATH| + "/test_docs/struct.Foo.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/test_docs/struct.Foo.html"
|
||||
assert-property: (".sidebar", {"clientWidth": "200"})
|
||||
click: "//ul[@class='block mod']/preceding-sibling::h3/a"
|
||||
// PAGE: index.html
|
||||
@ -151,12 +151,12 @@ assert-text: ("#toggle-all-docs", "[−]")
|
||||
assert-property: (".sidebar", {"clientWidth": "200"})
|
||||
|
||||
// Checks that all.html and index.html have their sidebar link in the same place.
|
||||
goto: "file://" + |DOC_PATH| + "/test_docs/index.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
|
||||
store-property: (index_sidebar_width, ".sidebar .location a", "clientWidth")
|
||||
store-property: (index_sidebar_height, ".sidebar .location a", "clientHeight")
|
||||
store-property: (index_sidebar_x, ".sidebar .location a", "offsetTop")
|
||||
store-property: (index_sidebar_y, ".sidebar .location a", "offsetLeft")
|
||||
goto: "file://" + |DOC_PATH| + "/test_docs/all.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/test_docs/all.html"
|
||||
assert-property: (".sidebar .location a", {
|
||||
"clientWidth": |index_sidebar_width|,
|
||||
"clientHeight": |index_sidebar_height|,
|
||||
|
@ -1,9 +1,9 @@
|
||||
// We check that when the anchor changes and is output of the displayed content,
|
||||
// the page is scrolled to it.
|
||||
goto: "file://" + |DOC_PATH| + "/src/link_to_definition/lib.rs.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/src/link_to_definition/lib.rs.html"
|
||||
|
||||
// We reduce the window size to make it easier to make an element "out of the page".
|
||||
size: (600, 800)
|
||||
set-window-size: (600, 800)
|
||||
// We check that the scroll is at the top first.
|
||||
assert-property: ("html", {"scrollTop": "0"})
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
// Checks that the scrollbar is visible on the page rather than the code block.
|
||||
goto: "file://" + |DOC_PATH| + "/src/test_docs/lib.rs.html"
|
||||
size: (800, 1000)
|
||||
go-to: "file://" + |DOC_PATH| + "/src/test_docs/lib.rs.html"
|
||||
set-window-size: (800, 1000)
|
||||
// "scrollWidth" should be superior than "clientWidth".
|
||||
assert-property: ("body", {"scrollWidth": 1047, "clientWidth": 800})
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Checks that the interactions with the source code pages are working as expected.
|
||||
goto: "file://" + |DOC_PATH| + "/src/test_docs/lib.rs.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/src/test_docs/lib.rs.html"
|
||||
show-text: true
|
||||
// Check that we can click on the line number.
|
||||
click: ".src-line-numbers > a:nth-child(4)" // This is the anchor for line 4.
|
||||
@ -12,7 +12,7 @@ reload:
|
||||
assert-attribute: ("//*[@id='4']", {"class": "line-highlighted"})
|
||||
assert-css: ("//*[@id='4']", {"border-right-width": "0px"})
|
||||
// We now check that the good anchors are highlighted
|
||||
goto: "file://" + |DOC_PATH| + "/src/test_docs/lib.rs.html#4-6"
|
||||
go-to: "file://" + |DOC_PATH| + "/src/test_docs/lib.rs.html#4-6"
|
||||
assert-attribute-false: (".src-line-numbers > a:nth-child(3)", {"class": "line-highlighted"})
|
||||
assert-attribute: (".src-line-numbers > a:nth-child(4)", {"class": "line-highlighted"})
|
||||
assert-attribute: (".src-line-numbers > a:nth-child(5)", {"class": "line-highlighted"})
|
||||
@ -23,7 +23,7 @@ define-function: (
|
||||
"check-colors",
|
||||
(theme, color, background_color, highlight_color, highlight_background_color),
|
||||
block {
|
||||
local-storage: {"rustdoc-theme": |theme|, "rustdoc-use-system-theme": "false"}
|
||||
set-local-storage: {"rustdoc-theme": |theme|, "rustdoc-use-system-theme": "false"}
|
||||
reload:
|
||||
assert-css: (
|
||||
".src-line-numbers > a:not(.line-highlighted)",
|
||||
@ -87,7 +87,7 @@ assert-css: (".src-line-numbers", {"text-align": "right"})
|
||||
|
||||
// Now let's check that clicking on something else than the line number doesn't
|
||||
// do anything (and certainly not add a `#NaN` to the URL!).
|
||||
goto: "file://" + |DOC_PATH| + "/src/test_docs/lib.rs.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/src/test_docs/lib.rs.html"
|
||||
// We use this assert-position to know where we will click.
|
||||
assert-position: ("//*[@id='1']", {"x": 88, "y": 112})
|
||||
// We click on the left of the "1" anchor but still in the "src-line-number" `<pre>`.
|
||||
@ -175,7 +175,7 @@ assert-property: ("#main-content", {"offsetTop": 90})
|
||||
// 28 = 90 - 34 - 28
|
||||
|
||||
// Now do the same check on moderately-sized, tablet mobile.
|
||||
size: (700, 700)
|
||||
set-window-size: (700, 700)
|
||||
assert-css: ("nav.sub", {"flex-direction": "row"})
|
||||
assert-property: ("nav.sub form", {"offsetTop": 21, "offsetHeight": 34})
|
||||
assert-property: ("#main-content", {"offsetTop": 76})
|
||||
@ -198,7 +198,7 @@ call-function: ("check-sidebar-dir-entry", {
|
||||
})
|
||||
|
||||
// Tiny, phone mobile gets a different display where the logo is stacked on top.
|
||||
size: (450, 700)
|
||||
set-window-size: (450, 700)
|
||||
assert-css: ("nav.sub", {"flex-direction": "column"})
|
||||
|
||||
// Check the sidebar directory entries have a marker and spacing (phone).
|
||||
|
@ -1,7 +1,7 @@
|
||||
// This test ensures that the "[src]" have the same font size as their headers
|
||||
// to avoid having some weird height difference in the background when the element
|
||||
// is selected.
|
||||
goto: "file://" + |DOC_PATH| + "/test_docs/struct.Foo.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/test_docs/struct.Foo.html"
|
||||
show-text: true
|
||||
// Check the impl headers.
|
||||
assert-css: (".impl .srclink", {"font-size": "16px", "font-weight": 400}, ALL)
|
||||
|
@ -1,12 +1,12 @@
|
||||
// All stability badges should have rounded corners and colored backgrounds.
|
||||
goto: "file://" + |DOC_PATH| + "/test_docs/index.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
|
||||
show-text: true
|
||||
define-function: (
|
||||
"check-badge",
|
||||
(theme, background, color),
|
||||
block {
|
||||
local-storage: {"rustdoc-use-system-theme": "false", "rustdoc-theme": |theme|}
|
||||
goto: "file://" + |DOC_PATH| + "/test_docs/index.html"
|
||||
set-local-storage: {"rustdoc-use-system-theme": "false", "rustdoc-theme": |theme|}
|
||||
go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
|
||||
assert: ".docblock .stab"
|
||||
assert: ".item-table .stab"
|
||||
assert-css: (".stab", {
|
||||
@ -14,7 +14,7 @@ define-function: (
|
||||
"color": |color|,
|
||||
"background-color": |background|,
|
||||
})
|
||||
goto: "file://" + |DOC_PATH| + "/test_docs/fn.replaced_function.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/test_docs/fn.replaced_function.html"
|
||||
assert: (".item-info .stab")
|
||||
assert-css: (".stab", {
|
||||
"border-radius": "3px",
|
||||
|
@ -1,5 +1,5 @@
|
||||
// This test ensures that each field is on its own line (In other words, they have display: block).
|
||||
goto: "file://" + |DOC_PATH| + "/test_docs/struct.StructWithPublicUndocumentedFields.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/test_docs/struct.StructWithPublicUndocumentedFields.html"
|
||||
|
||||
store-property: (first_top, "//*[@id='structfield.first']", "offsetTop")
|
||||
assert-property-false: ("//*[@id='structfield.second']", { "offsetTop": |first_top| })
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Check that the targetted element has the expected styles.
|
||||
goto: "file://" + |DOC_PATH| + "/lib2/struct.Foo.html#method.a_method"
|
||||
go-to: "file://" + |DOC_PATH| + "/lib2/struct.Foo.html#method.a_method"
|
||||
show-text: true
|
||||
|
||||
// Confirming that the method is the target.
|
||||
@ -9,7 +9,7 @@ define-function: (
|
||||
"check-style",
|
||||
(theme, background, border),
|
||||
block {
|
||||
local-storage: {"rustdoc-theme": |theme|, "rustdoc-use-system-theme": "false"}
|
||||
set-local-storage: {"rustdoc-theme": |theme|, "rustdoc-use-system-theme": "false"}
|
||||
reload:
|
||||
assert-css: ("#method\.a_method:target", {
|
||||
"background-color": |background|,
|
||||
|
@ -1,6 +1,6 @@
|
||||
// Ensures that the theme change is working as expected.
|
||||
goto: "file://" + |DOC_PATH| + "/test_docs/index.html"
|
||||
local-storage: {"rustdoc-use-system-theme": "false", "rustdoc-theme": "dark"}
|
||||
go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
|
||||
set-local-storage: {"rustdoc-use-system-theme": "false", "rustdoc-theme": "dark"}
|
||||
reload:
|
||||
|
||||
store-value: (background_light, "rgb(255, 255, 255)")
|
||||
@ -22,11 +22,11 @@ click: "#theme-dark"
|
||||
wait-for-css: ("body", { "background-color": |background_dark| })
|
||||
assert-local-storage: { "rustdoc-theme": "dark" }
|
||||
|
||||
local-storage: {
|
||||
set-local-storage: {
|
||||
"rustdoc-preferred-light-theme": "light",
|
||||
"rustdoc-preferred-dark-theme": "light",
|
||||
}
|
||||
goto: "file://" + |DOC_PATH| + "/settings.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/settings.html"
|
||||
|
||||
wait-for: "#settings"
|
||||
click: "#theme-light"
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Ensure that the theme picker always starts with the actual defaults.
|
||||
goto: "file://" + |DOC_PATH| + "/test_docs/index.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
|
||||
click: "#settings-menu"
|
||||
wait-for: "#theme-system-preference"
|
||||
assert: "#theme-system-preference:checked"
|
||||
@ -9,13 +9,13 @@ assert-false: "#preferred-dark-theme-ayu:checked"
|
||||
|
||||
// Test legacy migration from old theme setup without system-preference matching.
|
||||
// See https://github.com/rust-lang/rust/pull/77809#issuecomment-707875732
|
||||
local-storage: {
|
||||
set-local-storage: {
|
||||
"rustdoc-preferred-light-theme": null,
|
||||
"rustdoc-preferred-dark-theme": null,
|
||||
"rustdoc-use-system-theme": null,
|
||||
"rustdoc-theme": "ayu"
|
||||
}
|
||||
goto: "file://" + |DOC_PATH| + "/test_docs/index.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
|
||||
click: "#settings-menu"
|
||||
wait-for: "#theme-system-preference"
|
||||
assert: "#theme-system-preference:checked"
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Ensures that the theme is working when going back in history.
|
||||
goto: "file://" + |DOC_PATH| + "/test_docs/index.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
|
||||
// Set the theme to dark.
|
||||
local-storage: {
|
||||
set-local-storage: {
|
||||
"rustdoc-theme": "dark",
|
||||
"rustdoc-use-system-theme": "false",
|
||||
}
|
||||
@ -11,7 +11,7 @@ assert-css: ("body", { "background-color": "rgb(53, 53, 53)" })
|
||||
assert-local-storage: { "rustdoc-theme": "dark" }
|
||||
|
||||
// Now we go to the settings page.
|
||||
goto: "file://" + |DOC_PATH| + "/settings.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/settings.html"
|
||||
wait-for: "#settings"
|
||||
// We change the theme to "light".
|
||||
click: "#theme-light"
|
||||
|
@ -1,6 +1,6 @@
|
||||
// This test ensures that clicking on a method summary, but not on the "[-]",
|
||||
// doesn't toggle the <details>.
|
||||
goto: "file://" + |DOC_PATH| + "/lib2/struct.Foo.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/lib2/struct.Foo.html"
|
||||
assert-attribute: (".impl-items .toggle", {"open": ""})
|
||||
click: "h4.code-header" // This is the position of "pub" in "pub fn a_method"
|
||||
assert-attribute: (".impl-items .toggle", {"open": ""})
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Checks that the documentation toggles on mobile have the correct position, style and work
|
||||
// as expected.
|
||||
goto: "file://" + |DOC_PATH| + "/test_docs/struct.Foo.html"
|
||||
size: (433, 600)
|
||||
go-to: "file://" + |DOC_PATH| + "/test_docs/struct.Foo.html"
|
||||
set-window-size: (433, 600)
|
||||
assert-attribute: (".top-doc", {"open": ""})
|
||||
click: (4, 270) // This is the position of the top doc comment toggle
|
||||
assert-attribute-false: (".top-doc", {"open": ""})
|
||||
@ -22,7 +22,7 @@ assert-position: (
|
||||
)
|
||||
|
||||
// Now we do the same but with a little bigger width
|
||||
size: (600, 600)
|
||||
set-window-size: (600, 600)
|
||||
assert-attribute: (".top-doc", {"open": ""})
|
||||
click: (4, 270) // New Y position since all search elements are back on one line.
|
||||
assert-attribute-false: (".top-doc", {"open": ""})
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Checks that the documentation toggles have the correct position, style and work as expected.
|
||||
goto: "file://" + |DOC_PATH| + "/test_docs/index.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
|
||||
assert-attribute: ("#main-content > details.top-doc", {"open": ""})
|
||||
assert-text: ("#toggle-all-docs", "[−]")
|
||||
click: "#toggle-all-docs"
|
||||
@ -17,7 +17,7 @@ wait-for-attribute: ("#main-content > details.top-doc", {"open": ""})
|
||||
assert-text: ("#toggle-all-docs", "[−]")
|
||||
|
||||
// Check that it works on non-module pages as well.
|
||||
goto: "file://" + |DOC_PATH| + "/test_docs/struct.Foo.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/test_docs/struct.Foo.html"
|
||||
// We first check that everything is visible.
|
||||
assert-text: ("#toggle-all-docs", "[−]")
|
||||
assert-attribute: ("#implementations-list details.toggle", {"open": ""}, ALL)
|
||||
@ -52,7 +52,7 @@ define-function: (
|
||||
(theme, filter),
|
||||
block {
|
||||
// Setting the theme.
|
||||
local-storage: {"rustdoc-theme": |theme|, "rustdoc-use-system-theme": "false"}
|
||||
set-local-storage: {"rustdoc-theme": |theme|, "rustdoc-use-system-theme": "false"}
|
||||
// We reload the page so the local storage settings are being used.
|
||||
reload:
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
// This test ensures that the implementors toggle are not open by default.
|
||||
goto: "file://" + |DOC_PATH| + "/implementors/trait.Whatever.html"
|
||||
go-to: "file://" + |DOC_PATH| + "/implementors/trait.Whatever.html"
|
||||
|
||||
assert-attribute-false: ("#implementors-list > details", {"open": ""}, ALL)
|
||||
|
@ -1,5 +1,5 @@
|
||||
// This tests that the "implementations" section on struct/enum pages
|
||||
// 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"
|
||||
go-to: "file://" + |DOC_PATH| + "/test_docs/struct.Foo.html"
|
||||
assert-attribute: (".toggle.implementors-toggle", {"open": ""})
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user