Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 0a18a7e

Browse files
Update GUI tests
1 parent 3da78a3 commit 0a18a7e

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

‎tests/rustdoc-gui/anchor-navigable.goml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ 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"})
11-
assert-css: (".impl > a.anchor", {"left": "-8px"})
11+
assert-css: (".impl > a.anchor", {"left": "16px"})

‎tests/rustdoc-gui/deref-block.goml‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ go-to: "file://" + |DOC_PATH| + "/lib2/struct.Derefer.html"
44
assert-text: (".big-toggle summary", "Methods from Deref<Target = str>§")
55
// We ensure it doesn't go over `§`.
66
assert-css: (".big-toggle summary::before", {
7-
"left": "-34px",
7+
"left": "-4px",
88
"top": "9px",
99
})
1010
// It should NOT have the same X or Y position as the other toggles.
@@ -17,13 +17,13 @@ compare-elements-position-false: (
1717
// We now check that if we're in mobile mode, it gets back to its original X position.
1818
set-window-size: (600, 600)
1919
assert-css: (".big-toggle summary::before", {
20-
"left": "-11px",
20+
"left": "-4px",
2121
"top": "9px",
2222
})
2323
// It should have a slightly different X position as the other toggles.
2424
store-position: (".big-toggle summary::before", {"x": big_toggle})
2525
store-position: (".method-toggle summary::before", {"x": small_toggle})
26-
assert: |big_toggle| < |small_toggle|
26+
assert: |big_toggle| > |small_toggle|
2727
// Margin is 0.5em so around 8 px.
2828
assert: |small_toggle| - |big_toggle| < 10
2929
// But still shouldn't have the same Y position.

‎tests/rustdoc-gui/toggle-docs-mobile.goml‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ assert-attribute: (".top-doc", {"open": ""})
1414
// Assert the position of the toggle on the top doc block.
1515
assert-position: (".top-doc summary::before", {"x": 4})
1616
// Assert the position of the toggle on the impl block.
17-
assert-position: ("#implementations-list > details > summary::before", {"x": 4})
17+
assert-position: ("#implementations-list > details > summary::before", {"x": 11})
1818
// Assert the position of the toggle on a method.
1919
assert-position: (
2020
"#trait-implementations-list .impl-items .method-toggle > summary::before",
@@ -24,10 +24,10 @@ assert-position: (
2424
// Now we do the same but with a little bigger width
2525
set-window-size: (600, 600)
2626
assert-attribute: (".top-doc", {"open": ""})
27-
click: (4, 270) // New Y position since all search elements are back on one line.
27+
click: (30, 270) // New Y position since all search elements are back on one line.
2828
assert-attribute-false: (".top-doc", {"open": ""})
29-
click: (4, 270)
29+
click: (30, 270)
3030
assert-attribute: (".top-doc", {"open": ""})
3131
// To ensure that the toggle isn't over the text, we check that the toggle isn't clicked.
32-
click: (3, 270)
32+
click: (31, 270)
3333
assert-attribute: (".top-doc", {"open": ""})

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /