Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions tests/testthat/test-shinytest2-tm_t_shift_by_arm.R
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ testthat::test_that(
skip_if_too_deep(5)
app_driver <- app_driver_tm_t_shift_by_arm()
testthat::expect_equal(
app_driver$get_text("#teal-teal_modules-active_tab .active > a"),
app_driver$get_text("a.nav-link.active"),
"Shift by Arm Table"
)
testthat::expect_equal(
Expand Down Expand Up @@ -120,8 +120,9 @@ testthat::test_that("e2e - tm_t_shift_by_arm: Deselection of arm_var throws vali
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)),
"A treatment variable is required"
)
app_driver$stop()
Expand Down
8 changes: 5 additions & 3 deletions tests/testthat/test-shinytest2-tm_t_shift_by_arm_by_worst.R
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ testthat::test_that(
app_driver <- app_driver_tm_t_shift_by_arm_by_worst()

testthat::expect_equal(
app_driver$get_text("#teal-teal_modules-active_tab .active > a"),
app_driver$get_text("a.nav-link.active"),
"Shift by Arm Table"
)
testthat::expect_equal(
Expand Down Expand Up @@ -133,8 +133,9 @@ testthat::test_that("e2e - tm_t_shift_by_arm_by_worst: Deselection of arm_var th
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)),
"A treatment variable is required"
)
app_driver$stop()
Expand Down Expand Up @@ -232,8 +233,9 @@ testthat::test_that("e2e - tm_t_shift_by_arm_by_worst: Deselection of aval_var t
app_driver$set_active_module_input("aval_var-dataset_ADEG_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 <- "aval_var-dataset_ADEG_singleextract-select_input .shiny-validation-message"
testthat::expect_equal(
app_driver$get_text(app_driver$namespaces(TRUE)$module("aval_var-dataset_ADEG_singleextract-select_input .shiny-validation-message")),
app_driver$get_text(app_driver$namespaces(TRUE)$module(selector)),
"An analysis range indicator required"
)
app_driver$stop()
Expand Down
3 changes: 2 additions & 1 deletion tests/testthat/test-shinytest2-tm_t_shift_by_grade.R
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,9 @@ testthat::test_that("e2e - tm_t_shift_by_grade: Deselection of arm_var throws va
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)),
"A treatment variable is required"
)
app_driver$stop()
Expand Down
Loading