Skip to content

Commit 72010e5

Browse files
authored
Rollup merge of #130983 - GuillaumeGomez:wait-for-false, r=notriddle
Update `browser-ui-test` version and make use of `wait-for*-false` commands I added `wait-for*-false` commands, making possible these changes. r? `@notriddle`
2 parents 7642d8f + 2f16ff7 commit 72010e5

File tree

2 files changed

+7
-13
lines changed

2 files changed

+7
-13
lines changed
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.18.0
1+
0.18.1

tests/rustdoc-gui/docblock-code-block-line-number.goml

+6-12
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,7 @@ assert-css: ("#settings", {"display": "block"})
8787

8888
// Then, click the toggle button.
8989
click: "input#line-numbers"
90-
wait-for: 100 // FIXME: `wait-for-false` does not exist
91-
assert-false: "pre.example-line-numbers"
90+
wait-for-false: "pre.example-line-numbers"
9291
assert-local-storage: {"rustdoc-line-numbers": "false" }
9392

9493
// Check that the rounded corners are back.
@@ -107,8 +106,7 @@ assert-css: (
107106
click: "input#line-numbers"
108107
wait-for: "pre.example-line-numbers"
109108
assert-local-storage: {"rustdoc-line-numbers": "true" }
110-
wait-for: 100 // FIXME: `wait-for-false` does not exist
111-
assert: "pre.example-line-numbers"
109+
wait-for: "pre.example-line-numbers"
112110

113111
// Same check with scraped examples line numbers.
114112
go-to: "file://" + |DOC_PATH| + "/scrape_examples/fn.test_many.html"
@@ -195,15 +193,13 @@ define-function: ("check-line-numbers-existence", [], block {
195193

196194
// Then, click the toggle button.
197195
click: "input#line-numbers"
198-
wait-for: 100 // FIXME: `wait-for-false` does not exist
199-
assert-local-storage-false: {"rustdoc-line-numbers": "true" }
196+
wait-for-local-storage-false: {"rustdoc-line-numbers": "true" }
200197
assert-false: ".example-line-numbers"
201198
// Line numbers should still be there.
202199
assert: ".src-line-numbers"
203200
// Now disabling the setting.
204201
click: "input#line-numbers"
205-
wait-for: 100 // FIXME: `wait-for-false` does not exist
206-
assert-local-storage: {"rustdoc-line-numbers": "true" }
202+
wait-for-local-storage: {"rustdoc-line-numbers": "true" }
207203
assert-false: ".example-line-numbers"
208204
// Line numbers should still be there.
209205
assert: ".src-line-numbers"
@@ -246,12 +242,10 @@ wait-for: "#settings"
246242

247243
// Then, click the toggle button.
248244
click: "input#line-numbers"
249-
wait-for: 100 // FIXME: `wait-for-false` does not exist
245+
wait-for-count: (".example-wrap > pre.example-line-numbers", 0)
250246
assert-local-storage-false: {"rustdoc-line-numbers": "true" }
251-
assert-count: (".example-wrap > pre.example-line-numbers", 0)
252247

253248
// Now turning off the setting.
254249
click: "input#line-numbers"
255-
wait-for: 100 // FIXME: `wait-for-false` does not exist
250+
wait-for-count: (".example-wrap > pre.example-line-numbers", 2)
256251
assert-local-storage: {"rustdoc-line-numbers": "true" }
257-
assert-count: (".example-wrap > pre.example-line-numbers", 2)

0 commit comments

Comments
 (0)