Move rustdoc-gui rust libraries into their own folder and prepare the field for more libraries
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
goto: file://|DOC_PATH|/index.html
|
||||
goto: file://|DOC_PATH|/test_docs/index.html
|
||||
click: ".srclink"
|
||||
assert: (".line-numbers", 1)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
goto: file://|DOC_PATH|/index.html
|
||||
goto: file://|DOC_PATH|/test_docs/index.html
|
||||
assert: ("#functions")
|
||||
goto: ./struct.Foo.html
|
||||
assert: ("div.type-decl")
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
goto: file://|DOC_PATH|/index.html
|
||||
goto: file://|DOC_PATH|/test_docs/index.html
|
||||
goto: ./fn.check_list_code_block.html
|
||||
// If the codeblock is the first element of the docblock, the information tooltip must have
|
||||
// have some top margin to avoid going over the toggle (the "[+]").
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
goto: file://|DOC_PATH|/index.html
|
||||
goto: file://|DOC_PATH|/test_docs/index.html
|
||||
click: ".srclink"
|
||||
click: "#sidebar-toggle"
|
||||
wait-for: 500
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// This test ensures that the element corresponding to the hash is displayed.
|
||||
goto: file://|DOC_PATH|/struct.Foo.html#method.borrow
|
||||
goto: file://|DOC_PATH|/test_docs/struct.Foo.html#method.borrow
|
||||
// In the blanket implementations list, "Borrow" is the second one, hence the ":nth(2)".
|
||||
assert: ("#blanket-implementations-list > details:nth-child(2)", "open", "")
|
||||
// Please note the "\" below is needed because otherwise ".borrow" would be interpreted as
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
// This test ensures that the impl blocks are open by default.
|
||||
goto: file://|DOC_PATH|/struct.Foo.html
|
||||
goto: file://|DOC_PATH|/test_docs/struct.Foo.html
|
||||
assert: ("#main > details.implementors-toggle", "open", "")
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
goto: file://|DOC_PATH|/index.html
|
||||
goto: file://|DOC_PATH|/test_docs/index.html
|
||||
goto: ./fn.check_list_code_block.html
|
||||
assert: ("pre.rust.fn")
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// 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|/index.html
|
||||
goto: file://|DOC_PATH|/test_docs/index.html
|
||||
size: (463, 700)
|
||||
// We first check that the search input isn't already focused.
|
||||
assert-false: ("input.search-input:focus")
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
goto: file://|DOC_PATH|/index.html
|
||||
goto: file://|DOC_PATH|/test_docs/index.html
|
||||
write: (".search-input", "Foo")
|
||||
// Waiting for the search results to appear...
|
||||
wait-for: "#titles"
|
||||
assert: ("#titles > button:nth-of-type(1)", "class", "selected")
|
||||
|
||||
// To go back to the original "state"
|
||||
goto: file://|DOC_PATH|/index.html
|
||||
goto: file://|DOC_PATH|/test_docs/index.html
|
||||
write: (".search-input", "-> String")
|
||||
// Waiting for the search results to appear...
|
||||
wait-for: "#titles"
|
||||
@@ -13,7 +13,7 @@ wait-for: "#titles"
|
||||
assert: ("#titles > button:nth-of-type(3)", "class", "selected")
|
||||
|
||||
// To go back to the original "state"
|
||||
goto: file://|DOC_PATH|/index.html
|
||||
goto: file://|DOC_PATH|/test_docs/index.html
|
||||
write: (".search-input", "-> Something")
|
||||
// Waiting for the search results to appear...
|
||||
wait-for: "#titles"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Check that the various shortcuts are working.
|
||||
goto: file://|DOC_PATH|/index.html
|
||||
goto: file://|DOC_PATH|/test_docs/index.html
|
||||
// We first check that the search input isn't already focused.
|
||||
assert-false: "input.search-input:focus"
|
||||
press-key: "s"
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
goto: file://|DOC_PATH|/../src/test_docs/lib.rs.html
|
||||
goto: file://|DOC_PATH|/src/test_docs/lib.rs.html
|
||||
// Check that we can click on the line number.
|
||||
click: (40, 224) // This is the position of the span for line 4.
|
||||
// Unfortunately, "#4" isn't a valid query selector, so we have to go around that limitation
|
||||
// by instead getting the nth span.
|
||||
assert: (".line-numbers > span:nth-child(4)", "class", "line-highlighted")
|
||||
// We now check that the good spans are highlighted
|
||||
goto: file://|DOC_PATH|/../src/test_docs/lib.rs.html#4-6
|
||||
goto: file://|DOC_PATH|/src/test_docs/lib.rs.html#4-6
|
||||
assert-false: (".line-numbers > span:nth-child(3)", "class", "line-highlighted")
|
||||
assert: (".line-numbers > span:nth-child(4)", "class", "line-highlighted")
|
||||
assert: (".line-numbers > span:nth-child(5)", "class", "line-highlighted")
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
goto: file://|DOC_PATH|/index.html
|
||||
goto: file://|DOC_PATH|/test_docs/index.html
|
||||
click: "#theme-picker"
|
||||
click: "#theme-choices > button:first-child"
|
||||
wait-for: 500
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
goto: file://|DOC_PATH|/index.html
|
||||
goto: file://|DOC_PATH|/test_docs/index.html
|
||||
click: "#toggle-all-docs"
|
||||
wait-for: 5000
|
||||
assert: ("#main > div.docblock.hidden-by-usual-hider")
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
goto: file://|DOC_PATH|/trait.AnotherOne.html
|
||||
goto: file://|DOC_PATH|/test_docs/trait.AnotherOne.html
|
||||
assert: (".sidebar-links a:nth-of-type(1)", "another")
|
||||
assert: (".sidebar-links a:nth-of-type(2)", "func1")
|
||||
assert: (".sidebar-links a:nth-of-type(3)", "func2")
|
||||
|
||||
Reference in New Issue
Block a user