diff --git a/tests/testthat/test-shinytest2-tm_t_summary.R b/tests/testthat/test-shinytest2-tm_t_summary.R index 315a42bb9..665493996 100644 --- a/tests/testthat/test-shinytest2-tm_t_summary.R +++ b/tests/testthat/test-shinytest2-tm_t_summary.R @@ -50,7 +50,7 @@ testthat::test_that("e2e - tm_t_summary: Starts with specified label, arm_var, s skip_if_too_deep(5) app_driver <- app_driver_tm_t_summary() testthat::expect_equal( - app_driver$get_text("#teal-teal_modules-active_tab .active > a"), + app_driver$get_text("a.nav-link.active"), "Demographic Table" ) testthat::expect_equal( @@ -96,8 +96,9 @@ testthat::test_that("e2e - tm_t_summary: Deselection of arm_var throws validatio app_driver$set_active_module_input("arm_var-dataset_ADSL_singleextract-select", NULL) testthat::expect_identical(app_driver$get_active_module_table_output("table-table-with-settings"), data.frame()) app_driver$expect_validation_error() + selector <- "arm_var-dataset_ADSL_singleextract-select_input .shiny-validation-message" testthat::expect_equal( - app_driver$get_text(app_driver$namespaces(TRUE)$module("arm_var-dataset_ADSL_singleextract-select_input .shiny-validation-message")), + app_driver$get_text(app_driver$namespaces(TRUE)$module(selector)), "Please select 1 or 2 column variables" ) app_driver$stop() diff --git a/tests/testthat/test-shinytest2-tm_t_summary_by.R b/tests/testthat/test-shinytest2-tm_t_summary_by.R index e6903bd03..4c886de58 100644 --- a/tests/testthat/test-shinytest2-tm_t_summary_by.R +++ b/tests/testthat/test-shinytest2-tm_t_summary_by.R @@ -71,7 +71,7 @@ testthat::test_that( skip_if_too_deep(5) app_driver <- app_driver_tm_t_summary_by() testthat::expect_equal( - app_driver$get_text("#teal-teal_modules-active_tab .active > a"), + app_driver$get_text("a.nav-link.active"), "Summary by Row Groups Table" ) testthat::expect_equal( @@ -130,8 +130,9 @@ testthat::test_that("e2e - tm_t_summary_by: Deselection of arm_var throws valida app_driver$set_active_module_input("arm_var-dataset_ADSL_singleextract-select", NULL) testthat::expect_identical(app_driver$get_active_module_table_output("table-table-with-settings"), data.frame()) app_driver$expect_validation_error() + selector <- "arm_var-dataset_ADSL_singleextract-select_input .shiny-validation-message" testthat::expect_equal( - app_driver$get_text(app_driver$namespaces(TRUE)$module("arm_var-dataset_ADSL_singleextract-select_input .shiny-validation-message")), + app_driver$get_text(app_driver$namespaces(TRUE)$module(selector)), "Please select 1 or 2 column variables" ) app_driver$stop()