Skip to content

Commit

Permalink
fix failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
iglauss committed Dec 11, 2024
1 parent 1dbb39c commit 26f42da
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
4 changes: 2 additions & 2 deletions tests/testthat/test-mod_clinical_timelines.R
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ test_that(
"mod_main_view_server() runs even if there is no drug admin information",
{
df <- prep_dummy_data(n = 2)
df <- data_list[names(data_list) != "exp"]
df <- df[names(df) != "exp"]

server_func <- function(id, data_name, dataset_list) {
mod_clinical_timelines_server(
Expand Down Expand Up @@ -228,7 +228,7 @@ test_that("bookmarking works as intended" %>% vdoc[["add_spec"]](specs$integrati
app$stop()
})

test_that("an informative error message gets displayed in case of the plot being to big" %>%
test_that("an informative error message gets displayed in case of the plot being too big" %>%
vdoc[["add_spec"]](specs$plot_specs$errors), {
app_dir <- "./apps/large_app"
app <- shinytest2::AppDriver$new(app_dir = app_dir, name = "test_error_big_plot")
Expand Down
7 changes: 3 additions & 4 deletions tests/testthat/test-mod_main_view.R
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ df <- prep_data(
)
)

colors <- shiny::reactive(color_lookup(unique(df$group)))
colors <- shiny::reactive(color_lookup(unique(df$group), NULL))
changed <- shiny::reactive(0)

plot_click_li <- list(
Expand Down Expand Up @@ -84,13 +84,12 @@ plot_click_li <- list(

test_that("mod_main_view_server() returns the subject ID the user clicked on" %>%
vdoc[["add_spec"]](specs$integration_specs$jumping), {
server_func <- function(id, initial_data, changed, colors_groups, ms = 100) {
server_func <- function(id, initial_data, changed, colors_groups) {
mod_main_view_server(
module_id = id,
initial_data = initial_data,
changed = changed,
colors_groups = colors_groups,
ms = ms
colors_groups = colors_groups
)
}

Expand Down

0 comments on commit 26f42da

Please sign in to comment.