Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix teal namespace for broken tests #1213

Merged
merged 2 commits into from
Aug 14, 2024
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
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ BugReports:
https://github.com/insightsengineering/teal.modules.clinical/issues
Depends:
R (>= 4.0),
teal (>= 0.15.2),
teal (>= 0.15.2.9052),
teal.transform (>= 0.5.0),
tern (>= 0.9.5.9011)
Imports:
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-shinytest2-tm_a_gee.R
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ testthat::test_that(
app_driver <- app_driver_tm_a_gee()

testthat::expect_equal(
app_driver$get_text("#teal-main_ui-root-active_tab > li.active > a"),
app_driver$get_text("#teal-teal_modules-active_tab > li.active > a"),
"GEE"
)

Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-shinytest2-tm_a_mmrm.R
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ testthat::test_that(
skip_if_too_deep(5)
app_driver <- app_driver_tm_a_mmrm(FALSE)

testthat::expect_equal(app_driver$get_text("#teal-main_ui-root-active_tab > li.active > a"), "MMRM")
testthat::expect_equal(app_driver$get_text("#teal-teal_modules-active_tab > li.active > a"), "MMRM")

testthat::expect_equal(app_driver$get_active_module_input("aval_var-dataset_ADQS_singleextract-select"), "AVAL")

Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-shinytest2-tm_g_barchart_simple.R
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ testthat::test_that(
app_driver <- app_driver_tm_g_barchart_simple()

testthat::expect_equal(
trimws(app_driver$get_text("#teal-main_ui-root-active_tab > li.active")),
trimws(app_driver$get_text("#teal-teal_modules-active_tab > li.active")),
"ADAE Analysis (e2e)"
)

Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-shinytest2-tm_g_ci.R
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ testthat::test_that(
skip_if_too_deep(5)
app_driver <- app_driver_tm_g_ci()
testthat::expect_equal(
app_driver$get_text("#teal-main_ui-root-active_tab > li.active > a"),
app_driver$get_text("#teal-teal_modules-active_tab > li.active > a"),
"Confidence Interval Plot"
)

Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-shinytest2-tm_g_forest_rsp.R
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ testthat::test_that(
app_driver <- app_driver_tm_g_forest_rsp()

testthat::expect_equal(
app_driver$get_text("#teal-main_ui-root-active_tab > li.active > a"),
app_driver$get_text("#teal-teal_modules-active_tab > li.active > a"),
"Forest Response"
)

Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-shinytest2-tm_g_forest_tte.R
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ testthat::test_that(
app_driver <- app_driver_tm_g_forest_tte()

testthat::expect_identical(
trimws(app_driver$get_text("#teal-main_ui-root-active_tab > li.active")),
trimws(app_driver$get_text("#teal-teal_modules-active_tab > li.active")),
"Forest Survival (e2e)"
)

Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-shinytest2-tm_g_ipp.R
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ testthat::test_that(
skip_if_too_deep(5)
app_driver <- app_driver_tm_g_ipp()
testthat::expect_equal(
app_driver$get_text("#teal-main_ui-root-active_tab > li.active > a"),
app_driver$get_text("#teal-teal_modules-active_tab > li.active > a"),
"Individual Patient Plot"
)
testthat::expect_equal(
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-shinytest2-tm_g_km.R
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ testthat::test_that(
app_driver <- app_driver_tm_g_km()

testthat::expect_equal(
app_driver$get_text("#teal-main_ui-root-active_tab > li.active > a"),
app_driver$get_text("#teal-teal_modules-active_tab > li.active > a"),
"Kaplan-Meier Plot"
)

Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-shinytest2-tm_g_lineplot.R
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ testthat::test_that(

app_driver <- app_driver_tm_g_lineplot()

testthat::expect_equal(trimws(app_driver$get_text("#teal-main_ui-root-active_tab > li.active")), "Line Plot")
testthat::expect_equal(trimws(app_driver$get_text("#teal-teal_modules-active_tab > li.active")), "Line Plot")
testthat::expect_equal(app_driver$get_active_module_input("param-dataset_ADLB_singleextract-filter1-vals"), "ALT")
testthat::expect_equal(app_driver$get_active_module_input("strata-dataset_ADSL_singleextract-select"), "ARM")
testthat::expect_equal(app_driver$get_active_module_input("y-dataset_ADLB_singleextract-select"), "AVAL")
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-shinytest2-tm_g_pp_adverse_events.R
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,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-main_ui-root-active_tab > li.active > a"),
app_driver$get_text("#teal-teal_modules-active_tab > li.active > a"),
"Adverse Events"
)

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 @@ -110,7 +110,7 @@ testthat::test_that(
app_driver <- app_driver_tm_g_pp_patient_timeline()

testthat::expect_equal(
app_driver$get_text("#teal-main_ui-root-active_tab > li.active > a"),
app_driver$get_text("#teal-teal_modules-active_tab > li.active > a"),
"Patient Timeline"
)
testthat::expect_equal(
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-shinytest2-tm_g_pp_therapy.R
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ testthat::test_that(
app_driver <- app_driver_tm_g_pp_therapy()

testthat::expect_equal(
trimws(app_driver$get_text("#teal-main_ui-root-active_tab > li.active")),
trimws(app_driver$get_text("#teal-teal_modules-active_tab > li.active")),
"Therapy (e2e)"
)

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 @@ -61,7 +61,7 @@ testthat::test_that(
app_driver <- app_driver_tm_g_pp_vitals()

testthat::expect_equal(
app_driver$get_text("#teal-main_ui-root-active_tab > li.active > a"),
app_driver$get_text("#teal-teal_modules-active_tab > li.active > a"),
"Vitals"
)
testthat::expect_equal(
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-shinytest2-tm_t_abnormality.R
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ testthat::test_that(
app_driver <- app_driver_tm_t_abnormality()

testthat::expect_equal(
app_driver$get_text("#teal-main_ui-root-active_tab > li.active > a"),
app_driver$get_text("#teal-teal_modules-active_tab > li.active > a"),
"Abnormality Table"
)
testthat::expect_equal(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ testthat::test_that(
app_driver <- app_driver_tm_t_abnormality_by_worst_grade()

testthat::expect_equal(
app_driver$get_text("#teal-main_ui-root-active_tab > li.active > a"),
app_driver$get_text("#teal-teal_modules-active_tab > li.active > a"),
"Laboratory Test Results with Highest Grade Post-Baseline"
)
testthat::expect_equal(
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-shinytest2-tm_t_ancova.R
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ testthat::test_that(
app_driver <- app_driver_tm_t_ancova()

testthat::expect_equal(
app_driver$get_text("#teal-main_ui-root-active_tab > li.active > a"),
app_driver$get_text("#teal-teal_modules-active_tab > li.active > a"),
"ANCOVA Table"
)
testthat::expect_equal(
Expand Down
4 changes: 2 additions & 2 deletions tests/testthat/test-shinytest2-tm_t_binary_outcome.R
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ testthat::test_that(
app_driver <- app_driver_tm_t_binary_outcome()

testthat::expect_equal(
app_driver$get_text("#teal-main_ui-root-active_tab > li.active > a"),
app_driver$get_text("#teal-teal_modules-active_tab > li.active > a"),
"Responders"
)
testthat::expect_equal(
Expand Down Expand Up @@ -227,7 +227,7 @@ testthat::test_that("e2e - tm_t_binary_outcome: Deselection of responders throws
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("#teal-main_ui-root-responders .shiny-validation-message"),
app_driver$get_text("#teal-teal_modules-responders .shiny-validation-message"),
"`Responders` field is empty"
)
app_driver$stop()
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-shinytest2-tm_t_coxreg.R
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ testthat::test_that(
skip_if_too_deep(5)
app_driver <- app_driver_tm_t_coxreg()
testthat::expect_equal(
app_driver$get_text("#teal-main_ui-root-active_tab > li.active > a"),
app_driver$get_text("#teal-teal_modules-active_tab > li.active > a"),
"Cox Reg."
)
testthat::expect_equal(
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-shinytest2-tm_t_events.R
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ testthat::test_that(
app_driver <- app_driver_tm_t_events()

testthat::expect_equal(
app_driver$get_text("#teal-main_ui-root-active_tab > li.active > a"),
app_driver$get_text("#teal-teal_modules-active_tab > li.active > a"),
"Adverse Event Table"
)
testthat::expect_equal(
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-shinytest2-tm_t_events_by_grade.R
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ testthat::test_that(
skip_if_too_deep(5)
app_driver <- app_driver_tm_t_events_by_grade()
testthat::expect_equal(
app_driver$get_text("#teal-main_ui-root-active_tab > li.active > a"),
app_driver$get_text("#teal-teal_modules-active_tab > li.active > a"),
"Adverse Events by Grade Table"
)
testthat::expect_equal(
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-shinytest2-tm_t_events_patyear.R
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ testthat::test_that(
skip_if_too_deep(5)
app_driver <- app_driver_tm_t_events_patyear()
testthat::expect_equal(
app_driver$get_text("#teal-main_ui-root-active_tab > li.active > a"),
app_driver$get_text("#teal-teal_modules-active_tab > li.active > a"),
"AE Rate Adjusted for Patient-Years At Risk Table"
)
testthat::expect_equal(
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-shinytest2-tm_t_events_summary.R
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ testthat::test_that(
skip_if_too_deep(5)
app_driver <- app_driver_tm_t_events_summary()
testthat::expect_equal(
app_driver$get_text("#teal-main_ui-root-active_tab > li.active > a"),
app_driver$get_text("#teal-teal_modules-active_tab > li.active > a"),
"Adverse Events Summary"
)
testthat::expect_equal(
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-shinytest2-tm_t_exposure.R
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ testthat::test_that(
skip_if_too_deep(5)
app_driver <- app_driver_tm_t_exposure()
testthat::expect_equal(
app_driver$get_text("#teal-main_ui-root-active_tab > li.active > a"),
app_driver$get_text("#teal-teal_modules-active_tab > li.active > a"),
"Duration of Exposure Table"
)
testthat::expect_equal(
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-shinytest2-tm_t_logistic.R
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ testthat::test_that(
skip_if_too_deep(5)
app_driver <- app_driver_tm_t_logistic()
testthat::expect_equal(
app_driver$get_text("#teal-main_ui-root-active_tab > li.active > a"),
app_driver$get_text("#teal-teal_modules-active_tab > li.active > a"),
"Logistic Regression"
)
testthat::expect_equal(
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-shinytest2-tm_t_mult_events.R
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ testthat::test_that(
skip_if_too_deep(5)
app_driver <- app_driver_tm_t_mult_events()
testthat::expect_equal(
app_driver$get_text("#teal-main_ui-root-active_tab > li.active > a"),
app_driver$get_text("#teal-teal_modules-active_tab > li.active > a"),
"Concomitant Medications by Medication Class and Preferred Name"
)
testthat::expect_equal(
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-shinytest2-tm_t_pp_basic_info.R
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ testthat::test_that("e2e - tm_t_pp_basic_info: Starts with specified label, pati
skip_if_too_deep(5)
app_driver <- app_driver_tm_t_pp_basic_info()
testthat::expect_equal(
app_driver$get_text("#teal-main_ui-root-active_tab > li.active > a"),
app_driver$get_text("#teal-teal_modules-active_tab > li.active > a"),
"Basic Info"
)
testthat::expect_equal(
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-shinytest2-tm_t_pp_laboratory.R
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ testthat::test_that(
app_driver <- app_driver_tm_t_pp_laboratory()

testthat::expect_equal(
app_driver$get_text("#teal-main_ui-root-active_tab > li.active > a"),
app_driver$get_text("#teal-teal_modules-active_tab > li.active > a"),
"Vitals"
)
testthat::expect_equal(
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-shinytest2-tm_t_pp_medical_history.R
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ testthat::test_that(
app_driver <- app_driver_tm_t_pp_medical_history()

testthat::expect_equal(
app_driver$get_text("#teal-main_ui-root-active_tab > li.active > a"),
app_driver$get_text("#teal-teal_modules-active_tab > li.active > a"),
"Medical History"
)
testthat::expect_equal(
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-shinytest2-tm_t_pp_prior_medication.R
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ testthat::test_that(
skip_if_too_deep(5)
app_driver <- app_driver_tm_t_pp_prior_medication()
testthat::expect_equal(
app_driver$get_text("#teal-main_ui-root-active_tab > li.active > a"),
app_driver$get_text("#teal-teal_modules-active_tab > li.active > a"),
"Prior Medication"
)
testthat::expect_equal(
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-shinytest2-tm_t_shift_by_arm.R
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,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-main_ui-root-active_tab > li.active > a"),
app_driver$get_text("#teal-teal_modules-active_tab > li.active > a"),
"Shift by Arm Table"
)
testthat::expect_equal(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ testthat::test_that(
app_driver <- app_driver_tm_t_shift_by_arm_by_worst()

testthat::expect_equal(
app_driver$get_text("#teal-main_ui-root-active_tab > li.active > a"),
app_driver$get_text("#teal-teal_modules-active_tab > li.active > a"),
"Shift by Arm Table"
)
testthat::expect_equal(
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-shinytest2-tm_t_shift_by_grade.R
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ testthat::test_that(
skip_if_too_deep(5)
app_driver <- app_driver_tm_t_shift_by_grade()
testthat::expect_equal(
app_driver$get_text("#teal-main_ui-root-active_tab > li.active > a"),
app_driver$get_text("#teal-teal_modules-active_tab > li.active > a"),
"Grade Laboratory Abnormality Table"
)
testthat::expect_equal(
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-shinytest2-tm_t_smq.R
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ testthat::test_that(
skip_if_too_deep(5)
app_driver <- app_driver_tm_t_smq()
testthat::expect_equal(
app_driver$get_text("#teal-main_ui-root-active_tab > li.active > a"),
app_driver$get_text("#teal-teal_modules-active_tab > li.active > a"),
"Adverse Events by SMQ Table"
)
testthat::expect_equal(
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-shinytest2-tm_t_summary.R
Original file line number Diff line number Diff line change
Expand Up @@ -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-main_ui-root-active_tab > li.active > a"),
app_driver$get_text("#teal-teal_modules-active_tab > li.active > a"),
"Demographic Table"
)
testthat::expect_equal(
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-shinytest2-tm_t_summary_by.R
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,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-main_ui-root-active_tab > li.active > a"),
app_driver$get_text("#teal-teal_modules-active_tab > li.active > a"),
"Summary by Row Groups Table"
)
testthat::expect_equal(
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-shinytest2-tm_t_tte.R
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ testthat::test_that(
skip_if_too_deep(5)
app_driver <- app_driver_tm_t_tte()
testthat::expect_equal(
app_driver$get_text("#teal-main_ui-root-active_tab > li.active > a"),
app_driver$get_text("#teal-teal_modules-active_tab > li.active > a"),
"Time To Event Table"
)
testthat::expect_equal(
Expand Down
Loading