Skip to content

Commit db376ee

Browse files
committed
rustdoc: update test case now that the UI animation is removed
1 parent 6d02a4d commit db376ee

File tree

1 file changed

+8
-11
lines changed

1 file changed

+8
-11
lines changed

src/test/rustdoc-gui/sidebar-source-code-display.goml

+8-11
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,17 @@ javascript: false
33
goto: file://|DOC_PATH|/src/test_docs/lib.rs.html
44
// Since the javascript is disabled, there shouldn't be a toggle.
55
assert-false: "#sidebar-toggle"
6-
// For some reason, we need to wait a bit here because it seems like the transition on opacity
7-
// is being applied whereas it can't be reproduced in a browser...
8-
wait-for-css: (".sidebar > *", {"visibility": "hidden", "opacity": 0})
6+
wait-for-css: (".sidebar > *", {"visibility": "hidden"})
97

108
// Let's retry with javascript enabled.
119
javascript: true
1210
reload:
1311
wait-for: "#sidebar-toggle"
14-
assert-css: ("#sidebar-toggle", {"visibility": "visible", "opacity": 1})
15-
assert-css: (".sidebar > *:not(#sidebar-toggle)", {"visibility": "hidden", "opacity": 0})
12+
assert-css: ("#sidebar-toggle", {"visibility": "visible"})
13+
assert-css: (".sidebar > *:not(#sidebar-toggle)", {"visibility": "hidden"})
1614
// Let's expand the sidebar now.
1715
click: "#sidebar-toggle"
18-
// Because of the transition CSS, we check by using `wait-for-css` instead of `assert-css`.
19-
wait-for-css: ("#sidebar-toggle", {"visibility": "visible", "opacity": 1})
16+
wait-for-css: ("#sidebar-toggle", {"visibility": "visible"})
2017

2118
// We now check that opening the sidebar and clicking a link will leave it open.
2219
// The behavior here on desktop is different than the behavior on mobile,
@@ -36,7 +33,7 @@ show-text: true
3633
local-storage: {"rustdoc-theme": "light", "rustdoc-use-system-theme": "false"}
3734
reload:
3835
// Waiting for the sidebar to be displayed...
39-
wait-for-css: ("#sidebar-toggle", {"visibility": "visible", "opacity": 1})
36+
wait-for-css: ("#sidebar-toggle", {"visibility": "visible"})
4037
assert-css: (
4138
"#source-sidebar details[open] > .files a.selected",
4239
{"color": "rgb(0, 0, 0)", "background-color": "rgb(255, 255, 255)"},
@@ -91,7 +88,7 @@ assert-css: (
9188
local-storage: {"rustdoc-theme": "dark", "rustdoc-use-system-theme": "false"}
9289
reload:
9390
// Waiting for the sidebar to be displayed...
94-
wait-for-css: ("#sidebar-toggle", {"visibility": "visible", "opacity": 1})
91+
wait-for-css: ("#sidebar-toggle", {"visibility": "visible"})
9592
assert-css: (
9693
"#source-sidebar details[open] > .files > a.selected",
9794
{"color": "rgb(221, 221, 221)", "background-color": "rgb(51, 51, 51)"},
@@ -146,7 +143,7 @@ assert-css: (
146143
local-storage: {"rustdoc-theme": "ayu", "rustdoc-use-system-theme": "false"}
147144
reload:
148145
// Waiting for the sidebar to be displayed...
149-
wait-for-css: ("#sidebar-toggle", {"visibility": "visible", "opacity": 1})
146+
wait-for-css: ("#sidebar-toggle", {"visibility": "visible"})
150147
assert-css: (
151148
"#source-sidebar details[open] > .files a.selected",
152149
{"color": "rgb(255, 180, 76)", "background-color": "rgb(20, 25, 31)"},
@@ -201,7 +198,7 @@ assert-css: (
201198
size: (500, 700)
202199
reload:
203200
// Waiting for the sidebar to be displayed...
204-
wait-for-css: ("#sidebar-toggle", {"visibility": "visible", "opacity": 1})
201+
wait-for-css: ("#sidebar-toggle", {"visibility": "visible"})
205202

206203
// We now check it takes the full size of the display.
207204
assert-property: ("body", {"clientWidth": "500", "clientHeight": "700"})

0 commit comments

Comments
 (0)