Skip to content

Commit 7cf9117

Browse files
Strengthen GUI tests
1 parent de6cba1 commit 7cf9117

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

gui-tests/sidebar.goml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ assert-position: (".rustdoc .sidebar", {"y": |topbar_height|, "x": 0})
99

1010
// We check the same in "mobile mode".
1111
set-window-size: (600, 1000)
12+
wait-for-css-false: (".rustdoc .mobile-topbar", {"display": "none"})
1213
assert-position: (".rustdoc .mobile-topbar", {"y": |topbar_height|, "x": 0})
1314
// We check when the sidebar is shown now.
1415
click: ".rustdoc .mobile-topbar .sidebar-menu-toggle"
@@ -27,8 +28,8 @@ set-window-size: (1000, 1000)
2728
wait-for: ".main-heading a.src"
2829
click: ".main-heading a.src"
2930

30-
// We wait for the page to load...
31-
wait-for: ".rustdoc.src"
31+
// We wait for the page to load (by waiting for the sidebar to be filled)...
32+
wait-for: "#src-sidebar"
3233
// We check that the sidebar has the correct position.
3334
assert-position: (".rustdoc .sidebar", {"y": |topbar_height|, "x": 0})
3435
// We expand the sidebar.

gui-tests/theme.goml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
// the crate page we control the whole page
77

88
go-to: |DOC_PATH| + "/sysinfo"
9-
set-local-storage: { "rustdoc-theme": null }
9+
set-local-storage: { "rustdoc-theme": "light" }
1010
wait-for-css: (".nav-container", { "background-color": "rgb(255, 255, 255)" })
1111
go-to: |DOC_PATH| + "/crate/sysinfo"
1212
wait-for-css: ("body", { "background-color": "rgb(255, 255, 255)" })

0 commit comments

Comments
 (0)