Skip to content

Commit 31b39be

Browse files
Fix tidy issues in goml scripts
1 parent 65fae26 commit 31b39be

7 files changed

+34
-14
lines changed

src/test/rustdoc-gui/escape-key.goml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ goto: "file://" + |DOC_PATH| + "/test_docs/index.html"
55
write: (".search-input", "test")
66
// To be SURE that the search will be run.
77
press-key: 'Enter'
8-
wait-for: "#search h1" // The search element is empty before the first search
8+
wait-for: "#search h1" // The search element is empty before the first search
99
// Check that the currently displayed element is search.
1010
wait-for: "#alternative-display #search"
1111
assert-attribute: ("#main-content", {"class": "content hidden"})

src/test/rustdoc-gui/impl-doc.goml

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ goto: "file://" + |DOC_PATH| + "/test_docs/struct.TypeWithImplDoc.html"
33

44
// The text is about 24px tall, so if there's a margin, then their position will be >24px apart
55
compare-elements-position-near-false: (
6-
"#implementations-list > .implementors-toggle > .docblock > p",
7-
"#implementations-list > .implementors-toggle > .impl-items",
8-
{"y": 24}
6+
"#implementations-list > .implementors-toggle > .docblock > p",
7+
"#implementations-list > .implementors-toggle > .impl-items",
8+
{"y": 24}
99
)

src/test/rustdoc-gui/mobile.goml

+5-1
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,8 @@ assert-css-false: (".content .out-of-band .since::before", { "content": "\"Since
2727
goto: "file://" + |DOC_PATH| + "/settings.html"
2828
size: (400, 600)
2929
// Ignored for now https://github.com/rust-lang/rust/issues/93784.
30-
// compare-elements-position-near-false: ("#preferred-light-theme .setting-name", "#preferred-light-theme .choice", {"y": 16})
30+
// compare-elements-position-near-false: (
31+
// "#preferred-light-theme .setting-name",
32+
// "#preferred-light-theme .choice",
33+
// {"y": 16},
34+
// )

src/test/rustdoc-gui/rust-logo.goml

+18-3
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,28 @@ define-function: (
3131

3232
call-function: (
3333
"check-logo",
34-
("ayu", "drop-shadow(rgb(255, 255, 255) 1px 0px 0px) drop-shadow(rgb(255, 255, 255) 0px 1px 0px) drop-shadow(rgb(255, 255, 255) -1px 0px 0px) drop-shadow(rgb(255, 255, 255) 0px -1px 0px)"),
34+
{
35+
"theme": "ayu",
36+
"filter": "drop-shadow(rgb(255, 255, 255) 1px 0px 0px) " +
37+
"drop-shadow(rgb(255, 255, 255) 0px 1px 0px) " +
38+
"drop-shadow(rgb(255, 255, 255) -1px 0px 0px) " +
39+
"drop-shadow(rgb(255, 255, 255) 0px -1px 0px)",
40+
},
3541
)
3642
call-function: (
3743
"check-logo",
38-
("dark", "drop-shadow(rgb(255, 255, 255) 1px 0px 0px) drop-shadow(rgb(255, 255, 255) 0px 1px 0px) drop-shadow(rgb(255, 255, 255) -1px 0px 0px) drop-shadow(rgb(255, 255, 255) 0px -1px 0px)"),
44+
{
45+
"theme": "dark",
46+
"filter": "drop-shadow(rgb(255, 255, 255) 1px 0px 0px) " +
47+
"drop-shadow(rgb(255, 255, 255) 0px 1px 0px) " +
48+
"drop-shadow(rgb(255, 255, 255) -1px 0px 0px) " +
49+
"drop-shadow(rgb(255, 255, 255) 0px -1px 0px)",
50+
},
3951
)
4052
call-function: (
4153
"check-logo",
42-
("light", "none"),
54+
{
55+
"theme": "light",
56+
"filter": "none",
57+
},
4358
)

src/test/rustdoc-gui/scrape-examples-button-focus.goml

+5-5
Original file line numberDiff line numberDiff line change
@@ -5,25 +5,25 @@ store-property: (initialScrollTop, ".scraped-example-list > .scraped-example pre
55
focus: ".scraped-example-list > .scraped-example .next"
66
press-key: "Enter"
77
assert-property-false: (".scraped-example-list > .scraped-example pre", {
8-
"scrollTop": |initialScrollTop|
8+
"scrollTop": |initialScrollTop|
99
})
1010
focus: ".scraped-example-list > .scraped-example .prev"
1111
press-key: "Enter"
1212
assert-property: (".scraped-example-list > .scraped-example pre", {
13-
"scrollTop": |initialScrollTop|
13+
"scrollTop": |initialScrollTop|
1414
})
1515

1616
// The expand button increases the scrollHeight of the minimized code viewport
1717
store-property: (smallOffsetHeight, ".scraped-example-list > .scraped-example pre", "offsetHeight")
1818
assert-property-false: (".scraped-example-list > .scraped-example pre", {
19-
"scrollHeight": |smallOffsetHeight|
19+
"scrollHeight": |smallOffsetHeight|
2020
})
2121
focus: ".scraped-example-list > .scraped-example .expand"
2222
press-key: "Enter"
2323
assert-property-false: (".scraped-example-list > .scraped-example pre", {
24-
"offsetHeight": |smallOffsetHeight|
24+
"offsetHeight": |smallOffsetHeight|
2525
})
2626
store-property: (fullOffsetHeight, ".scraped-example-list > .scraped-example pre", "offsetHeight")
2727
assert-property: (".scraped-example-list > .scraped-example pre", {
28-
"scrollHeight": |fullOffsetHeight|
28+
"scrollHeight": |fullOffsetHeight|
2929
})

src/test/rustdoc-gui/sidebar.goml

+1-1
Original file line numberDiff line numberDiff line change
@@ -148,4 +148,4 @@ assert-text: ("#toggle-all-docs", "[+]")
148148
assert-property: (".sidebar", {"clientWidth": "200"})
149149
click: "#toggle-all-docs"
150150
assert-text: ("#toggle-all-docs", "[−]")
151-
assert-property: (".sidebar", {"clientWidth": "200"})
151+
assert-property: (".sidebar", {"clientWidth": "200"})

src/test/rustdoc-gui/type-declation-overflow.goml

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// ignore-tidy-linelength
12
// This test ensures that the items declaration content overflow is handled inside the <pre> directly.
23

34
// We need to disable this check because

0 commit comments

Comments
 (0)