Skip to content

Commit

Permalink
More properly wait for value
Browse files Browse the repository at this point in the history
  • Loading branch information
cpsievert committed Aug 11, 2023
1 parent fea4a4f commit b9f84b0
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -225,23 +225,23 @@ test_that("Can put input controls in the popover", {
key_press("Tab")
expect_focus(app, 'input#num')
key_press("ArrowUp")
expect_equal(app$wait_for_value(input = "num", ignore = 1), 2)
key_press("ArrowUp")
expect_equal(app$get_value(input = "num"), 3)
expect_equal(app$wait_for_value(input = "num", ignore = 2), 3)
app$click("inc")
app$wait_for_value(input = "num")
expect_equal(app$wait_for_value(input = "num", ignore = 3), 4)
app$click("inc")
app$wait_for_value(input = "num")
expect_equal(app$get_value(input = "num"), 5)
expect_equal(app$wait_for_value(input = "num", ignore = 4), 5)
key_press("ArrowDown")
expect_equal(app$get_value(input = "num"), 4)
expect_equal(app$wait_for_value(input = "num", ignore = 5), 4)
key_press("Escape")
expect_focus(app, "#btn4")
expect_no_tip()
app$click("inc")
app$wait_for_value(input = "num")
expect_equal(app$wait_for_value(input = "num", ignore = 4), 5)
app$click("inc")
app$wait_for_value(input = "num")
expect_equal(app$get_value(input = "num"), 6)
expect_equal(app$wait_for_value(input = "num", ignore = 5), 6)

app$click(selector = "#btn4")
expect_visible_tip(app, "#btn4")
# Even though the tip is visible, it seems it's not always ready to be
Expand Down

0 comments on commit b9f84b0

Please sign in to comment.