Skip to content

Commit e7271f4

Browse files
committed
Auto merge of rust-lang#110194 - GuillaumeGomez:update-browser-ui-test, r=notriddle
Update browser-ui-test version This update add the support for expressions, so we can now do this: ``` assert: 1 > 2 && ["a"] != ["b", "c"] ``` It also improved commands naming and updated puppeteer version. r? `@notriddle`
2 parents 9df3a39 + 010fa00 commit e7271f4

File tree

105 files changed

+309
-309
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

105 files changed

+309
-309
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.14.6
1+
0.15.0

tests/rustdoc-gui/anchor-navigable.goml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// anchor and the `impl Foo`. If there were a gap, this would cause an annoying
55
// problem: you hover `impl Foo` to see the anchor, then when you move your
66
// mouse to the left, the anchor disappears before you reach it.
7-
goto: "file://" + |DOC_PATH| + "/test_docs/struct.Foo.html"
7+
go-to: "file://" + |DOC_PATH| + "/test_docs/struct.Foo.html"
88
// We check that ".item-info" is bigger than its content.
99
move-cursor-to: ".impl"
1010
assert-property: (".impl > a.anchor", {"offsetWidth": "8"})

tests/rustdoc-gui/anchors.goml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ define-function: (
44
"check-colors",
55
(theme, main_color, title_color, main_heading_color, main_heading_type_color, src_link_color, sidebar_link_color),
66
block {
7-
goto: "file://" + |DOC_PATH| + "/staged_api/struct.Foo.html"
7+
go-to: "file://" + |DOC_PATH| + "/staged_api/struct.Foo.html"
88
// This is needed to ensure that the text color is computed.
99
show-text: true
1010

1111
// Setting the theme.
12-
local-storage: {"rustdoc-theme": |theme|, "rustdoc-use-system-theme": "false"}
12+
set-local-storage: {"rustdoc-theme": |theme|, "rustdoc-use-system-theme": "false"}
1313
// We reload the page so the local storage settings are being used.
1414
reload:
1515

@@ -48,9 +48,9 @@ define-function: (
4848
{"color": |src_link_color|, "text-decoration": "none solid " + |src_link_color|},
4949
)
5050

51-
goto: "file://" + |DOC_PATH| + "/test_docs/struct.HeavilyDocumentedStruct.html"
51+
go-to: "file://" + |DOC_PATH| + "/test_docs/struct.HeavilyDocumentedStruct.html"
5252
// Since we changed page, we need to set the theme again.
53-
local-storage: {"rustdoc-theme": |theme|, "rustdoc-use-system-theme": "false"}
53+
set-local-storage: {"rustdoc-theme": |theme|, "rustdoc-use-system-theme": "false"}
5454
// We reload the page so the local storage settings are being used.
5555
reload:
5656

tests/rustdoc-gui/basic-code.goml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Small test to ensure the "src-line-numbers" element is only present once on
22
// the page.
3-
goto: "file://" + |DOC_PATH| + "/test_docs/index.html"
3+
go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
44
click: ".srclink"
55
wait-for: ".src-line-numbers"
66
assert-count: (".src-line-numbers", 1)

tests/rustdoc-gui/check-code-blocks-margin.goml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// This test ensures that the docblock elements have the appropriate left margin.
2-
goto: "file://" + |DOC_PATH| + "/test_docs/fn.foo.html"
2+
go-to: "file://" + |DOC_PATH| + "/test_docs/fn.foo.html"
33
// The top docblock elements shouldn't have left margin...
44
assert-css: ("#main-content .item-decl", {"margin-left": "0px"})
55
// ... but all the others should!

tests/rustdoc-gui/check-stab-in-docblock.goml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
// This test checks that using `.stab` attributes in `.docblock` elements doesn't
22
// create scrollable paragraphs.
3-
goto: "file://" + |DOC_PATH| + "/test_docs/index.html"
3+
go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
44
// Needs the text to be display to check for scrollable content.
55
show-text: true
6-
size: (786, 600)
6+
set-window-size: (786, 600)
77
// Confirms that there 3 paragraphs.
88
assert-count: (".top-doc .docblock p", 3)
99
// Checking that there is no scrollable content.

tests/rustdoc-gui/check_info_sign_position.goml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// This test checks the position of the information on the code blocks (like
22
// `compile_fail` or `ignore`).
3-
goto: "file://" + |DOC_PATH| + "/test_docs/index.html"
4-
goto: "./fn.check_list_code_block.html"
3+
go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
4+
go-to: "./fn.check_list_code_block.html"
55
// If the codeblock is the first element of the docblock, the information tooltip must have
66
// have some top margin to avoid going over the toggle (the "[+]").
77
assert-css: (".docblock > .example-wrap.compile_fail .tooltip", { "margin-top": "16px" })

tests/rustdoc-gui/code-blocks-overflow.goml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// This test ensures that codeblocks content don't overflow.
2-
goto: "file://" + |DOC_PATH| + "/lib2/sub_mod/struct.Foo.html"
3-
size: (1080, 600)
2+
go-to: "file://" + |DOC_PATH| + "/lib2/sub_mod/struct.Foo.html"
3+
set-window-size: (1080, 600)
44
// There should be two codeblocks: a rust one and a non-rust one.
55
assert-count: (".docblock > .example-wrap", 2)
66
assert: ".docblock > .example-wrap > .language-txt"

tests/rustdoc-gui/code-color.goml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// check that the rule isn't applied on other "<code>" elements.
33
//
44
// While we're at it, we also check it for the other themes.
5-
goto: "file://" + |DOC_PATH| + "/test_docs/fn.foo.html"
5+
go-to: "file://" + |DOC_PATH| + "/test_docs/fn.foo.html"
66
// If the text isn't displayed, the browser doesn't compute color style correctly...
77
show-text: true
88

@@ -11,7 +11,7 @@ define-function: (
1111
(theme, doc_code_color, doc_inline_code_color),
1212
block {
1313
// Set the theme.
14-
local-storage: {"rustdoc-theme": |theme|, "rustdoc-use-system-theme": "false"}
14+
set-local-storage: {"rustdoc-theme": |theme|, "rustdoc-use-system-theme": "false"}
1515
// We reload the page so the local storage settings are being used.
1616
reload:
1717
assert-css: (".docblock pre > code", {"color": |doc_code_color|}, ALL)
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// This test checks that the source code pages sidebar toggle is working as expected.
2-
goto: "file://" + |DOC_PATH| + "/test_docs/index.html"
2+
go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
33
click: ".srclink"
44
wait-for: "#src-sidebar-toggle"
55
click: "#src-sidebar-toggle"
6-
fail: true
6+
expect-failure: true
77
assert-css: ("#source-sidebar", { "left": "-300px" })

0 commit comments

Comments
 (0)