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
18 changes: 9 additions & 9 deletions tests/testthat/test-shinytest2-tm_g_pp_adverse_events.R
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ testthat::test_that(
skip_if_too_deep(5)
app_driver <- app_driver_tm_g_pp_adverse_events()
testthat::expect_equal(
app_driver$get_text("#teal-teal_modules-active_tab .active > a"),
app_driver$get_text("a.nav-link.active"),
"Adverse Events"
)

Expand Down Expand Up @@ -152,10 +152,10 @@ testthat::test_that(
skip_if_too_deep(5)
app_driver <- app_driver_tm_g_pp_adverse_events()
input_id <- "patient_id"
app_driver$set_active_module_input(input_id, "")
app_driver$set_active_module_input(input_id, NULL)
app_driver$expect_validation_error()
testthat::expect_identical(
app_driver$namespaces(TRUE)$module(sprintf("%s_input .shiny-validation-message", input_id)),
app_driver$get_text(app_driver$namespaces(TRUE)$module(sprintf("%s_input .shiny-validation-message", input_id))),
"Please select a patient"
)
app_driver$stop()
Expand Down Expand Up @@ -197,7 +197,7 @@ testthat::test_that(
app_driver$set_active_module_input(input_id, "")
app_driver$expect_validation_error()
testthat::expect_identical(
app_driver$namespaces(TRUE)$module(sprintf("%s_input .shiny-validation-message", input_id)),
app_driver$get_text(app_driver$namespaces(TRUE)$module(sprintf("%s_input .shiny-validation-message", input_id))),
"Please select AETERM variable."
)
app_driver$stop()
Expand Down Expand Up @@ -239,7 +239,7 @@ testthat::test_that(
app_driver$set_active_module_input(input_id, "")
app_driver$expect_validation_error()
testthat::expect_identical(
app_driver$namespaces(TRUE)$module(sprintf("%s_input .shiny-validation-message", input_id)),
app_driver$get_text(app_driver$namespaces(TRUE)$module(sprintf("%s_input .shiny-validation-message", input_id))),
"Please select AETOXGR variable."
)
app_driver$stop()
Expand Down Expand Up @@ -281,7 +281,7 @@ testthat::test_that(
app_driver$set_active_module_input(input_id, "")
app_driver$expect_validation_error()
testthat::expect_identical(
app_driver$namespaces(TRUE)$module(sprintf("%s_input .shiny-validation-message", input_id)),
app_driver$get_text(app_driver$namespaces(TRUE)$module(sprintf("%s_input .shiny-validation-message", input_id))),
"Please select AEREL variable."
)
app_driver$stop()
Expand Down Expand Up @@ -323,7 +323,7 @@ testthat::test_that(
app_driver$set_active_module_input(input_id, "")
app_driver$expect_validation_error()
testthat::expect_identical(
app_driver$namespaces(TRUE)$module(sprintf("%s_input .shiny-validation-message", input_id)),
app_driver$get_text(app_driver$namespaces(TRUE)$module(sprintf("%s_input .shiny-validation-message", input_id))),
"Please select AEOUT variable."
)
app_driver$stop()
Expand Down Expand Up @@ -365,7 +365,7 @@ testthat::test_that(
app_driver$set_active_module_input(input_id, "")
app_driver$expect_validation_error()
testthat::expect_identical(
app_driver$namespaces(TRUE)$module(sprintf("%s_input .shiny-validation-message", input_id)),
app_driver$get_text(app_driver$namespaces(TRUE)$module(sprintf("%s_input .shiny-validation-message", input_id))),
"Please select AEACN variable."
)
app_driver$stop()
Expand Down Expand Up @@ -407,7 +407,7 @@ testthat::test_that(
app_driver$set_active_module_input(input_id, "")
app_driver$expect_validation_error()
testthat::expect_identical(
app_driver$namespaces(TRUE)$module(sprintf("%s_input .shiny-validation-message", input_id)),
app_driver$get_text(app_driver$namespaces(TRUE)$module(sprintf("%s_input .shiny-validation-message", input_id))),
"Please select ASTDY variable."
)
app_driver$stop()
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-shinytest2-tm_g_pp_patient_timeline.R
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@
app_driver <- app_driver_tm_g_pp_patient_timeline()

testthat::expect_equal(
app_driver$get_text("#teal-teal_modules-active_tab .active > a"),
app_driver$get_text("a.nav-link.active"),
"Patient Timeline"
)
testthat::expect_equal(
Expand Down Expand Up @@ -351,7 +351,7 @@
app_driver$set_active_module_input("aetime_start-dataset_ADAE_singleextract-select", NULL)
testthat::expect_identical(app_driver$get_active_module_plot_output("myplot"), character(0))
testthat::expect_identical(
app_driver$get_text(app_driver$namespaces(TRUE)$module("aetime_start-dataset_ADAE_singleextract-select_input > div > span")),

Check warning on line 354 in tests/testthat/test-shinytest2-tm_g_pp_patient_timeline.R

View workflow job for this annotation

GitHub Actions / SuperLinter 🦸‍♀️ / Lint R code 🧶

file=tests/testthat/test-shinytest2-tm_g_pp_patient_timeline.R,line=354,col=121,[line_length_linter] Lines should not be more than 120 characters. This line is 131 characters.
"Please add AE start date."
)
app_driver$expect_validation_error()
Expand Down Expand Up @@ -387,7 +387,7 @@
app_driver$set_active_module_input("aetime_end-dataset_ADAE_singleextract-select", NULL)
testthat::expect_identical(app_driver$get_active_module_plot_output("myplot"), character(0))
testthat::expect_identical(
app_driver$get_text(app_driver$namespaces(TRUE)$module("aetime_end-dataset_ADAE_singleextract-select_input > div > span")),

Check warning on line 390 in tests/testthat/test-shinytest2-tm_g_pp_patient_timeline.R

View workflow job for this annotation

GitHub Actions / SuperLinter 🦸‍♀️ / Lint R code 🧶

file=tests/testthat/test-shinytest2-tm_g_pp_patient_timeline.R,line=390,col=121,[line_length_linter] Lines should not be more than 120 characters. This line is 129 characters.
"Please add AE end date."
)
app_driver$expect_validation_error()
Expand Down Expand Up @@ -421,7 +421,7 @@
app_driver$set_active_module_input("aerelday_start-dataset_ADAE_singleextract-select", NULL)
testthat::expect_identical(app_driver$get_active_module_plot_output("myplot"), character(0))
testthat::expect_identical(
app_driver$get_text(app_driver$namespaces(TRUE)$module("aerelday_start-dataset_ADAE_singleextract-select_input > div > span")),

Check warning on line 424 in tests/testthat/test-shinytest2-tm_g_pp_patient_timeline.R

View workflow job for this annotation

GitHub Actions / SuperLinter 🦸‍♀️ / Lint R code 🧶

file=tests/testthat/test-shinytest2-tm_g_pp_patient_timeline.R,line=424,col=121,[line_length_linter] Lines should not be more than 120 characters. This line is 133 characters.
"Please add AE start date."
)
app_driver$expect_validation_error()
Expand Down Expand Up @@ -455,7 +455,7 @@
app_driver$set_active_module_input("aerelday_end-dataset_ADAE_singleextract-select", NULL)
testthat::expect_identical(app_driver$get_active_module_plot_output("myplot"), character(0))
testthat::expect_identical(
app_driver$get_text(app_driver$namespaces(TRUE)$module("aerelday_end-dataset_ADAE_singleextract-select_input > div > span")),

Check warning on line 458 in tests/testthat/test-shinytest2-tm_g_pp_patient_timeline.R

View workflow job for this annotation

GitHub Actions / SuperLinter 🦸‍♀️ / Lint R code 🧶

file=tests/testthat/test-shinytest2-tm_g_pp_patient_timeline.R,line=458,col=121,[line_length_linter] Lines should not be more than 120 characters. This line is 131 characters.
"Please add AE end date."
)
app_driver$expect_validation_error()
Expand Down Expand Up @@ -491,7 +491,7 @@
app_driver$set_active_module_input("dstime_start-dataset_ADCM_singleextract-select", NULL)
testthat::expect_identical(app_driver$get_active_module_plot_output("myplot"), character(0))
testthat::expect_identical(
app_driver$get_text(app_driver$namespaces(TRUE)$module("dstime_start-dataset_ADCM_singleextract-select_input > div > span")),

Check warning on line 494 in tests/testthat/test-shinytest2-tm_g_pp_patient_timeline.R

View workflow job for this annotation

GitHub Actions / SuperLinter 🦸‍♀️ / Lint R code 🧶

file=tests/testthat/test-shinytest2-tm_g_pp_patient_timeline.R,line=494,col=121,[line_length_linter] Lines should not be more than 120 characters. This line is 131 characters.
"Please add Medication start date."
)
app_driver$expect_validation_error()
Expand Down Expand Up @@ -527,7 +527,7 @@
app_driver$set_active_module_input("dstime_end-dataset_ADCM_singleextract-select", NULL)
testthat::expect_identical(app_driver$get_active_module_plot_output("myplot"), character(0))
testthat::expect_identical(
app_driver$get_text(app_driver$namespaces(TRUE)$module("dstime_end-dataset_ADCM_singleextract-select_input > div > span")),

Check warning on line 530 in tests/testthat/test-shinytest2-tm_g_pp_patient_timeline.R

View workflow job for this annotation

GitHub Actions / SuperLinter 🦸‍♀️ / Lint R code 🧶

file=tests/testthat/test-shinytest2-tm_g_pp_patient_timeline.R,line=530,col=121,[line_length_linter] Lines should not be more than 120 characters. This line is 129 characters.
"Please add Medication end date."
)
app_driver$expect_validation_error()
Expand Down Expand Up @@ -561,7 +561,7 @@
app_driver$set_active_module_input("dsrelday_start-dataset_ADCM_singleextract-select", NULL)
testthat::expect_identical(app_driver$get_active_module_plot_output("myplot"), character(0))
testthat::expect_identical(
app_driver$get_text(app_driver$namespaces(TRUE)$module("dsrelday_start-dataset_ADCM_singleextract-select_input > div > span")),

Check warning on line 564 in tests/testthat/test-shinytest2-tm_g_pp_patient_timeline.R

View workflow job for this annotation

GitHub Actions / SuperLinter 🦸‍♀️ / Lint R code 🧶

file=tests/testthat/test-shinytest2-tm_g_pp_patient_timeline.R,line=564,col=121,[line_length_linter] Lines should not be more than 120 characters. This line is 133 characters.
"Please add Medication start date."
)
app_driver$expect_validation_error()
Expand Down Expand Up @@ -595,7 +595,7 @@
app_driver$set_active_module_input("dsrelday_end-dataset_ADCM_singleextract-select", NULL)
testthat::expect_identical(app_driver$get_active_module_plot_output("myplot"), character(0))
testthat::expect_identical(
app_driver$get_text(app_driver$namespaces(TRUE)$module("dsrelday_end-dataset_ADCM_singleextract-select_input > div > span")),

Check warning on line 598 in tests/testthat/test-shinytest2-tm_g_pp_patient_timeline.R

View workflow job for this annotation

GitHub Actions / SuperLinter 🦸‍♀️ / Lint R code 🧶

file=tests/testthat/test-shinytest2-tm_g_pp_patient_timeline.R,line=598,col=121,[line_length_linter] Lines should not be more than 120 characters. This line is 131 characters.
"Please add Medication end date."
)
app_driver$expect_validation_error()
Expand Down
12 changes: 6 additions & 6 deletions tests/testthat/test-shinytest2-tm_g_pp_therapy.R
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ testthat::test_that("e2e - tm_g_pp_therapy: Module initializes in teal without e
app_driver$expect_no_validation_error()

testthat::expect_true(
app_driver$is_visible(app_driver$namespaces(TRUE)$module("therapy_plot-plot_out_main"))
app_driver$is_visible(app_driver$namespaces(TRUE)$module("therapy_plot-plot_main"))
)
testthat::expect_true(
app_driver$is_visible(app_driver$namespaces(TRUE)$module("therapy_table"))
Expand All @@ -113,7 +113,7 @@ testthat::test_that(
app_driver <- app_driver_tm_g_pp_therapy()

testthat::expect_equal(
trimws(app_driver$get_text("#teal-teal_modules-active_tab .active")),
trimws(app_driver$get_text("a.nav-link.active")),
"Therapy (e2e)"
)

Expand Down Expand Up @@ -155,15 +155,15 @@ test_different_selection <- function(input_name, input_id, new_value) {
app_driver <- app_driver_tm_g_pp_therapy()
plot_before <- list(
app_driver$get_active_module_plot_output("therapy_plot"),
app_driver$namespaces(TRUE)$module("therapy_table")
app_driver$get_active_module_table_output("therapy_table")
)
app_driver$set_active_module_input(input_id, new_value)
testthat::expect_false(
identical(
plot_before,
list(
app_driver$get_active_module_plot_output("therapy_plot"),
app_driver$namespaces(TRUE)$module("therapy_table")
app_driver$get_active_module_table_output("therapy_table")
)
)
)
Expand Down Expand Up @@ -211,12 +211,12 @@ test_delection_validation <- function(input_name, input_id, deselect_message) {
app_driver$set_active_module_input(input_id, NULL)
app_driver$expect_validation_error()
testthat::expect_equal(
app_driver$namespaces(TRUE)$module(
app_driver$get_text(app_driver$namespaces(TRUE)$module(
sprintf(
"%s_input .shiny-validation-message",
input_id
)
),
)),
deselect_message
)
app_driver$stop()
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-shinytest2-tm_g_pp_vitals.R
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
app_driver <- app_driver_tm_g_pp_vitals()

testthat::expect_equal(
app_driver$get_text("#teal-teal_modules-active_tab .active > a"),
app_driver$get_text("a.nav-link.active"),
"Vitals"
)
testthat::expect_equal(
Expand Down Expand Up @@ -163,7 +163,7 @@
app_driver$set_active_module_input("paramcd-dataset_ADVS_singleextract-select", NULL)
testthat::expect_identical(app_driver$get_active_module_plot_output("vitals_plot"), character(0))
testthat::expect_identical(
app_driver$get_text(app_driver$namespaces(TRUE)$module("paramcd-dataset_ADVS_singleextract-select_input > div > span")),

Check warning on line 166 in tests/testthat/test-shinytest2-tm_g_pp_vitals.R

View workflow job for this annotation

GitHub Actions / SuperLinter 🦸‍♀️ / Lint R code 🧶

file=tests/testthat/test-shinytest2-tm_g_pp_vitals.R,line=166,col=121,[line_length_linter] Lines should not be more than 120 characters. This line is 124 characters.
"Please select PARAMCD variable."
)
app_driver$expect_validation_error()
Expand Down Expand Up @@ -191,7 +191,7 @@
app_driver$set_active_module_input("xaxis-dataset_ADVS_singleextract-select", NULL)
testthat::expect_identical(app_driver$get_active_module_plot_output("vitals_plot"), character(0))
testthat::expect_identical(
app_driver$get_text(app_driver$namespaces(TRUE)$module("xaxis-dataset_ADVS_singleextract-select_input > div > span")),

Check warning on line 194 in tests/testthat/test-shinytest2-tm_g_pp_vitals.R

View workflow job for this annotation

GitHub Actions / SuperLinter 🦸‍♀️ / Lint R code 🧶

file=tests/testthat/test-shinytest2-tm_g_pp_vitals.R,line=194,col=121,[line_length_linter] Lines should not be more than 120 characters. This line is 122 characters.
"Please select Vitals x-axis variable."
)
app_driver$expect_validation_error()
Expand Down
Loading