Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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 tests/testthat/test-shinytest2-tm_g_barchart_simple.R
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@

# Table is rendered asynchronously, wait a bit more
app_driver$wait_for_idle()
testthat::expect_true(app_driver$is_visible(app_driver$namespaces(TRUE)$module("table")))
testthat::expect_true(app_driver$is_visible(app_driver$namespaces(TRUE)$module("table > table")))

app_driver$stop()
})
Expand Down Expand Up @@ -365,6 +365,6 @@
FALSE,
setup_fun = function(app_driver) {
app_driver$set_active_module_input("label_bars", TRUE)
return(NULL)

Check warning on line 368 in tests/testthat/test-shinytest2-tm_g_barchart_simple.R

View workflow job for this annotation

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

file=tests/testthat/test-shinytest2-tm_g_barchart_simple.R,line=368,col=5,[return_linter] Use implicit return behavior; explicit return() is not needed.
}
)
8 changes: 7 additions & 1 deletion tests/testthat/test-shinytest2-tm_t_binary_outcome.R
Original file line number Diff line number Diff line change
Expand Up @@ -221,11 +221,17 @@
testthat::test_that("e2e - tm_t_binary_outcome: Deselection of responders throws validation error.", {
skip_if_too_deep(5)
app_driver <- app_driver_tm_t_binary_outcome()
testthat::expect_false(
identical(
app_driver$get_text(".shiny-validation-message"),
"`Responders` field is empty"
)
)
app_driver$set_active_module_input("responders", NULL)
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("responders_input .shiny-validation-message")),
app_driver$get_text(".shiny-validation-message"), # it works because is the only validation message present
"`Responders` field is empty"
)
app_driver$stop()
Expand Down Expand Up @@ -256,7 +262,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 265 in tests/testthat/test-shinytest2-tm_t_binary_outcome.R

View workflow job for this annotation

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

file=tests/testthat/test-shinytest2-tm_t_binary_outcome.R,line=265,col=121,[line_length_linter] Lines should not be more than 120 characters. This line is 137 characters.
"Treatment variable must be selected"
)
app_driver$stop()
Expand Down
Loading