@@ -87,8 +87,7 @@ assert-css: ("#settings", {"display": "block"})
87
87
88
88
// Then, click the toggle button.
89
89
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"
92
91
assert-local-storage: {"rustdoc-line-numbers": "false" }
93
92
94
93
// Check that the rounded corners are back.
@@ -107,8 +106,7 @@ assert-css: (
107
106
click: "input#line-numbers"
108
107
wait-for: "pre.example-line-numbers"
109
108
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"
112
110
113
111
// Same check with scraped examples line numbers.
114
112
go-to: "file://" + |DOC_PATH| + "/scrape_examples/fn.test_many.html"
@@ -195,15 +193,13 @@ define-function: ("check-line-numbers-existence", [], block {
195
193
196
194
// Then, click the toggle button.
197
195
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" }
200
197
assert-false: ".example-line-numbers"
201
198
// Line numbers should still be there.
202
199
assert: ".src-line-numbers"
203
200
// Now disabling the setting.
204
201
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" }
207
203
assert-false: ".example-line-numbers"
208
204
// Line numbers should still be there.
209
205
assert: ".src-line-numbers"
@@ -246,12 +242,10 @@ wait-for: "#settings"
246
242
247
243
// Then, click the toggle button.
248
244
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)
250
246
assert-local-storage-false: {"rustdoc-line-numbers": "true" }
251
- assert-count: (".example-wrap > pre.example-line-numbers", 0)
252
247
253
248
// Now turning off the setting.
254
249
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)
256
251
assert-local-storage: {"rustdoc-line-numbers": "true" }
257
- assert-count: (".example-wrap > pre.example-line-numbers", 2)
0 commit comments