diff --git a/inst/apps/316-bslib-popovers/tests/testthat/test-316-bslib-popovers.R b/inst/apps/316-bslib-popovers/tests/testthat/test-316-bslib-popovers.R index 367e0081cc..9b3f537234 100644 --- a/inst/apps/316-bslib-popovers/tests/testthat/test-316-bslib-popovers.R +++ b/inst/apps/316-bslib-popovers/tests/testthat/test-316-bslib-popovers.R @@ -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