Skip to content
Merged
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 @@
app_driver <- app_driver_tm_t_events()

testthat::expect_equal(
app_driver$get_text("#teal-teal_modules-active_tab .active > a"),
app_driver$get_text("#teal-teal_modules-active_module_id * .teal-modules-tree * .nav-link"),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I only realized of this later and used it in a different PR but I wanted to ask for your feedback.
I like that this one uses the id but yours is shorter which is also a plus.
Maybe the one with id is more tightly coupled and works better as a test if the UI changes but I let you decide

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@llrs-roche my preference is the shorter the better : P
once you change this. you can merge to my branch

"Adverse Event Table"
)
testthat::expect_equal(
Expand Down Expand Up @@ -117,7 +117,7 @@
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("arm_var-dataset_ADSL_singleextract-select_input .shiny-validation-message")),

Check warning on line 120 in tests/testthat/test-shinytest2-tm_t_events.R

View workflow job for this annotation

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

file=tests/testthat/test-shinytest2-tm_t_events.R,line=120,col=121,[line_length_linter] Lines should not be more than 120 characters. This line is 137 characters.
"Please select 1 or 2 treatment variable values"
)
app_driver$stop()
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 @@ -71,7 +71,7 @@
skip_if_too_deep(5)
app_driver <- app_driver_tm_t_events_by_grade()
testthat::expect_equal(
app_driver$get_text("#teal-teal_modules-active_tab .active > a"),
app_driver$get_text("#teal-teal_modules-active_module_id * .teal-modules-tree * .nav-link"),
"Adverse Events by Grade Table"
)
testthat::expect_equal(
Expand Down Expand Up @@ -130,7 +130,7 @@
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("arm_var-dataset_ADSL_singleextract-select_input .shiny-validation-message")),

Check warning on line 133 in tests/testthat/test-shinytest2-tm_t_events_by_grade.R

View workflow job for this annotation

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

file=tests/testthat/test-shinytest2-tm_t_events_by_grade.R,line=133,col=121,[line_length_linter] Lines should not be more than 120 characters. This line is 137 characters.
"A treatment variable is required"
)
app_driver$stop()
Expand Down Expand Up @@ -233,7 +233,7 @@
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("grade-dataset_ADAE_singleextract-select_input .shiny-validation-message")),

Check warning on line 236 in tests/testthat/test-shinytest2-tm_t_events_by_grade.R

View workflow job for this annotation

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

file=tests/testthat/test-shinytest2-tm_t_events_by_grade.R,line=236,col=121,[line_length_linter] Lines should not be more than 120 characters. This line is 135 characters.
"An event grade is required"
)
app_driver$stop()
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 @@ -72,7 +72,7 @@
skip_if_too_deep(5)
app_driver <- app_driver_tm_t_events_patyear()
testthat::expect_equal(
app_driver$get_text("#teal-teal_modules-active_tab .active > a"),
app_driver$get_text("#teal-teal_modules-active_module_id * .teal-modules-tree * .nav-link"),
"AE Rate Adjusted for Patient-Years At Risk Table"
)
testthat::expect_equal(
Expand Down Expand Up @@ -169,7 +169,7 @@
)
app_driver$expect_validation_error()
testthat::expect_equal(
app_driver$get_text(app_driver$namespaces(TRUE)$module("arm_var-dataset_ADSL_singleextract-select_input .shiny-validation-message")),

Check warning on line 172 in tests/testthat/test-shinytest2-tm_t_events_patyear.R

View workflow job for this annotation

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

file=tests/testthat/test-shinytest2-tm_t_events_patyear.R,line=172,col=121,[line_length_linter] Lines should not be more than 120 characters. This line is 137 characters.
"Please select exactly 1 or 2 treatment variables"
)
app_driver$stop()
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 @@ -111,7 +111,7 @@
skip_if_too_deep(5)
app_driver <- app_driver_tm_t_events_summary()
testthat::expect_equal(
app_driver$get_text("#teal-teal_modules-active_tab .active > a"),
app_driver$get_text("#teal-teal_modules-active_module_id * .teal-modules-tree * .nav-link"),
"Adverse Events Summary"
)
testthat::expect_equal(
Expand Down Expand Up @@ -159,7 +159,7 @@
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("arm_var-dataset_ADSL_singleextract-select_input .shiny-validation-message")),

Check warning on line 162 in tests/testthat/test-shinytest2-tm_t_events_summary.R

View workflow job for this annotation

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

file=tests/testthat/test-shinytest2-tm_t_events_summary.R,line=162,col=121,[line_length_linter] Lines should not be more than 120 characters. This line is 137 characters.
"Please select exactly 1 or 2 treatment variables"
)
app_driver$stop()
Expand Down
Loading