Skip to content

Commit

Permalink
fix 3 tests
Browse files Browse the repository at this point in the history
  • Loading branch information
m7pr committed Nov 11, 2024
1 parent 350d990 commit 6eccdb8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 10 deletions.
5 changes: 3 additions & 2 deletions tests/testthat/test-module_teal.R
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,7 @@ testthat::describe("srv_teal teal_modules", {
trimws(
rvest::html_text2(
rvest::read_html(
output[["teal_modules-module_1-validate_datanames-shiny_warnings-message"]]$html
output[["teal_modules-module_1-validate_datanames-message"]]$html
)
)
),
Expand Down Expand Up @@ -642,12 +642,13 @@ testthat::describe("srv_teal teal_modules", {
)
),
expr = {
browser()
session$setInputs(`teal_modules-active_tab` = "module_1")
testthat::expect_equal(
trimws(
rvest::html_text2(
rvest::read_html(
output[["validate-shiny_warnings-message"]]$html
output[["teal-datanames_warning-message"]]$html
)
)
),
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-modules.R
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@ testthat::test_that("format.teal_modules returns proper structure", {

testthat::expect_equal(
gsub("\033\\[[0-9;]*m", "", format(appended_mods)),
"TEAL ROOT\n |- a\n | |- Datasets : all\n | |- Properties:\n | | |- Bookmarkable : FALSE\n | | L- Reportable : FALSE\n | |- UI Arguments : \n | |- Server Arguments : \n | L- transforms : \n |- c\n | |- Datasets : all\n | |- Properties:\n | | |- Bookmarkable : FALSE\n | | L- Reportable : FALSE\n | |- UI Arguments : \n | |- Server Arguments : \n | L- transforms : \n L- c\n |- Datasets : all\n |- Properties:\n | |- Bookmarkable : FALSE\n | L- Reportable : FALSE\n |- UI Arguments : \n |- Server Arguments : \n L- transforms : \n" # nolint: line_length
"TEAL ROOT\n |- a\n | |- Datasets : all\n | |- Properties:\n | | |- Bookmarkable : FALSE\n | | L- Reportable : FALSE\n | |- UI Arguments : \n | |- Server Arguments : \n | L- Transforms : \n |- c\n | |- Datasets : all\n | |- Properties:\n | | |- Bookmarkable : FALSE\n | | L- Reportable : FALSE\n | |- UI Arguments : \n | |- Server Arguments : \n | L- Transforms : \n L- c\n |- Datasets : all\n |- Properties:\n | |- Bookmarkable : FALSE\n | L- Reportable : FALSE\n |- UI Arguments : \n |- Server Arguments : \n L- Transforms : \n" # nolint: line_length
)
})

Expand Down
7 changes: 0 additions & 7 deletions tests/testthat/test-teal_data_module.R
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,3 @@ testthat::test_that("teal_data_module throws when server has other formals than
)
})


testthat::test_that("teal_transform_module doesn't accept datanames = 'all'", {
testthat::expect_error(
teal_transform_module(datanames = "all"),
"can't have datanames property equal to 'all'"
)
})

0 comments on commit 6eccdb8

Please sign in to comment.