Skip to content

Commit

Permalink
Make sure wait_for_value()'s ignore type is integer (#242)
Browse files Browse the repository at this point in the history
  • Loading branch information
cpsievert authored Nov 2, 2023
1 parent 89313b7 commit 75b1c56
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -254,24 +254,24 @@ 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)
expect_equal(app$wait_for_value(input = "num", ignore = 1L), 2)
key_press("ArrowUp")
expect_equal(app$wait_for_value(input = "num", ignore = 2), 3)
expect_equal(app$wait_for_value(input = "num", ignore = 2L), 3)
app$click("inc")
expect_equal(app$wait_for_value(input = "num", ignore = 3), 4)
expect_equal(app$wait_for_value(input = "num", ignore = 3L), 4)
app$click("inc")
expect_equal(app$wait_for_value(input = "num", ignore = 4), 5)
expect_equal(app$wait_for_value(input = "num", ignore = 4L), 5)
key_press("ArrowDown")
expect_equal(app$wait_for_value(input = "num", ignore = 5), 4)
expect_equal(app$wait_for_value(input = "num", ignore = 5L), 4)
key_press("Escape")
expect_focus(app, "#btn4")
expect_no_tip(app)

# The UI is hidden, but we can still update the numeric input
app$click("inc")
expect_equal(app$wait_for_value(input = "num", ignore = 4), 5)
expect_equal(app$wait_for_value(input = "num", ignore = 4L), 5)
app$click("inc")
expect_equal(app$wait_for_value(input = "num", ignore = 5), 6)
expect_equal(app$wait_for_value(input = "num", ignore = 5L), 6)

app$click(selector = "#btn4")
expect_visible_tip(app, "#btn4", expect_tabbable = TRUE)
Expand Down

0 comments on commit 75b1c56

Please sign in to comment.