Skip to content

Commit

Permalink
Auto merge of #130983 - GuillaumeGomez:wait-for-false, r=notriddle
Browse files Browse the repository at this point in the history
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`
  • Loading branch information
bors committed Sep 29, 2024
2 parents 9903b25 + 2f16ff7 commit 329e7b4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 13 deletions.
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.18.0
0.18.1
18 changes: 6 additions & 12 deletions tests/rustdoc-gui/docblock-code-block-line-number.goml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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"
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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)

0 comments on commit 329e7b4

Please sign in to comment.