From 6eccdb8f8110f35caf2738aabea8fdead05e8c3d Mon Sep 17 00:00:00 2001 From: m7pr Date: Mon, 11 Nov 2024 15:48:00 +0100 Subject: [PATCH] fix 3 tests --- tests/testthat/test-module_teal.R | 5 +++-- tests/testthat/test-modules.R | 2 +- tests/testthat/test-teal_data_module.R | 7 ------- 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/tests/testthat/test-module_teal.R b/tests/testthat/test-module_teal.R index 3a1a143329..c98567ffbe 100644 --- a/tests/testthat/test-module_teal.R +++ b/tests/testthat/test-module_teal.R @@ -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 ) ) ), @@ -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 ) ) ), diff --git a/tests/testthat/test-modules.R b/tests/testthat/test-modules.R index 605e0f1654..91c95cc790 100644 --- a/tests/testthat/test-modules.R +++ b/tests/testthat/test-modules.R @@ -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 ) }) diff --git a/tests/testthat/test-teal_data_module.R b/tests/testthat/test-teal_data_module.R index 0361ea4ea4..d9e4bccae8 100644 --- a/tests/testthat/test-teal_data_module.R +++ b/tests/testthat/test-teal_data_module.R @@ -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'" - ) -})