Auto 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`
This commit is contained in:
bors 2024-09-29 08:22:20 +00:00
commit 329e7b4d4e
2 changed files with 7 additions and 13 deletions

View File

@ -87,8 +87,7 @@ assert-css: ("#settings", {"display": "block"})
// Then, click the toggle button.
click: "input#line-numbers"
wait-for: 100 // FIXME: `wait-for-false` does not exist
assert-false: "pre.example-line-numbers"
wait-for-false: "pre.example-line-numbers"
assert-local-storage: {"rustdoc-line-numbers": "false" }
// Check that the rounded corners are back.
@ -107,8 +106,7 @@ assert-css: (
click: "input#line-numbers"
wait-for: "pre.example-line-numbers"
assert-local-storage: {"rustdoc-line-numbers": "true" }
wait-for: 100 // FIXME: `wait-for-false` does not exist
assert: "pre.example-line-numbers"
wait-for: "pre.example-line-numbers"
// Same check with scraped examples line numbers.
go-to: "file://" + |DOC_PATH| + "/scrape_examples/fn.test_many.html"
@ -195,15 +193,13 @@ define-function: ("check-line-numbers-existence", [], block {
// Then, click the toggle button.
click: "input#line-numbers"
wait-for: 100 // FIXME: `wait-for-false` does not exist
assert-local-storage-false: {"rustdoc-line-numbers": "true" }
wait-for-local-storage-false: {"rustdoc-line-numbers": "true" }
assert-false: ".example-line-numbers"
// Line numbers should still be there.
assert: ".src-line-numbers"
// Now disabling the setting.
click: "input#line-numbers"
wait-for: 100 // FIXME: `wait-for-false` does not exist
assert-local-storage: {"rustdoc-line-numbers": "true" }
wait-for-local-storage: {"rustdoc-line-numbers": "true" }
assert-false: ".example-line-numbers"
// Line numbers should still be there.
assert: ".src-line-numbers"
@ -246,12 +242,10 @@ wait-for: "#settings"
// Then, click the toggle button.
click: "input#line-numbers"
wait-for: 100 // FIXME: `wait-for-false` does not exist
wait-for-count: (".example-wrap > pre.example-line-numbers", 0)
assert-local-storage-false: {"rustdoc-line-numbers": "true" }
assert-count: (".example-wrap > pre.example-line-numbers", 0)
// Now turning off the setting.
click: "input#line-numbers"
wait-for: 100 // FIXME: `wait-for-false` does not exist
wait-for-count: (".example-wrap > pre.example-line-numbers", 2)
assert-local-storage: {"rustdoc-line-numbers": "true" }
assert-count: (".example-wrap > pre.example-line-numbers", 2)