diff --git a/tests/testthat/test-shinytest2-tm_g_barchart_simple.R b/tests/testthat/test-shinytest2-tm_g_barchart_simple.R index 36aa40f94..453e75a64 100644 --- a/tests/testthat/test-shinytest2-tm_g_barchart_simple.R +++ b/tests/testthat/test-shinytest2-tm_g_barchart_simple.R @@ -127,7 +127,7 @@ testthat::test_that("e2e - tm_g_barchart_simple: Module initializes in teal with # Table is rendered asynchronously, wait a bit more app_driver$wait_for_idle() - testthat::expect_true(app_driver$is_visible(app_driver$namespaces(TRUE)$module("table"))) + testthat::expect_true(app_driver$is_visible(app_driver$namespaces(TRUE)$module("table > table"))) app_driver$stop() }) diff --git a/tests/testthat/test-shinytest2-tm_t_binary_outcome.R b/tests/testthat/test-shinytest2-tm_t_binary_outcome.R index c3e2e1fd7..0c5c4ad80 100644 --- a/tests/testthat/test-shinytest2-tm_t_binary_outcome.R +++ b/tests/testthat/test-shinytest2-tm_t_binary_outcome.R @@ -221,11 +221,17 @@ testthat::test_that( testthat::test_that("e2e - tm_t_binary_outcome: Deselection of responders throws validation error.", { skip_if_too_deep(5) app_driver <- app_driver_tm_t_binary_outcome() + testthat::expect_false( + identical( + app_driver$get_text(".shiny-validation-message"), + "`Responders` field is empty" + ) + ) app_driver$set_active_module_input("responders", NULL) testthat::expect_identical(app_driver$get_active_module_table_output("table-table-with-settings"), data.frame()) app_driver$expect_validation_error() testthat::expect_equal( - app_driver$get_text(app_driver$namespaces(TRUE)$module("responders_input .shiny-validation-message")), + app_driver$get_text(".shiny-validation-message"), "`Responders` field is empty" ) app_driver$stop()