Skip to content

Commit

Permalink
removing shiny app test
Browse files Browse the repository at this point in the history
removing shiny app test due to OhdsiShinyModule dep
  • Loading branch information
jreps committed Jan 10, 2025
1 parent b42808a commit c895f17
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 32 deletions.
9 changes: 0 additions & 9 deletions R/ViewShiny.R
Original file line number Diff line number Diff line change
Expand Up @@ -149,22 +149,13 @@ viewChars <- function(
databaseSettings$cgTablePrefix <- databaseSettings$cohortTablePrefix
databaseSettings$databaseTable <- "DATABASE_META_DATA"
databaseSettings$databaseTablePrefix <- ""
# databaseSettings$iTablePrefix <- databaseSettings$incidenceTablePrefix
databaseSettings$cgTable <- "cohort_definition"

if (!testApp) {
OhdsiShinyAppBuilder::viewShiny(
config = config,
connection = connection,
resultDatabaseSettings = databaseSettings
)
} else {
OhdsiShinyAppBuilder::createShinyApp(
config = config,
connection = connection,
resultDatabaseSettings = databaseSettings
)
}
}


Expand Down
23 changes: 0 additions & 23 deletions tests/testthat/test-viewShiny.R
Original file line number Diff line number Diff line change
Expand Up @@ -125,26 +125,3 @@ test_that("prepareCharacterizationShiny works", {
testthat::expect_true("cg_cohort_definition" %in% tables)
testthat::expect_true("database_meta_data" %in% tables)
})

test_that("shiny app works", {
settings <- prepareCharacterizationShiny(
resultFolder = file.path(resultLocation, "result"),
cohortDefinitionSet = NULL,
sqliteLocation = file.path(resultLocation, "sqliteCharacterization", "sqlite.sqlite")
)

app <- viewChars(
databaseSettings = settings,
testApp = T
)

shiny::testServer(
app = app,
args = list(),
expr = {
testthat::expect_equal(runServer[["About"]], 0)
session$setInputs(menu = "About")
testthat::expect_equal(runServer[["About"]], 1)
}
)
})

0 comments on commit c895f17

Please sign in to comment.