Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit c1a88b9

Browse files
committedDec 8, 2024
Fix test cases and hide-sidebar mode
1 parent a02218b commit c1a88b9

Some content is hidden

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

54 files changed

+262
-215
lines changed
 
1.81 MB
Loading

‎tests/rustdoc-gui/notable-trait.goml

+13-13
Original file line numberDiff line numberDiff line change
@@ -82,15 +82,6 @@ call-function: ("check-notable-tooltip-position", {
8282
"i_x": 528,
8383
})
8484

85-
// Checking on mobile now.
86-
set-window-size: (650, 600)
87-
wait-for-size: ("body", {"width": 650})
88-
call-function: ("check-notable-tooltip-position-complete", {
89-
"x": 26,
90-
"i_x": 305,
91-
"popover_x": 0,
92-
})
93-
9485
// Now check the colors.
9586
define-function: (
9687
"check-colors",
@@ -176,6 +167,15 @@ call-function: (
176167
},
177168
)
178169

170+
// Checking on mobile now.
171+
set-window-size: (650, 600)
172+
wait-for-size: ("body", {"width": 650})
173+
call-function: ("check-notable-tooltip-position-complete", {
174+
"x": 26,
175+
"i_x": 305,
176+
"popover_x": 0,
177+
})
178+
179179
reload:
180180

181181
// Check that pressing escape works
@@ -189,7 +189,7 @@ assert: "#method\.create_an_iterator_from_read .tooltip:focus"
189189
// Check that clicking outside works.
190190
click: "//*[@id='method.create_an_iterator_from_read']//*[@class='tooltip']"
191191
assert-count: ("//*[@class='tooltip popover']", 1)
192-
click: ".search-input"
192+
click: ".main-heading h1"
193193
assert-count: ("//*[@class='tooltip popover']", 0)
194194
assert-false: "#method\.create_an_iterator_from_read .tooltip:focus"
195195

@@ -219,14 +219,14 @@ define-function: (
219219
store-window-property: {"scrollY": scroll}
220220
click: "//*[@id='method.create_an_iterator_from_read']//*[@class='tooltip']"
221221
wait-for: "//*[@class='tooltip popover']"
222-
click: "#settings-menu a"
222+
click: ".main-heading h1"
223223
}
224224
)
225225

226226
// Now we check that the focus isn't given back to the wrong item when opening
227227
// another popover.
228228
call-function: ("setup-popup", {})
229-
click: ".search-input"
229+
click: ".main-heading h1"
230230
// We ensure we didn't come back to the previous focused item.
231231
assert-window-property-false: {"scrollY": |scroll|}
232232

@@ -255,7 +255,7 @@ reload:
255255
assert-count: ("//*[@class='tooltip popover']", 0)
256256
click: "//*[@id='method.create_an_iterator_from_read']//*[@class='tooltip']"
257257
assert-count: ("//*[@class='tooltip popover']", 1)
258-
click: "#settings-menu a"
258+
click: "rustdoc-toolbar .settings-menu a"
259259
wait-for: "#settings"
260260
assert-count: ("//*[@class='tooltip popover']", 0)
261261
assert-false: "#method\.create_an_iterator_from_read .tooltip:focus"
There was a problem loading the remainder of the diff.

0 commit comments

Comments
 (0)
Failed to load comments.