Skip to content

Commit

Permalink
divide initial test
Browse files Browse the repository at this point in the history
  • Loading branch information
m7pr committed Apr 16, 2024
1 parent ecd37a5 commit 9d6c425
Showing 1 changed file with 26 additions and 4 deletions.
30 changes: 26 additions & 4 deletions tests/testthat/test-shinytest2-tm_a_regression.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
testthat::test_that("e2e - tm_a_regerssion:
data extract spec elements are initialized with the default values specified by response and regressor arg", {
testthat::test_that("e2e - tm_a_regerssion: data parameter and module label is passed properly", {
skip_if_too_deep(5)

app <- app_driver_tm_a_regression()
Expand All @@ -13,9 +12,19 @@ testthat::test_that("e2e - tm_a_regerssion:
encoding_dataset <- app$get_text("#teal-main_ui-root-regression .help-block")
testthat::expect_match(encoding_dataset, "Dataset:[\n ]*CO2", all = FALSE)

app$stop()
})

testthat::test_that("e2e - tm_a_regerssion:
data extract spec elements are initialized with the default values specified by response and regressor arg", {
skip_if_too_deep(5)

app <- app_driver_tm_a_regression()
app$expect_no_shiny_error()

testthat::expect_identical(
app$get_active_module_input("plot_type"),
"Normal Q-Q"
app$active_module_element_text("response-dataset_CO2_singleextract-select_selected_text"),
"uptake"
)

testthat::expect_identical(
Expand All @@ -26,6 +35,19 @@ testthat::test_that("e2e - tm_a_regerssion:
app$stop()
})

testthat::test_that("e2e - tm_a_regerssion: plot_type is set properly", {
skip_if_too_deep(5)

app <- app_driver_tm_a_regression()
app$expect_no_shiny_error()

testthat::expect_identical(
app$get_active_module_input("plot_type"),
"Normal Q-Q"
)
app$stop()
})

testthat::test_that("e2e - tm_a_regerssion:
plot type has 7 specific choices & changing choices does not throw errors", {
skip_if_too_deep(5)
Expand Down

0 comments on commit 9d6c425

Please sign in to comment.