From c81fee934cf53959e39e708676e39013745ac239 Mon Sep 17 00:00:00 2001 From: m7pr Date: Thu, 8 Feb 2024 13:16:37 +0100 Subject: [PATCH 01/14] remove dynamic_assertions --- NAMESPACE | 2 -- R/dynamic_assertions.R | 62 ------------------------------------------ man/dyn_assertion.Rd | 41 ---------------------------- 3 files changed, 105 deletions(-) delete mode 100644 R/dynamic_assertions.R delete mode 100644 man/dyn_assertion.Rd diff --git a/NAMESPACE b/NAMESPACE index 10e6611848..16e59ee399 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -27,8 +27,6 @@ export(set_default_total_label) export(split_choices) export(split_col_expr) export(split_interactions) -export(teal_enough_rows) -export(teal_has_element) export(tm_a_gee) export(tm_a_mmrm) export(tm_g_barchart_simple) diff --git a/R/dynamic_assertions.R b/R/dynamic_assertions.R deleted file mode 100644 index fc922e96bc..0000000000 --- a/R/dynamic_assertions.R +++ /dev/null @@ -1,62 +0,0 @@ -#' Dynamic assertion -#' -#' Verifies assertions for dynamic outputs. -#' -#' @name dyn_assertion -#' @keywords internal -NULL - -#' @describeIn dyn_assertion the dataset is large enough. -#' -#' @param data (`dataframe`). -#' @param min_nrow (`number`)\cr minimum number of rows for a valid analysis. -#' -#' @export -#' -#' @examples -#' -#' library(assertthat) -#' library(testthat) -#' expect_error(assertthat::assert_that(teal_enough_rows(data = iris, min_nrow = 1500))) -teal_enough_rows <- function(data, min_nrow) nrow(data) >= min_nrow -assertthat::on_failure(teal_enough_rows) <- function(call, env) { - call[[1]] <- validate_enough_rows - eval(call, envir = env) -} -validate_enough_rows <- function(data, min_nrow) { - shiny::validate( - shiny::need( - FALSE, - label = paste0( - substitute(data), - ": Minimum number of records not met: >= ", min_nrow, - " records required." - ) - ) - ) -} - -#' @describeIn dyn_assertion the element exist. -#' @param str (`name`)\cr the name of the object which must _exist_. -#' @param ... (`character`)\cr the label to be displayed. -#' -#' @export -#' -#' @examples -#' -#' armcd <- NULL -#' expect_error(assertthat::assert_that(teal_has_element(str = armcd, "ARMCD"))) -teal_has_element <- function(str, ...) length(str) > 0 -assertthat::on_failure(teal_has_element) <- function(call, env) { - call[[1]] <- validate_has_elements - eval(call, envir = env) -} - -validate_has_elements <- function(str, label = str) { - shiny::validate( - shiny::need( - FALSE, - message = paste0(label, ": required variable not assigned.") - ) - ) -} diff --git a/man/dyn_assertion.Rd b/man/dyn_assertion.Rd deleted file mode 100644 index 9b9881a0b6..0000000000 --- a/man/dyn_assertion.Rd +++ /dev/null @@ -1,41 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/dynamic_assertions.R -\name{dyn_assertion} -\alias{dyn_assertion} -\alias{teal_enough_rows} -\alias{teal_has_element} -\title{Dynamic assertion} -\usage{ -teal_enough_rows(data, min_nrow) - -teal_has_element(str, ...) -} -\arguments{ -\item{data}{(\code{dataframe}).} - -\item{min_nrow}{(\code{number})\cr minimum number of rows for a valid analysis.} - -\item{str}{(\code{name})\cr the name of the object which must \emph{exist}.} - -\item{...}{(\code{character})\cr the label to be displayed.} -} -\description{ -Verifies assertions for dynamic outputs. -} -\section{Functions}{ -\itemize{ -\item \code{teal_enough_rows()}: the dataset is large enough. - -\item \code{teal_has_element()}: the element exist. - -}} -\examples{ - -library(assertthat) -library(testthat) -expect_error(assertthat::assert_that(teal_enough_rows(data = iris, min_nrow = 1500))) - -armcd <- NULL -expect_error(assertthat::assert_that(teal_has_element(str = armcd, "ARMCD"))) -} -\keyword{internal} From b1915c9337a747bd14260f378dee6ff8181f8b4b Mon Sep 17 00:00:00 2001 From: m7pr Date: Fri, 7 Jun 2024 16:23:48 +0200 Subject: [PATCH 02/14] exclude plots width and height from logging and change log level to TRACE --- R/tm_a_gee.R | 2 +- R/tm_a_mmrm.R | 2 +- R/tm_g_barchart_simple.R | 3 ++- R/tm_g_ci.R | 2 +- R/tm_g_forest_rsp.R | 2 +- R/tm_g_forest_tte.R | 2 +- R/tm_g_ipp.R | 2 +- R/tm_g_km.R | 2 +- R/tm_g_lineplot.R | 2 +- R/tm_g_pp_adverse_events.R | 2 +- R/tm_g_pp_patient_timeline.R | 2 +- R/tm_g_pp_therapy.R | 2 +- R/tm_g_pp_vitals.R | 2 +- R/tm_t_abnormality.R | 2 +- R/tm_t_abnormality_by_worst_grade.R | 2 +- R/tm_t_ancova.R | 2 +- R/tm_t_binary_outcome.R | 2 +- R/tm_t_coxreg.R | 2 +- R/tm_t_events.R | 2 +- R/tm_t_events_by_grade.R | 2 +- R/tm_t_events_patyear.R | 2 +- R/tm_t_events_summary.R | 2 +- R/tm_t_exposure.R | 2 +- R/tm_t_logistic.R | 2 +- R/tm_t_mult_events.R | 2 +- R/tm_t_pp_basic_info.R | 2 +- R/tm_t_pp_laboratory.R | 2 +- R/tm_t_pp_medical_history.R | 2 +- R/tm_t_pp_prior_medication.R | 2 +- R/tm_t_shift_by_arm.R | 2 +- R/tm_t_shift_by_arm_by_worst.R | 2 +- R/tm_t_shift_by_grade.R | 2 +- R/tm_t_smq.R | 2 +- R/tm_t_summary.R | 2 +- R/tm_t_summary_by.R | 2 +- R/tm_t_tte.R | 2 +- R/utils.R | 18 ++++++++++++++++++ 37 files changed, 55 insertions(+), 36 deletions(-) diff --git a/R/tm_a_gee.R b/R/tm_a_gee.R index 3fe8fd18eb..acde38d4e5 100644 --- a/R/tm_a_gee.R +++ b/R/tm_a_gee.R @@ -389,7 +389,7 @@ srv_gee <- function(id, checkmate::assert_class(isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - if (shiny::isRunning()) logger::log_shiny_input_changes(input, namespace = "teal.modules.clinical") + track_shiny_input_changes(input) ## split_covariates ---- observeEvent(input[[extract_input("cov_var", dataname)]], ignoreNULL = FALSE, diff --git a/R/tm_a_mmrm.R b/R/tm_a_mmrm.R index 19586e5297..aeb07bdf8a 100644 --- a/R/tm_a_mmrm.R +++ b/R/tm_a_mmrm.R @@ -845,7 +845,7 @@ srv_mmrm <- function(id, checkmate::assert_class(isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - if (shiny::isRunning()) logger::log_shiny_input_changes(input, namespace = "teal.modules.clinical") + track_shiny_input_changes(input) # Reactive responsible for sending a disable/enable signal # to show R code and debug info buttons disable_r_code <- reactiveVal(FALSE) diff --git a/R/tm_g_barchart_simple.R b/R/tm_g_barchart_simple.R index f0b603459a..f6bfcb7ff6 100644 --- a/R/tm_g_barchart_simple.R +++ b/R/tm_g_barchart_simple.R @@ -339,7 +339,8 @@ srv_g_barchart_simple <- function(id, checkmate::assert_class(isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - if (shiny::isRunning()) logger::log_shiny_input_changes(input, namespace = "teal.modules.clinical") + + track_shiny_input_changes(input) rule_dupl <- function(others) { function(value) { othervals <- lapply( diff --git a/R/tm_g_ci.R b/R/tm_g_ci.R index ef59e4bb84..ad6de8db68 100644 --- a/R/tm_g_ci.R +++ b/R/tm_g_ci.R @@ -382,7 +382,7 @@ srv_g_ci <- function(id, checkmate::assert_class(isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - if (shiny::isRunning()) logger::log_shiny_input_changes(input, namespace = "teal.modules.clinical") + track_shiny_input_changes(input) selector_list <- teal.transform::data_extract_multiple_srv( data_extract = list(x_var = x_var, y_var = y_var, color = color), datasets = data, diff --git a/R/tm_g_forest_rsp.R b/R/tm_g_forest_rsp.R index 13e866ec5f..e6cf105add 100644 --- a/R/tm_g_forest_rsp.R +++ b/R/tm_g_forest_rsp.R @@ -508,7 +508,7 @@ srv_g_forest_rsp <- function(id, checkmate::assert_class(isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - if (shiny::isRunning()) logger::log_shiny_input_changes(input, namespace = "teal.modules.clinical") + track_shiny_input_changes(input) # Setup arm variable selection, default reference arms, and default # comparison arms for encoding panel iv_arm_ref <- arm_ref_comp_observer( diff --git a/R/tm_g_forest_tte.R b/R/tm_g_forest_tte.R index 61aa9836db..7a960b9451 100644 --- a/R/tm_g_forest_tte.R +++ b/R/tm_g_forest_tte.R @@ -502,7 +502,7 @@ srv_g_forest_tte <- function(id, checkmate::assert_class(isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - if (shiny::isRunning()) logger::log_shiny_input_changes(input, namespace = "teal.modules.clinical") + track_shiny_input_changes(input) # Setup arm variable selection, default reference arms, and default # comparison arms for encoding panel iv_arm_ref <- arm_ref_comp_observer( diff --git a/R/tm_g_ipp.R b/R/tm_g_ipp.R index 8004fe3041..9888a6d5f9 100644 --- a/R/tm_g_ipp.R +++ b/R/tm_g_ipp.R @@ -482,7 +482,7 @@ srv_g_ipp <- function(id, checkmate::assert_class(isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - if (shiny::isRunning()) logger::log_shiny_input_changes(input, namespace = "teal.modules.clinical") + track_shiny_input_changes(input) selector_list <- teal.transform::data_extract_multiple_srv( datasets = data, data_extract = list( diff --git a/R/tm_g_km.R b/R/tm_g_km.R index 6cddd3586e..70829114b8 100644 --- a/R/tm_g_km.R +++ b/R/tm_g_km.R @@ -637,7 +637,7 @@ srv_g_km <- function(id, checkmate::assert_class(isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - if (shiny::isRunning()) logger::log_shiny_input_changes(input, namespace = "teal.modules.clinical") + track_shiny_input_changes(input) # Setup arm variable selection, default reference arms and default # comparison arms for encoding panel iv_arm_ref <- arm_ref_comp_observer( diff --git a/R/tm_g_lineplot.R b/R/tm_g_lineplot.R index 1b9713bcd1..b2bed44117 100644 --- a/R/tm_g_lineplot.R +++ b/R/tm_g_lineplot.R @@ -516,7 +516,7 @@ srv_g_lineplot <- function(id, checkmate::assert_class(isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - if (shiny::isRunning()) logger::log_shiny_input_changes(input, namespace = "teal.modules.clinical") + track_shiny_input_changes(input) selector_list <- teal.transform::data_extract_multiple_srv( data_extract = list(x = x, y = y, strata = strata, paramcd = paramcd, y_unit = y_unit, param = param), datasets = data, diff --git a/R/tm_g_pp_adverse_events.R b/R/tm_g_pp_adverse_events.R index 87c32dd88b..1081c4c47a 100644 --- a/R/tm_g_pp_adverse_events.R +++ b/R/tm_g_pp_adverse_events.R @@ -442,7 +442,7 @@ srv_g_adverse_events <- function(id, checkmate::assert_class(isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - if (shiny::isRunning()) logger::log_shiny_input_changes(input, namespace = "teal.modules.clinical") + track_shiny_input_changes(input) patient_id <- reactive(input$patient_id) # Init diff --git a/R/tm_g_pp_patient_timeline.R b/R/tm_g_pp_patient_timeline.R index 730e0194a0..86fb5cac96 100644 --- a/R/tm_g_pp_patient_timeline.R +++ b/R/tm_g_pp_patient_timeline.R @@ -713,7 +713,7 @@ srv_g_patient_timeline <- function(id, checkmate::assert_class(isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - if (shiny::isRunning()) logger::log_shiny_input_changes(input, namespace = "teal.modules.clinical") + track_shiny_input_changes(input) patient_id <- reactive(input$patient_id) # Init diff --git a/R/tm_g_pp_therapy.R b/R/tm_g_pp_therapy.R index 612b699438..9e83eb71c8 100644 --- a/R/tm_g_pp_therapy.R +++ b/R/tm_g_pp_therapy.R @@ -557,7 +557,7 @@ srv_g_therapy <- function(id, checkmate::assert_class(isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - if (shiny::isRunning()) logger::log_shiny_input_changes(input, namespace = "teal.modules.clinical") + track_shiny_input_changes(input) patient_id <- reactive(input$patient_id) # Init diff --git a/R/tm_g_pp_vitals.R b/R/tm_g_pp_vitals.R index 4d3fbcf1d9..041c7680eb 100644 --- a/R/tm_g_pp_vitals.R +++ b/R/tm_g_pp_vitals.R @@ -411,7 +411,7 @@ srv_g_vitals <- function(id, checkmate::assert_class(isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - if (shiny::isRunning()) logger::log_shiny_input_changes(input, namespace = "teal.modules.clinical") + track_shiny_input_changes(input) patient_id <- reactive(input$patient_id) # Init diff --git a/R/tm_t_abnormality.R b/R/tm_t_abnormality.R index 8bafc9f35a..33da8ebdfe 100644 --- a/R/tm_t_abnormality.R +++ b/R/tm_t_abnormality.R @@ -505,7 +505,7 @@ srv_t_abnormality <- function(id, checkmate::assert_class(isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - if (shiny::isRunning()) logger::log_shiny_input_changes(input, namespace = "teal.modules.clinical") + track_shiny_input_changes(input) selector_list <- teal.transform::data_extract_multiple_srv( data_extract = list( arm_var = arm_var, diff --git a/R/tm_t_abnormality_by_worst_grade.R b/R/tm_t_abnormality_by_worst_grade.R index 177b320488..7c69765211 100644 --- a/R/tm_t_abnormality_by_worst_grade.R +++ b/R/tm_t_abnormality_by_worst_grade.R @@ -503,7 +503,7 @@ srv_t_abnormality_by_worst_grade <- function(id, # nolint: object_length. checkmate::assert_class(shiny::isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - if (shiny::isRunning()) logger::log_shiny_input_changes(input, namespace = "teal.modules.clinical") + track_shiny_input_changes(input) isolate({ resolved <- teal.transform::resolve_delayed(worst_flag_indicator, as.list(data()@env)) teal.widgets::updateOptionalSelectInput( diff --git a/R/tm_t_ancova.R b/R/tm_t_ancova.R index 1190c56e20..b14bcb182d 100644 --- a/R/tm_t_ancova.R +++ b/R/tm_t_ancova.R @@ -696,7 +696,7 @@ srv_ancova <- function(id, checkmate::assert_class(shiny::isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - if (shiny::isRunning()) logger::log_shiny_input_changes(input, namespace = "teal.modules.clinical") + track_shiny_input_changes(input) # Setup arm variable selection, default reference arms, and default # comparison arms for encoding panel. iv_arco <- arm_ref_comp_observer( diff --git a/R/tm_t_binary_outcome.R b/R/tm_t_binary_outcome.R index 8ce5e39ad5..9f2598ae40 100644 --- a/R/tm_t_binary_outcome.R +++ b/R/tm_t_binary_outcome.R @@ -752,7 +752,7 @@ srv_t_binary_outcome <- function(id, checkmate::assert_class(shiny::isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - if (shiny::isRunning()) logger::log_shiny_input_changes(input, namespace = "teal.modules.clinical") + track_shiny_input_changes(input) # Setup arm variable selection, default reference arms, and default # comparison arms for encoding panel iv_arm_ref <- arm_ref_comp_observer( diff --git a/R/tm_t_coxreg.R b/R/tm_t_coxreg.R index 54ffd94a6f..466786c362 100644 --- a/R/tm_t_coxreg.R +++ b/R/tm_t_coxreg.R @@ -716,7 +716,7 @@ srv_t_coxreg <- function(id, checkmate::assert_class(shiny::isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - if (shiny::isRunning()) logger::log_shiny_input_changes(input, namespace = "teal.modules.clinical") + track_shiny_input_changes(input) # Observer to update reference and comparison arm input options. iv_arm_ref <- arm_ref_comp_observer( session, diff --git a/R/tm_t_events.R b/R/tm_t_events.R index b7e27dd67f..9f842977f7 100644 --- a/R/tm_t_events.R +++ b/R/tm_t_events.R @@ -677,7 +677,7 @@ srv_t_events_byterm <- function(id, checkmate::assert_class(shiny::isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - if (shiny::isRunning()) logger::log_shiny_input_changes(input, namespace = "teal.modules.clinical") + track_shiny_input_changes(input) selector_list <- teal.transform::data_extract_multiple_srv( data_extract = list(arm_var = arm_var, hlt = hlt, llt = llt), datasets = data, diff --git a/R/tm_t_events_by_grade.R b/R/tm_t_events_by_grade.R index 95faf4a55d..f29c4e30ed 100644 --- a/R/tm_t_events_by_grade.R +++ b/R/tm_t_events_by_grade.R @@ -1021,7 +1021,7 @@ srv_t_events_by_grade <- function(id, checkmate::assert_class(shiny::isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - if (shiny::isRunning()) logger::log_shiny_input_changes(input, namespace = "teal.modules.clinical") + track_shiny_input_changes(input) selector_list <- teal.transform::data_extract_multiple_srv( data_extract = list(arm_var = arm_var, hlt = hlt, llt = llt, grade = grade), datasets = data, diff --git a/R/tm_t_events_patyear.R b/R/tm_t_events_patyear.R index 0baad9186f..170ab7763b 100644 --- a/R/tm_t_events_patyear.R +++ b/R/tm_t_events_patyear.R @@ -401,7 +401,7 @@ srv_events_patyear <- function(id, checkmate::assert_class(shiny::isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - if (shiny::isRunning()) logger::log_shiny_input_changes(input, namespace = "teal.modules.clinical") + track_shiny_input_changes(input) observeEvent(anl_q(), { data_anl <- merged$anl_q()[["ANL"]] aval_unit_var <- merged$anl_input_r()$columns_source$avalu_var diff --git a/R/tm_t_events_summary.R b/R/tm_t_events_summary.R index 3d3becd826..ea9964d712 100644 --- a/R/tm_t_events_summary.R +++ b/R/tm_t_events_summary.R @@ -809,7 +809,7 @@ srv_t_events_summary <- function(id, checkmate::assert_class(shiny::isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - if (shiny::isRunning()) logger::log_shiny_input_changes(input, namespace = "teal.modules.clinical") + track_shiny_input_changes(input) data_extract_vars <- list( arm_var = arm_var, dthfl_var = dthfl_var, dcsreas_var = dcsreas_var, aeseq_var = aeseq_var, llt = llt diff --git a/R/tm_t_exposure.R b/R/tm_t_exposure.R index 1bcac65742..39210a0de5 100644 --- a/R/tm_t_exposure.R +++ b/R/tm_t_exposure.R @@ -489,7 +489,7 @@ srv_t_exposure <- function(id, checkmate::assert_class(data, "reactive") checkmate::assert_class(shiny::isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - if (shiny::isRunning()) logger::log_shiny_input_changes(input, namespace = "teal.modules.clinical") + track_shiny_input_changes(input) rule_intersection <- function(other) { function(value) { others <- selector_list()[[other]]()$select diff --git a/R/tm_t_logistic.R b/R/tm_t_logistic.R index 770ea428e4..1a1f5b44db 100644 --- a/R/tm_t_logistic.R +++ b/R/tm_t_logistic.R @@ -450,7 +450,7 @@ srv_t_logistic <- function(id, checkmate::assert_class(shiny::isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - if (shiny::isRunning()) logger::log_shiny_input_changes(input, namespace = "teal.modules.clinical") + track_shiny_input_changes(input) # Observer to update reference and comparison arm input options. iv_arco <- arm_ref_comp_observer( session, diff --git a/R/tm_t_mult_events.R b/R/tm_t_mult_events.R index 048afa1c82..b986d292c9 100644 --- a/R/tm_t_mult_events.R +++ b/R/tm_t_mult_events.R @@ -479,7 +479,7 @@ srv_t_mult_events_byterm <- function(id, checkmate::assert_class(shiny::isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - if (shiny::isRunning()) logger::log_shiny_input_changes(input, namespace = "teal.modules.clinical") + track_shiny_input_changes(input) selector_list <- teal.transform::data_extract_multiple_srv( data_extract = list( arm_var = arm_var, diff --git a/R/tm_t_pp_basic_info.R b/R/tm_t_pp_basic_info.R index e948427202..818844e13f 100644 --- a/R/tm_t_pp_basic_info.R +++ b/R/tm_t_pp_basic_info.R @@ -180,7 +180,7 @@ srv_t_basic_info <- function(id, checkmate::assert_class(shiny::isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - if (shiny::isRunning()) logger::log_shiny_input_changes(input, namespace = "teal.modules.clinical") + track_shiny_input_changes(input) patient_id <- reactive(input$patient_id) # Init diff --git a/R/tm_t_pp_laboratory.R b/R/tm_t_pp_laboratory.R index 35925cce9f..af5b9dbf63 100644 --- a/R/tm_t_pp_laboratory.R +++ b/R/tm_t_pp_laboratory.R @@ -376,7 +376,7 @@ srv_g_laboratory <- function(id, checkmate::assert_class(shiny::isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - if (shiny::isRunning()) logger::log_shiny_input_changes(input, namespace = "teal.modules.clinical") + track_shiny_input_changes(input) patient_id <- reactive(input$patient_id) # Init diff --git a/R/tm_t_pp_medical_history.R b/R/tm_t_pp_medical_history.R index a83eab4dd5..4a1d8ece74 100644 --- a/R/tm_t_pp_medical_history.R +++ b/R/tm_t_pp_medical_history.R @@ -244,7 +244,7 @@ srv_t_medical_history <- function(id, checkmate::assert_class(shiny::isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - if (shiny::isRunning()) logger::log_shiny_input_changes(input, namespace = "teal.modules.clinical") + track_shiny_input_changes(input) patient_id <- reactive(input$patient_id) # Init diff --git a/R/tm_t_pp_prior_medication.R b/R/tm_t_pp_prior_medication.R index ee9c5e466e..4fa422b072 100644 --- a/R/tm_t_pp_prior_medication.R +++ b/R/tm_t_pp_prior_medication.R @@ -242,7 +242,7 @@ srv_t_prior_medication <- function(id, checkmate::assert_class(shiny::isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - if (shiny::isRunning()) logger::log_shiny_input_changes(input, namespace = "teal.modules.clinical") + track_shiny_input_changes(input) patient_id <- reactive(input$patient_id) selector_list <- teal.transform::data_extract_multiple_srv( diff --git a/R/tm_t_shift_by_arm.R b/R/tm_t_shift_by_arm.R index a6abe85134..8901b0344c 100644 --- a/R/tm_t_shift_by_arm.R +++ b/R/tm_t_shift_by_arm.R @@ -436,7 +436,7 @@ srv_shift_by_arm <- function(id, checkmate::assert_class(data, "reactive") checkmate::assert_class(shiny::isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - if (shiny::isRunning()) logger::log_shiny_input_changes(input, namespace = "teal.modules.clinical") + track_shiny_input_changes(input) selector_list <- teal.transform::data_extract_multiple_srv( data_extract = list( arm_var = arm_var, diff --git a/R/tm_t_shift_by_arm_by_worst.R b/R/tm_t_shift_by_arm_by_worst.R index 31fdeffbae..d7b46172e5 100644 --- a/R/tm_t_shift_by_arm_by_worst.R +++ b/R/tm_t_shift_by_arm_by_worst.R @@ -456,7 +456,7 @@ srv_shift_by_arm_by_worst <- function(id, checkmate::assert_class(data, "reactive") checkmate::assert_class(shiny::isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - if (shiny::isRunning()) logger::log_shiny_input_changes(input, namespace = "teal.modules.clinical") + track_shiny_input_changes(input) selector_list <- teal.transform::data_extract_multiple_srv( data_extract = list( arm_var = arm_var, diff --git a/R/tm_t_shift_by_grade.R b/R/tm_t_shift_by_grade.R index 9cfdf8f00c..0541f24b66 100644 --- a/R/tm_t_shift_by_grade.R +++ b/R/tm_t_shift_by_grade.R @@ -754,7 +754,7 @@ srv_t_shift_by_grade <- function(id, checkmate::assert_class(shiny::isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - if (shiny::isRunning()) logger::log_shiny_input_changes(input, namespace = "teal.modules.clinical") + track_shiny_input_changes(input) selector_list <- teal.transform::data_extract_multiple_srv( data_extract = list( arm_var = arm_var, diff --git a/R/tm_t_smq.R b/R/tm_t_smq.R index 5209dbe167..4d1f24e13c 100644 --- a/R/tm_t_smq.R +++ b/R/tm_t_smq.R @@ -543,7 +543,7 @@ srv_t_smq <- function(id, checkmate::assert_class(data, "reactive") checkmate::assert_class(shiny::isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - if (shiny::isRunning()) logger::log_shiny_input_changes(input, namespace = "teal.modules.clinical") + track_shiny_input_changes(input) selector_list <- teal.transform::data_extract_multiple_srv( data_extract = list( scopes = scopes, diff --git a/R/tm_t_summary.R b/R/tm_t_summary.R index 13a4411c4d..582bc2d144 100644 --- a/R/tm_t_summary.R +++ b/R/tm_t_summary.R @@ -404,7 +404,7 @@ srv_summary <- function(id, checkmate::assert_class(data, "reactive") checkmate::assert_class(shiny::isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - if (shiny::isRunning()) logger::log_shiny_input_changes(input, namespace = "teal.modules.clinical") + track_shiny_input_changes(input) selector_list <- teal.transform::data_extract_multiple_srv( data_extract = list(arm_var = arm_var, summarize_vars = summarize_vars), datasets = data, diff --git a/R/tm_t_summary_by.R b/R/tm_t_summary_by.R index c8d7cbe53d..83375eb25f 100644 --- a/R/tm_t_summary_by.R +++ b/R/tm_t_summary_by.R @@ -598,7 +598,7 @@ srv_summary_by <- function(id, checkmate::assert_class(shiny::isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - if (shiny::isRunning()) logger::log_shiny_input_changes(input, namespace = "teal.modules.clinical") + track_shiny_input_changes(input) vars <- list(arm_var = arm_var, id_var = id_var, summarize_vars = summarize_vars, by_vars = by_vars) if (!is.null(paramcd)) { diff --git a/R/tm_t_tte.R b/R/tm_t_tte.R index bd2e82d559..d42a60bf92 100644 --- a/R/tm_t_tte.R +++ b/R/tm_t_tte.R @@ -754,7 +754,7 @@ srv_t_tte <- function(id, checkmate::assert_class(data, "reactive") checkmate::assert_class(shiny::isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - if (shiny::isRunning()) logger::log_shiny_input_changes(input, namespace = "teal.modules.clinical") + track_shiny_input_changes(input) # Setup arm variable selection, default reference arms, and default # comparison arms for encoding panel iv_arm_ref <- arm_ref_comp_observer( diff --git a/R/utils.R b/R/utils.R index 069b699075..108c7676d6 100644 --- a/R/utils.R +++ b/R/utils.R @@ -946,3 +946,21 @@ set_default_total_label <- function(total_label) { # for mocking in tests interactive <- NULL + + +track_shiny_input_changes <- function(input){ + if (shiny::isRunning()) { + + plot_nss <- c("mmrm", "myplot", "chart", "patient_timeline_plot", "therapy_plot", "vitals_plot") + + elements <- c("plot_modal_width", "flex_width", "plot_modal_height", "flex_height") + + exclude_inputs <- unlist(lapply(plot_nss, paste, elements, sep = "-")) + logger::log_shiny_input_changes( + input, + level = logger::DEBUG, + namespace = "teal.modules.clinical", + exclude = exclude_inputs + ) + } +} From eddac0f21442254a408078535f454669b3bf9639 Mon Sep 17 00:00:00 2001 From: m7pr Date: Fri, 7 Jun 2024 16:37:08 +0200 Subject: [PATCH 03/14] typo --- R/utils.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/R/utils.R b/R/utils.R index 108c7676d6..c8eb426360 100644 --- a/R/utils.R +++ b/R/utils.R @@ -951,14 +951,14 @@ interactive <- NULL track_shiny_input_changes <- function(input){ if (shiny::isRunning()) { - plot_nss <- c("mmrm", "myplot", "chart", "patient_timeline_plot", "therapy_plot", "vitals_plot") + plot_nss <- c("mmrm_plot", "myplot", "chart", "patient_timeline_plot", "therapy_plot", "vitals_plot") elements <- c("plot_modal_width", "flex_width", "plot_modal_height", "flex_height") exclude_inputs <- unlist(lapply(plot_nss, paste, elements, sep = "-")) logger::log_shiny_input_changes( input, - level = logger::DEBUG, + level = logger::TRACE, namespace = "teal.modules.clinical", exclude = exclude_inputs ) From 51cee5839b60db896c7b5a81004cd66219bab758 Mon Sep 17 00:00:00 2001 From: m7pr Date: Wed, 12 Jun 2024 15:13:44 +0200 Subject: [PATCH 04/14] unify namespaces for plots --- R/tm_a_mmrm.R | 4 +- R/tm_g_barchart_simple.R | 4 +- R/tm_g_ci.R | 4 +- R/tm_g_forest_rsp.R | 4 +- R/tm_g_forest_tte.R | 4 +- R/tm_g_ipp.R | 4 +- R/tm_g_km.R | 4 +- R/tm_g_lineplot.R | 4 +- R/tm_g_pp_adverse_events.R | 4 +- R/tm_g_pp_patient_timeline.R | 6 +- R/tm_g_pp_therapy.R | 6 +- R/tm_g_pp_vitals.R | 4 +- tests/testthat/test-shinytest2-tm_a_mmrm.R | 26 +++---- .../test-shinytest2-tm_g_barchart_simple.R | 16 ++--- tests/testthat/test-shinytest2-tm_g_ci.R | 42 +++++------ .../test-shinytest2-tm_g_forest_rsp.R | 44 ++++++------ .../test-shinytest2-tm_g_forest_tte.R | 12 ++-- tests/testthat/test-shinytest2-tm_g_ipp.R | 42 +++++------ tests/testthat/test-shinytest2-tm_g_km.R | 34 ++++----- .../testthat/test-shinytest2-tm_g_lineplot.R | 24 +++---- .../test-shinytest2-tm_g_pp_adverse_events.R | 30 ++++---- ...test-shinytest2-tm_g_pp_patient_timeline.R | 72 +++++++++---------- .../test-shinytest2-tm_g_pp_therapy.R | 8 +-- .../testthat/test-shinytest2-tm_g_pp_vitals.R | 28 ++++---- 24 files changed, 215 insertions(+), 215 deletions(-) diff --git a/R/tm_a_mmrm.R b/R/tm_a_mmrm.R index aeb07bdf8a..2d62f5ddec 100644 --- a/R/tm_a_mmrm.R +++ b/R/tm_a_mmrm.R @@ -624,7 +624,7 @@ ui_mmrm <- function(id, ...) { textOutput(ns("null_input_msg")), tags$h3(textOutput(ns("mmrm_title"))), teal.widgets::table_with_settings_ui(ns("mmrm_table")), - teal.widgets::plot_with_settings_ui(id = ns("mmrm_plot")) + teal.widgets::plot_with_settings_ui(id = ns("tmcplot")) ), encoding = tags$div( ### Reporter @@ -1421,7 +1421,7 @@ srv_mmrm <- function(id, }) pws <- teal.widgets::plot_with_settings_srv( - id = "mmrm_plot", + id = "tmcplot", plot_r = plot_r, height = plot_height, width = plot_width, diff --git a/R/tm_g_barchart_simple.R b/R/tm_g_barchart_simple.R index f6bfcb7ff6..744958a2af 100644 --- a/R/tm_g_barchart_simple.R +++ b/R/tm_g_barchart_simple.R @@ -204,7 +204,7 @@ ui_g_barchart_simple <- function(id, ...) { ), teal.widgets::standard_layout( output = teal.widgets::white_small_well( - teal.widgets::plot_with_settings_ui(id = ns("myplot")), + teal.widgets::plot_with_settings_ui(id = ns("tmcplot")), uiOutput(ns("table"), class = "overflow-y-scroll max-h-250") ), encoding = tags$div( @@ -537,7 +537,7 @@ srv_g_barchart_simple <- function(id, # Insert the plot into a plot with settings module from teal.widgets pws <- teal.widgets::plot_with_settings_srv( - id = "myplot", + id = "tmcplot", plot_r = plot_r, height = plot_height, width = plot_width diff --git a/R/tm_g_ci.R b/R/tm_g_ci.R index ad6de8db68..d6538218e1 100644 --- a/R/tm_g_ci.R +++ b/R/tm_g_ci.R @@ -319,7 +319,7 @@ ui_g_ci <- function(id, ...) { args <- list(...) teal.widgets::standard_layout( - output = teal.widgets::plot_with_settings_ui(id = ns("myplot")), + output = teal.widgets::plot_with_settings_ui(id = ns("tmcplot")), encoding = tags$div( ### Reporter teal.reporter::simple_reporter_ui(ns("simple_reporter")), @@ -474,7 +474,7 @@ srv_g_ci <- function(id, ) pws <- teal.widgets::plot_with_settings_srv( - id = "myplot", + id = "tmcplot", plot_r = plot_r, height = plot_height, width = plot_width diff --git a/R/tm_g_forest_rsp.R b/R/tm_g_forest_rsp.R index e6cf105add..2ca831e466 100644 --- a/R/tm_g_forest_rsp.R +++ b/R/tm_g_forest_rsp.R @@ -398,7 +398,7 @@ ui_g_forest_rsp <- function(id, ...) { ns <- NS(id) teal.widgets::standard_layout( - output = teal.widgets::plot_with_settings_ui(id = ns("myplot")), + output = teal.widgets::plot_with_settings_ui(id = ns("tmcplot")), encoding = tags$div( ### Reporter teal.reporter::simple_reporter_ui(ns("simple_reporter")), @@ -734,7 +734,7 @@ srv_g_forest_rsp <- function(id, plot_r <- reactive(all_q()[["p"]]) pws <- teal.widgets::plot_with_settings_srv( - id = "myplot", + id = "tmcplot", plot_r = plot_r, height = plot_height, width = plot_width diff --git a/R/tm_g_forest_tte.R b/R/tm_g_forest_tte.R index 7a960b9451..371ef0c3b5 100644 --- a/R/tm_g_forest_tte.R +++ b/R/tm_g_forest_tte.R @@ -387,7 +387,7 @@ ui_g_forest_tte <- function(id, ...) { ns <- NS(id) teal.widgets::standard_layout( - output = teal.widgets::plot_with_settings_ui(id = ns("myplot")), + output = teal.widgets::plot_with_settings_ui(id = ns("tmcplot")), encoding = tags$div( ### Reporter teal.reporter::simple_reporter_ui(ns("simple_reporter")), @@ -659,7 +659,7 @@ srv_g_forest_tte <- function(id, plot_r <- reactive(all_q()[["p"]]) pws <- teal.widgets::plot_with_settings_srv( - id = "myplot", + id = "tmcplot", plot_r = plot_r, height = plot_height, width = plot_width diff --git a/R/tm_g_ipp.R b/R/tm_g_ipp.R index 9888a6d5f9..cd3b57af68 100644 --- a/R/tm_g_ipp.R +++ b/R/tm_g_ipp.R @@ -373,7 +373,7 @@ ui_g_ipp <- function(id, ...) { ns <- NS(id) teal.widgets::standard_layout( - output = teal.widgets::plot_with_settings_ui(id = ns("myplot")), + output = teal.widgets::plot_with_settings_ui(id = ns("tmcplot")), encoding = tags$div( ### Reporter teal.reporter::simple_reporter_ui(ns("simple_reporter")), @@ -611,7 +611,7 @@ srv_g_ipp <- function(id, # Insert the plot into a plot with settings module from teal.widgets pws <- teal.widgets::plot_with_settings_srv( - id = "myplot", + id = "tmcplot", plot_r = plot_r, height = plot_height, width = plot_width diff --git a/R/tm_g_km.R b/R/tm_g_km.R index 70829114b8..644f53998e 100644 --- a/R/tm_g_km.R +++ b/R/tm_g_km.R @@ -436,7 +436,7 @@ ui_g_km <- function(id, ...) { output = teal.widgets::white_small_well( verbatimTextOutput(outputId = ns("text")), teal.widgets::plot_with_settings_ui( - id = ns("myplot") + id = ns("tmcplot") ) ), encoding = tags$div( @@ -808,7 +808,7 @@ srv_g_km <- function(id, # Insert the plot into a plot with settings module from teal.widgets pws <- teal.widgets::plot_with_settings_srv( - id = "myplot", + id = "tmcplot", plot_r = plot_r, height = plot_height, width = plot_width diff --git a/R/tm_g_lineplot.R b/R/tm_g_lineplot.R index b2bed44117..289bab5c5e 100644 --- a/R/tm_g_lineplot.R +++ b/R/tm_g_lineplot.R @@ -354,7 +354,7 @@ ui_g_lineplot <- function(id, ...) { output = teal.widgets::white_small_well( verbatimTextOutput(outputId = ns("text")), teal.widgets::plot_with_settings_ui( - id = ns("myplot") + id = ns("tmcplot") ) ), encoding = tags$div( @@ -628,7 +628,7 @@ srv_g_lineplot <- function(id, # Insert the plot into a plot with settings module from teal.widgets pws <- teal.widgets::plot_with_settings_srv( - id = "myplot", + id = "tmcplot", plot_r = plot_r, height = plot_height, width = plot_width diff --git a/R/tm_g_pp_adverse_events.R b/R/tm_g_pp_adverse_events.R index 1081c4c47a..a04fee5422 100644 --- a/R/tm_g_pp_adverse_events.R +++ b/R/tm_g_pp_adverse_events.R @@ -335,7 +335,7 @@ ui_g_adverse_events <- function(id, ...) { htmlOutput(ns("title")), teal.widgets::get_dt_rows(ns("table"), ns("table_rows")), DT::DTOutput(outputId = ns("table")), - teal.widgets::plot_with_settings_ui(id = ns("chart")) + teal.widgets::plot_with_settings_ui(id = ns("tmcplot")) ), encoding = tags$div( ### Reporter @@ -565,7 +565,7 @@ srv_g_adverse_events <- function(id, }) pws <- teal.widgets::plot_with_settings_srv( - id = "chart", + id = "tmcplot", plot_r = plot_r, height = plot_height, width = plot_width diff --git a/R/tm_g_pp_patient_timeline.R b/R/tm_g_pp_patient_timeline.R index 86fb5cac96..bbaca9cde6 100644 --- a/R/tm_g_pp_patient_timeline.R +++ b/R/tm_g_pp_patient_timeline.R @@ -562,7 +562,7 @@ ui_g_patient_timeline <- function(id, ...) { ns <- NS(id) teal.widgets::standard_layout( - output = teal.widgets::plot_with_settings_ui(id = ns("patient_timeline_plot")), + output = teal.widgets::plot_with_settings_ui(id = ns("tmcplot")), encoding = tags$div( ### Reporter teal.reporter::simple_reporter_ui(ns("simple_reporter")), @@ -903,10 +903,10 @@ srv_g_patient_timeline <- function(id, teal.code::eval_code(object = qenv, as.expression(patient_timeline_calls)) }) - plot_r <- reactive(all_q()[["patient_timeline_plot"]]) + plot_r <- reactive(all_q()[["tmcplot"]]) pws <- teal.widgets::plot_with_settings_srv( - id = "patient_timeline_plot", + id = "tmcplot", plot_r = plot_r, height = plot_height, width = plot_width diff --git a/R/tm_g_pp_therapy.R b/R/tm_g_pp_therapy.R index 9e83eb71c8..c94bda1ddc 100644 --- a/R/tm_g_pp_therapy.R +++ b/R/tm_g_pp_therapy.R @@ -432,7 +432,7 @@ ui_g_therapy <- function(id, ...) { htmlOutput(ns("title")), teal.widgets::get_dt_rows(ns("therapy_table"), ns("therapy_table_rows")), DT::DTOutput(outputId = ns("therapy_table")), - teal.widgets::plot_with_settings_ui(id = ns("therapy_plot")) + teal.widgets::plot_with_settings_ui(id = ns("tmcplot")) ), encoding = tags$div( ### Reporter @@ -681,11 +681,11 @@ srv_g_therapy <- function(id, plot_r <- reactive({ req(iv_r()$is_valid()) - all_q()[["therapy_plot"]] + all_q()[["tmcplot"]] }) pws <- teal.widgets::plot_with_settings_srv( - id = "therapy_plot", + id = "tmcplot", plot_r = plot_r, height = plot_height, width = plot_width diff --git a/R/tm_g_pp_vitals.R b/R/tm_g_pp_vitals.R index 041c7680eb..a754427b33 100644 --- a/R/tm_g_pp_vitals.R +++ b/R/tm_g_pp_vitals.R @@ -341,7 +341,7 @@ ui_g_vitals <- function(id, ...) { ns <- NS(id) teal.widgets::standard_layout( - output = teal.widgets::plot_with_settings_ui(id = ns("vitals_plot")), + output = teal.widgets::plot_with_settings_ui(id = ns("tmcplot")), encoding = tags$div( ### Reporter teal.reporter::simple_reporter_ui(ns("simple_reporter")), @@ -551,7 +551,7 @@ srv_g_vitals <- function(id, plot_r <- reactive(all_q()[["result_plot"]]) pws <- teal.widgets::plot_with_settings_srv( - id = "vitals_plot", + id = "tmcplot", plot_r = plot_r, height = plot_height, width = plot_width diff --git a/tests/testthat/test-shinytest2-tm_a_mmrm.R b/tests/testthat/test-shinytest2-tm_a_mmrm.R index d992fcb4e6..529ba4bf2b 100644 --- a/tests/testthat/test-shinytest2-tm_a_mmrm.R +++ b/tests/testthat/test-shinytest2-tm_a_mmrm.R @@ -192,7 +192,7 @@ testthat::test_that( app_driver$set_active_module_input("output_function", "g_mmrm_lsmeans", wait_ = FALSE) app_driver$expect_no_validation_error() - plot_before <- app_driver$get_active_module_plot_output("mmrm_plot") + plot_before <- app_driver$get_active_module_plot_output("tmcplot") testthat::expect_match(plot_before, "data:image/png;base64,") app_driver$set_active_module_input("g_mmrm_lsmeans_select", "estimates") @@ -212,7 +212,7 @@ testthat::test_that( app_driver$set_active_module_input("g_mmrm_lsmeans_contrasts_show_pval", TRUE) app_driver$expect_no_validation_error() - plot <- app_driver$get_active_module_plot_output("mmrm_plot") + plot <- app_driver$get_active_module_plot_output("tmcplot") testthat::expect_match(plot, "data:image/png;base64,") testthat::expect_false(identical(plot_before, plot)) @@ -233,13 +233,13 @@ testthat::test_that( app_driver$set_active_module_input("output_function", "g_mmrm_diagnostic", wait_ = FALSE) app_driver$expect_no_validation_error() - plot_before <- app_driver$get_active_module_plot_output("mmrm_plot") + plot_before <- app_driver$get_active_module_plot_output("tmcplot") testthat::expect_match(plot_before, "data:image/png;base64,") app_driver$set_active_module_input("g_mmrm_diagnostic_type", "q-q-residual") app_driver$expect_no_validation_error() - plot <- app_driver$get_active_module_plot_output("mmrm_plot") + plot <- app_driver$get_active_module_plot_output("tmcplot") testthat::expect_match(plot, "data:image/png;base64,") testthat::expect_false(identical(plot_before, plot)) @@ -262,7 +262,7 @@ for (func in output_functions) { app_driver$set_active_module_input("aval_var-dataset_ADQS_singleextract-select", character(0L)) if (grepl("^g_", func)) { - testthat::expect_identical(app_driver$get_active_module_plot_output("mmrm_plot"), character(0)) + testthat::expect_identical(app_driver$get_active_module_plot_output("tmcplot"), character(0)) } else { testthat::expect_identical( app_driver$get_active_module_table_output("mmrm_table-table-with-settings"), data.frame() @@ -297,7 +297,7 @@ for (func in output_functions) { app_driver$set_active_module_input("paramcd-dataset_ADQS_singleextract-filter1-vals", character(0L)) if (grepl("^g_", func)) { - testthat::expect_identical(app_driver$get_active_module_plot_output("mmrm_plot"), character(0)) + testthat::expect_identical(app_driver$get_active_module_plot_output("tmcplot"), character(0)) } else { testthat::expect_identical( app_driver$get_active_module_table_output("mmrm_table-table-with-settings"), data.frame() @@ -332,7 +332,7 @@ for (func in output_functions) { app_driver$set_active_module_input("visit_var-dataset_ADQS_singleextract-select", character(0L)) if (grepl("^g_", func)) { - testthat::expect_identical(app_driver$get_active_module_plot_output("mmrm_plot"), character(0)) + testthat::expect_identical(app_driver$get_active_module_plot_output("tmcplot"), character(0)) } else { testthat::expect_identical( app_driver$get_active_module_table_output("mmrm_table-table-with-settings"), data.frame() @@ -367,7 +367,7 @@ for (func in output_functions) { app_driver$set_active_module_input("arm_var-dataset_ADSL_singleextract-select", character(0L)) if (grepl("^g_", func)) { - testthat::expect_identical(app_driver$get_active_module_plot_output("mmrm_plot"), character(0)) + testthat::expect_identical(app_driver$get_active_module_plot_output("tmcplot"), character(0)) } else { testthat::expect_identical( app_driver$get_active_module_table_output("mmrm_table-table-with-settings"), data.frame() @@ -402,7 +402,7 @@ for (func in output_functions) { app_driver$set_active_module_input("id_var-dataset_ADQS_singleextract-select", character(0L)) if (grepl("^g_", func)) { - testthat::expect_identical(app_driver$get_active_module_plot_output("mmrm_plot"), character(0)) + testthat::expect_identical(app_driver$get_active_module_plot_output("tmcplot"), character(0)) } else { testthat::expect_identical( app_driver$get_active_module_table_output("mmrm_table-table-with-settings"), data.frame() @@ -437,7 +437,7 @@ for (func in output_functions) { app_driver$set_active_module_input("conf_level", numeric(0L)) if (grepl("^g_", func)) { - testthat::expect_identical(app_driver$get_active_module_plot_output("mmrm_plot"), character(0)) + testthat::expect_identical(app_driver$get_active_module_plot_output("tmcplot"), character(0)) } else { testthat::expect_identical( app_driver$get_active_module_table_output("mmrm_table-table-with-settings"), data.frame() @@ -504,7 +504,7 @@ for (func in output_functions) { if (grepl("^g_", func)) { - plot_before <- app_driver$get_active_module_plot_output("mmrm_plot") + plot_before <- app_driver$get_active_module_plot_output("tmcplot") } else { table_before <- app_driver$get_active_module_table_output("mmrm_table-table-with-settings") } @@ -524,10 +524,10 @@ for (func in output_functions) { testthat::expect_false( identical( plot_before, - app_driver$get_active_module_plot_output("mmrm_plot") + app_driver$get_active_module_plot_output("tmcplot") ) ) - plot_before <- app_driver$get_active_module_plot_output("mmrm_plot") + plot_before <- app_driver$get_active_module_plot_output("tmcplot") } else { testthat::expect_false( identical( diff --git a/tests/testthat/test-shinytest2-tm_g_barchart_simple.R b/tests/testthat/test-shinytest2-tm_g_barchart_simple.R index b77376da53..c1c9e4f5f4 100644 --- a/tests/testthat/test-shinytest2-tm_g_barchart_simple.R +++ b/tests/testthat/test-shinytest2-tm_g_barchart_simple.R @@ -195,9 +195,9 @@ testthat::test_that( { skip_if_too_deep(5) app_driver <- app_driver_tm_g_barchart_simple() - plot_before <- app_driver$get_active_module_plot_output("myplot") + plot_before <- app_driver$get_active_module_plot_output("tmcplot") app_driver$set_active_module_input(ns_des_input("x", "ADSL", "select"), "RACE") - testthat::expect_false(identical(plot_before, app_driver$get_active_module_plot_output("myplot"))) + testthat::expect_false(identical(plot_before, app_driver$get_active_module_plot_output("tmcplot"))) app_driver$expect_no_validation_error() app_driver$stop() } @@ -231,9 +231,9 @@ test_dataset_selection <- function(input_id, new_dataset, new_value) { { skip_if_too_deep(5) app_driver <- app_driver_tm_g_barchart_simple() - plot_before <- app_driver$get_active_module_plot_output("myplot") + plot_before <- app_driver$get_active_module_plot_output("tmcplot") app_driver$set_active_module_input(sprintf("%s-dataset", input_id), new_dataset) - testthat::expect_false(identical(plot_before, app_driver$get_active_module_plot_output("myplot"))) + testthat::expect_false(identical(plot_before, app_driver$get_active_module_plot_output("tmcplot"))) testthat::expect_null(app_driver$get_active_module_input(ns_des_input(input_id, new_dataset, "select"))) app_driver$set_active_module_input(ns_des_input(input_id, new_dataset, "select"), new_value) testthat::expect_identical( @@ -254,10 +254,10 @@ test_dataset_selection <- function(input_id, new_dataset, new_value) { { skip_if_too_deep(5) app_driver <- app_driver_tm_g_barchart_simple() - plot_before <- app_driver$get_active_module_plot_output("myplot") + plot_before <- app_driver$get_active_module_plot_output("tmcplot") app_driver$set_active_module_input(sprintf("%s-dataset", input_id), character(0L)) testthat::expect_null(app_driver$get_active_module_input(input_id)) - testthat::expect_false(identical(plot_before, app_driver$get_active_module_plot_output("myplot"))) + testthat::expect_false(identical(plot_before, app_driver$get_active_module_plot_output("tmcplot"))) app_driver$expect_no_validation_error() app_driver$stop() } @@ -321,9 +321,9 @@ test_that_plot_settings <- function(input_id, new_value, setup_fun = function(ap skip_if_too_deep(5) app_driver <- app_driver_tm_g_barchart_simple() setup_fun(app_driver) - plot_before <- app_driver$get_active_module_plot_output("myplot") + plot_before <- app_driver$get_active_module_plot_output("tmcplot") app_driver$set_active_module_input(input_id, new_value) - testthat::expect_false(identical(plot_before, app_driver$get_active_module_plot_output("myplot"))) + testthat::expect_false(identical(plot_before, app_driver$get_active_module_plot_output("tmcplot"))) app_driver$expect_no_validation_error() app_driver$stop() } diff --git a/tests/testthat/test-shinytest2-tm_g_ci.R b/tests/testthat/test-shinytest2-tm_g_ci.R index bcc79ed8f5..f3fca13638 100644 --- a/tests/testthat/test-shinytest2-tm_g_ci.R +++ b/tests/testthat/test-shinytest2-tm_g_ci.R @@ -76,7 +76,7 @@ testthat::test_that("e2e - tm_g_ci: Module initializes in teal without errors an app_driver <- app_driver_tm_g_ci() app_driver$expect_no_shiny_error() app_driver$expect_no_validation_error() - testthat::expect_match(app_driver$get_active_module_plot_output("myplot"), "data:image/png;base64,") + testthat::expect_match(app_driver$get_active_module_plot_output("tmcplot"), "data:image/png;base64,") app_driver$stop() }) @@ -140,12 +140,12 @@ testthat::test_that( testthat::test_that("e2e - tm_g_ci: Selecting x_var column changes plot and doesn't throw validation errors.", { skip_if_too_deep(5) app_driver <- app_driver_tm_g_ci() - plot_before <- app_driver$get_active_module_plot_output("myplot") + plot_before <- app_driver$get_active_module_plot_output("tmcplot") app_driver$set_active_module_input("x_var-dataset_ADSL_singleextract-select", "BMRKR2") testthat::expect_false( identical( plot_before, - app_driver$get_active_module_plot_output("myplot") + app_driver$get_active_module_plot_output("tmcplot") ) ) app_driver$expect_no_validation_error() @@ -156,7 +156,7 @@ testthat::test_that("e2e - tm_g_ci: Deselecting x_var column throws validation e skip_if_too_deep(5) app_driver <- app_driver_tm_g_ci() app_driver$set_active_module_input("x_var-dataset_ADSL_singleextract-select", character(0)) - testthat::expect_identical(app_driver$get_active_module_plot_output("myplot"), character(0)) + testthat::expect_identical(app_driver$get_active_module_plot_output("tmcplot"), character(0)) app_driver$expect_validation_error() testthat::expect_identical( app_driver$active_module_element_text("x_var-dataset_ADSL_singleextract-select_input > div > span"), @@ -168,12 +168,12 @@ testthat::test_that("e2e - tm_g_ci: Deselecting x_var column throws validation e testthat::test_that("e2e - tm_g_ci: Selecting y_var column changes plot and doesn't throw validation errors.", { skip_if_too_deep(5) app_driver <- app_driver_tm_g_ci() - plot_before <- app_driver$get_active_module_plot_output("myplot") + plot_before <- app_driver$get_active_module_plot_output("tmcplot") app_driver$set_active_module_input("y_var-dataset_ADLB_singleextract-select", "CHG2") testthat::expect_false( identical( plot_before, - app_driver$get_active_module_plot_output("myplot") + app_driver$get_active_module_plot_output("tmcplot") ) ) app_driver$expect_no_validation_error() @@ -184,7 +184,7 @@ testthat::test_that("e2e - tm_g_ci: Deselecting y_var column throws validation e skip_if_too_deep(5) app_driver <- app_driver_tm_g_ci() app_driver$set_active_module_input("y_var-dataset_ADLB_singleextract-select", character(0)) - testthat::expect_identical(app_driver$get_active_module_plot_output("myplot"), character(0)) + testthat::expect_identical(app_driver$get_active_module_plot_output("tmcplot"), character(0)) testthat::expect_identical( app_driver$active_module_element_text("y_var-dataset_ADLB_singleextract-select_input > div > span"), "Select an analysis value (y axis)" @@ -198,12 +198,12 @@ testthat::test_that( { skip_if_too_deep(5) app_driver <- app_driver_tm_g_ci() - plot_before <- app_driver$get_active_module_plot_output("myplot") + plot_before <- app_driver$get_active_module_plot_output("tmcplot") app_driver$set_active_module_input("y_var-dataset_ADLB_singleextract-filter1-vals", "CRP") testthat::expect_false( identical( plot_before, - app_driver$get_active_module_plot_output("myplot") + app_driver$get_active_module_plot_output("tmcplot") ) ) app_driver$expect_no_validation_error() @@ -215,7 +215,7 @@ testthat::test_that("e2e - tm_g_ci: Deselecting PARAMCD filter value throws vali skip_if_too_deep(5) app_driver <- app_driver_tm_g_ci() app_driver$set_active_module_input("y_var-dataset_ADLB_singleextract-filter1-vals", character(0)) - testthat::expect_identical(app_driver$get_active_module_plot_output("myplot"), character(0)) + testthat::expect_identical(app_driver$get_active_module_plot_output("tmcplot"), character(0)) testthat::expect_identical( app_driver$active_module_element_text("y_var-dataset_ADLB_singleextract-filter1-vals_input > div > span"), "Please select the filters." @@ -227,9 +227,9 @@ testthat::test_that("e2e - tm_g_ci: Deselecting PARAMCD filter value throws vali testthat::test_that("e2e - tm_g_ci: Selecting AVISIT filter value doesn't throw validation errors.", { skip_if_too_deep(5) app_driver <- app_driver_tm_g_ci() - plot_before <- app_driver$get_active_module_plot_output("myplot") + plot_before <- app_driver$get_active_module_plot_output("tmcplot") app_driver$set_active_module_input("y_var-dataset_ADLB_singleextract-filter2-vals", "BASELINE") - testthat::expect_false(identical(plot_before, app_driver$get_active_module_plot_output("myplot"))) + testthat::expect_false(identical(plot_before, app_driver$get_active_module_plot_output("tmcplot"))) app_driver$expect_no_validation_error() app_driver$stop() }) @@ -238,7 +238,7 @@ testthat::test_that("e2e - tm_g_ci: Deselecting AVISIT filter value throws valid skip_if_too_deep(5) app_driver <- app_driver_tm_g_ci() app_driver$set_active_module_input("y_var-dataset_ADLB_singleextract-filter2-vals", character(0)) - testthat::expect_identical(app_driver$get_active_module_plot_output("myplot"), character(0)) + testthat::expect_identical(app_driver$get_active_module_plot_output("tmcplot"), character(0)) testthat::expect_identical( app_driver$active_module_element_text("y_var-dataset_ADLB_singleextract-filter2-vals_input > div > span"), "Please select the filters." @@ -250,9 +250,9 @@ testthat::test_that("e2e - tm_g_ci: Deselecting AVISIT filter value throws valid testthat::test_that("e2e - tm_g_ci: Selecting color column changes plot output and doesn't throw validation errors.", { skip_if_too_deep(5) app_driver <- app_driver_tm_g_ci() - plot_before <- app_driver$get_active_module_plot_output("myplot") + plot_before <- app_driver$get_active_module_plot_output("tmcplot") app_driver$set_active_module_input("color-dataset_ADSL_singleextract-select", "SEX") - testthat::expect_false(identical(plot_before, app_driver$get_active_module_plot_output("myplot"))) + testthat::expect_false(identical(plot_before, app_driver$get_active_module_plot_output("tmcplot"))) app_driver$expect_no_validation_error() app_driver$stop() }) @@ -260,9 +260,9 @@ testthat::test_that("e2e - tm_g_ci: Selecting color column changes plot output a testthat::test_that("e2e - tm_g_ci: Deselecting color column changes plot output and doesn't throw validation error.", { skip_if_too_deep(5) app_driver <- app_driver_tm_g_ci() - plot_before <- app_driver$get_active_module_plot_output("myplot") + plot_before <- app_driver$get_active_module_plot_output("tmcplot") app_driver$set_active_module_input("color-dataset_ADSL_singleextract-select", character(0)) - testthat::expect_false(identical(plot_before, app_driver$get_active_module_plot_output("myplot"))) + testthat::expect_false(identical(plot_before, app_driver$get_active_module_plot_output("tmcplot"))) app_driver$expect_no_validation_error() app_driver$stop() }) @@ -270,9 +270,9 @@ testthat::test_that("e2e - tm_g_ci: Deselecting color column changes plot output testthat::test_that("e2e - tm_g_ci: Selecting confidence interval value changes plot and doesn't throw any errors.", { skip_if_too_deep(5) app_driver <- app_driver_tm_g_ci() - plot_before <- app_driver$get_active_module_plot_output("myplot") + plot_before <- app_driver$get_active_module_plot_output("tmcplot") app_driver$set_active_module_input("conf_level", 0.90) - testthat::expect_false(identical(plot_before, app_driver$get_active_module_plot_output("myplot"))) + testthat::expect_false(identical(plot_before, app_driver$get_active_module_plot_output("tmcplot"))) app_driver$expect_no_validation_error() app_driver$stop() }) @@ -281,9 +281,9 @@ testthat::test_that("e2e - tm_g_ci: Selecting confidence interval value changes testthat::test_that("e2e - tm_g_ci: Selecting statistic to use changes a plot and doesn't throw any errors.", { skip_if_too_deep(5) app_driver <- app_driver_tm_g_ci() - plot_before <- app_driver$get_active_module_plot_output("myplot") + plot_before <- app_driver$get_active_module_plot_output("tmcplot") app_driver$set_active_module_input("stat", "median") - testthat::expect_false(identical(plot_before, app_driver$get_active_module_plot_output("myplot"))) + testthat::expect_false(identical(plot_before, app_driver$get_active_module_plot_output("tmcplot"))) app_driver$expect_no_validation_error() app_driver$stop() }) diff --git a/tests/testthat/test-shinytest2-tm_g_forest_rsp.R b/tests/testthat/test-shinytest2-tm_g_forest_rsp.R index 485e471e4b..5bbd97ac1a 100644 --- a/tests/testthat/test-shinytest2-tm_g_forest_rsp.R +++ b/tests/testthat/test-shinytest2-tm_g_forest_rsp.R @@ -162,9 +162,9 @@ testthat::test_that( testthat::test_that("e2e - tm_g_forest_rsp: Selecting arm_var changes plot and doesn't throw validation errors.", { skip_if_too_deep(5) app_driver <- app_driver_tm_g_forest_rsp() - plot_before <- app_driver$get_active_module_plot_output("myplot") + plot_before <- app_driver$get_active_module_plot_output("tmcplot") app_driver$set_active_module_input("arm_var-dataset_ADSL_singleextract-select", "ARM") - testthat::expect_false(identical(plot_before, app_driver$get_active_module_plot_output("myplot"))) + testthat::expect_false(identical(plot_before, app_driver$get_active_module_plot_output("tmcplot"))) app_driver$expect_no_validation_error() app_driver$stop() }) @@ -184,9 +184,9 @@ testthat::test_that("e2e - tm_g_forest_rsp: Deselecting arm_var throws validatio testthat::test_that("e2e - tm_g_forest_rsp: Selecting paramcd changes plot and doesn't throw validation errors.", { skip_if_too_deep(5) app_driver <- app_driver_tm_g_forest_rsp() - plot_before <- app_driver$get_active_module_plot_output("myplot") + plot_before <- app_driver$get_active_module_plot_output("tmcplot") app_driver$set_active_module_input("paramcd-dataset_ADRS_singleextract-filter1-vals", "OVRINV") - testthat::expect_false(identical(plot_before, app_driver$get_active_module_plot_output("myplot"))) + testthat::expect_false(identical(plot_before, app_driver$get_active_module_plot_output("tmcplot"))) app_driver$expect_no_validation_error() app_driver$stop() }) @@ -206,9 +206,9 @@ testthat::test_that("e2e - tm_g_forest_rsp: Deselecting paramcd throws validatio testthat::test_that("e2e - tm_g_forest_rsp: Selecting responders changes plot and doesn't throw validation errors.", { skip_if_too_deep(5) app_driver <- app_driver_tm_g_forest_rsp() - plot_before <- app_driver$get_active_module_plot_output("myplot") + plot_before <- app_driver$get_active_module_plot_output("tmcplot") app_driver$set_active_module_input("responders", "Complete Response (CR)") - testthat::expect_false(identical(plot_before, app_driver$get_active_module_plot_output("myplot"))) + testthat::expect_false(identical(plot_before, app_driver$get_active_module_plot_output("tmcplot"))) app_driver$expect_no_validation_error() app_driver$stop() }) @@ -228,9 +228,9 @@ testthat::test_that("e2e - tm_g_forest_rsp: Deselecting responders throws valida testthat::test_that("e2e - tm_g_forest_rsp: Selecting subgroup_var changes plot and doesn't throw validation errors.", { skip_if_too_deep(5) app_driver <- app_driver_tm_g_forest_rsp() - plot_before <- app_driver$get_active_module_plot_output("myplot") + plot_before <- app_driver$get_active_module_plot_output("tmcplot") app_driver$set_active_module_input("subgroup_var-dataset_ADSL_singleextract-select", c("SEX", "BMRKR2", "AGEU")) - testthat::expect_false(identical(plot_before, app_driver$get_active_module_plot_output("myplot"))) + testthat::expect_false(identical(plot_before, app_driver$get_active_module_plot_output("tmcplot"))) app_driver$expect_no_validation_error() app_driver$stop() }) @@ -250,9 +250,9 @@ testthat::test_that("e2e - tm_g_forest_rsp: Selecting a non-factors column in su testthat::test_that("e2e - tm_g_forest_rsp: Deselecting subgroup_var changes plot and doesn't throw validation errors.", { # nolint: line_length skip_if_too_deep(5) app_driver <- app_driver_tm_g_forest_rsp() - plot_before <- app_driver$get_active_module_plot_output("myplot") + plot_before <- app_driver$get_active_module_plot_output("tmcplot") app_driver$set_active_module_input("subgroup_var-dataset_ADSL_singleextract-select", NULL) - testthat::expect_false(identical(plot_before, app_driver$get_active_module_plot_output("myplot"))) + testthat::expect_false(identical(plot_before, app_driver$get_active_module_plot_output("tmcplot"))) app_driver$expect_no_validation_error() app_driver$stop() }) @@ -260,9 +260,9 @@ testthat::test_that("e2e - tm_g_forest_rsp: Deselecting subgroup_var changes plo testthat::test_that("e2e - tm_g_forest_rsp: Selecting strata_var changes plot and doesn't throw validation errors.", { skip_if_too_deep(5) app_driver <- app_driver_tm_g_forest_rsp() - plot_before <- app_driver$get_active_module_plot_output("myplot") + plot_before <- app_driver$get_active_module_plot_output("tmcplot") app_driver$set_active_module_input("strata_var-dataset_ADSL_singleextract-select", "STRATA1") - testthat::expect_false(identical(plot_before, app_driver$get_active_module_plot_output("myplot"))) + testthat::expect_false(identical(plot_before, app_driver$get_active_module_plot_output("tmcplot"))) app_driver$expect_no_validation_error() app_driver$stop() }) @@ -270,9 +270,9 @@ testthat::test_that("e2e - tm_g_forest_rsp: Selecting strata_var changes plot an testthat::test_that("e2e - tm_g_forest_rsp: Deselecting strata_var changes plot and doesn't throw validation errors.", { skip_if_too_deep(5) app_driver <- app_driver_tm_g_forest_rsp() - plot_before <- app_driver$get_active_module_plot_output("myplot") + plot_before <- app_driver$get_active_module_plot_output("tmcplot") app_driver$set_active_module_input("strata_var-dataset_ADSL_singleextract-select", NULL) - testthat::expect_false(identical(plot_before, app_driver$get_active_module_plot_output("myplot"))) + testthat::expect_false(identical(plot_before, app_driver$get_active_module_plot_output("tmcplot"))) app_driver$expect_no_validation_error() app_driver$stop() }) @@ -280,9 +280,9 @@ testthat::test_that("e2e - tm_g_forest_rsp: Deselecting strata_var changes plot testthat::test_that("e2e - tm_g_forest_rsp: Selecting conf_level changes plot and doesn't throw validation errors.", { skip_if_too_deep(5) app_driver <- app_driver_tm_g_forest_rsp() - plot_before <- app_driver$get_active_module_plot_output("myplot") + plot_before <- app_driver$get_active_module_plot_output("tmcplot") app_driver$set_active_module_input("conf_level", "0.9") - testthat::expect_false(identical(plot_before, app_driver$get_active_module_plot_output("myplot"))) + testthat::expect_false(identical(plot_before, app_driver$get_active_module_plot_output("tmcplot"))) app_driver$expect_no_validation_error() app_driver$stop() }) @@ -308,9 +308,9 @@ testthat::test_that("e2e - tm_g_forest_rsp: Deselecting conf_level or selecting testthat::test_that("e2e - tm_g_forest_rsp: Unsetting fixed_symbol_size changes plot and doesn't throw validation errors.", { # nolint: line_length skip_if_too_deep(5) app_driver <- app_driver_tm_g_forest_rsp() - plot_before <- app_driver$get_active_module_plot_output("myplot") + plot_before <- app_driver$get_active_module_plot_output("tmcplot") app_driver$set_active_module_input("fixed_symbol_size", FALSE) - testthat::expect_false(identical(plot_before, app_driver$get_active_module_plot_output("myplot"))) + testthat::expect_false(identical(plot_before, app_driver$get_active_module_plot_output("tmcplot"))) app_driver$expect_no_validation_error() app_driver$stop() }) @@ -318,9 +318,9 @@ testthat::test_that("e2e - tm_g_forest_rsp: Unsetting fixed_symbol_size changes testthat::test_that("e2e - tm_g_forest_rsp: Changing rel_width_forest changes plot and doesn't throw validation errors.", { # nolint: line_length skip_if_too_deep(5) app_driver <- app_driver_tm_g_forest_rsp() - plot_before <- app_driver$get_active_module_plot_output("myplot") + plot_before <- app_driver$get_active_module_plot_output("tmcplot") app_driver$set_active_module_input("rel_width_forest", 30) - testthat::expect_false(identical(plot_before, app_driver$get_active_module_plot_output("myplot"))) + testthat::expect_false(identical(plot_before, app_driver$get_active_module_plot_output("tmcplot"))) app_driver$expect_no_validation_error() app_driver$stop() }) @@ -328,9 +328,9 @@ testthat::test_that("e2e - tm_g_forest_rsp: Changing rel_width_forest changes pl testthat::test_that("e2e - tm_g_forest_rsp: Changing font_size changes plot and doesn't throw validation errors.", { skip_if_too_deep(5) app_driver <- app_driver_tm_g_forest_rsp() - plot_before <- app_driver$get_active_module_plot_output("myplot") + plot_before <- app_driver$get_active_module_plot_output("tmcplot") app_driver$set_active_module_input("font_size", 25) - testthat::expect_false(identical(plot_before, app_driver$get_active_module_plot_output("myplot"))) + testthat::expect_false(identical(plot_before, app_driver$get_active_module_plot_output("tmcplot"))) app_driver$expect_no_validation_error() app_driver$stop() }) diff --git a/tests/testthat/test-shinytest2-tm_g_forest_tte.R b/tests/testthat/test-shinytest2-tm_g_forest_tte.R index ee8517a2c9..e3d77e3e6e 100644 --- a/tests/testthat/test-shinytest2-tm_g_forest_tte.R +++ b/tests/testthat/test-shinytest2-tm_g_forest_tte.R @@ -152,9 +152,9 @@ testthat::test_that( { skip_if_too_deep(5) app_driver <- app_driver_tm_g_forest_tte() - plot_before <- app_driver$get_active_module_plot_output("myplot") + plot_before <- app_driver$get_active_module_plot_output("tmcplot") app_driver$set_active_module_input(ns_des_input("paramcd", "ADTTE", "filter1-vals"), "CRSD") - testthat::expect_false(identical(plot_before, app_driver$get_active_module_plot_output("myplot"))) + testthat::expect_false(identical(plot_before, app_driver$get_active_module_plot_output("tmcplot"))) app_driver$expect_no_validation_error() app_driver$stop() } @@ -183,9 +183,9 @@ testthat::test_that( { skip_if_too_deep(5) app_driver <- app_driver_tm_g_forest_tte() - plot_before <- app_driver$get_active_module_plot_output("myplot") + plot_before <- app_driver$get_active_module_plot_output("tmcplot") app_driver$set_active_module_input(ns_des_input("arm_var", "ADSL", "select"), "ARM") - testthat::expect_false(identical(plot_before, app_driver$get_active_module_plot_output("myplot"))) + testthat::expect_false(identical(plot_before, app_driver$get_active_module_plot_output("tmcplot"))) app_driver$expect_no_validation_error() app_driver$stop() } @@ -215,9 +215,9 @@ testthat::test_that( skip_if_too_deep(5) app_driver <- app_driver_tm_g_forest_tte() input_id <- "conf_level" - plot_before <- app_driver$get_active_module_plot_output("myplot") + plot_before <- app_driver$get_active_module_plot_output("tmcplot") app_driver$set_active_module_input(input_id, "0.99") - testthat::expect_false(identical(plot_before, app_driver$get_active_module_plot_output("myplot"))) + testthat::expect_false(identical(plot_before, app_driver$get_active_module_plot_output("tmcplot"))) app_driver$expect_validation_error() testthat::expect_match( app_driver$active_module_element_text( diff --git a/tests/testthat/test-shinytest2-tm_g_ipp.R b/tests/testthat/test-shinytest2-tm_g_ipp.R index 66b00635ad..b81d624410 100644 --- a/tests/testthat/test-shinytest2-tm_g_ipp.R +++ b/tests/testthat/test-shinytest2-tm_g_ipp.R @@ -72,7 +72,7 @@ testthat::test_that("e2e - tm_g_ipp: Module initializes in teal without errors a app_driver$expect_no_shiny_error() app_driver$expect_no_validation_error() testthat::expect_match( - app_driver$get_active_module_plot_output("myplot"), + app_driver$get_active_module_plot_output("tmcplot"), "data:image/png;base64," ) app_driver$stop() @@ -136,12 +136,12 @@ testthat::test_that( testthat::test_that("e2e - tm_g_ipp: Selecting arm_var changes plot and doesn't throw validation errors.", { skip_if_too_deep(5) app_driver <- app_driver_tm_g_ipp() - plot_before <- app_driver$get_active_module_plot_output("myplot") + plot_before <- app_driver$get_active_module_plot_output("tmcplot") app_driver$set_active_module_input("arm_var-dataset_ADSL_singleextract-filter1-vals", "ARM B") testthat::expect_false( identical( plot_before, - app_driver$get_active_module_plot_output("myplot") + app_driver$get_active_module_plot_output("tmcplot") ) ) app_driver$expect_no_validation_error() @@ -152,7 +152,7 @@ testthat::test_that("e2e - tm_g_ipp: Deselecting arm_var column throws validatio skip_if_too_deep(5) app_driver <- app_driver_tm_g_ipp() app_driver$set_active_module_input("arm_var-dataset_ADSL_singleextract-filter1-vals", NULL) - testthat::expect_identical(app_driver$get_active_module_plot_output("myplot"), character(0)) + testthat::expect_identical(app_driver$get_active_module_plot_output("tmcplot"), character(0)) testthat::expect_identical( app_driver$active_module_element_text("arm_var-dataset_ADSL_singleextract-filter1-vals_input > div > span"), "Please select Arm filter." @@ -164,12 +164,12 @@ testthat::test_that("e2e - tm_g_ipp: Deselecting arm_var column throws validatio testthat::test_that("e2e - tm_g_ipp: Selecting paramcd changes plot and doesn't throw validation errors.", { skip_if_too_deep(5) app_driver <- app_driver_tm_g_ipp() - plot_before <- app_driver$get_active_module_plot_output("myplot") + plot_before <- app_driver$get_active_module_plot_output("tmcplot") app_driver$set_active_module_input("paramcd-dataset_ADLB_singleextract-filter1-vals", "CRP") testthat::expect_false( identical( plot_before, - app_driver$get_active_module_plot_output("myplot") + app_driver$get_active_module_plot_output("tmcplot") ) ) app_driver$expect_no_validation_error() @@ -180,7 +180,7 @@ testthat::test_that("e2e - tm_g_ipp: Deselecting paramcd throws validation error skip_if_too_deep(5) app_driver <- app_driver_tm_g_ipp() app_driver$set_active_module_input("paramcd-dataset_ADLB_singleextract-filter1-vals", NULL) - testthat::expect_identical(app_driver$get_active_module_plot_output("myplot"), character(0)) + testthat::expect_identical(app_driver$get_active_module_plot_output("tmcplot"), character(0)) testthat::expect_identical( app_driver$active_module_element_text("paramcd-dataset_ADLB_singleextract-filter1-vals_input > div > span"), "Please select Parameter filter." @@ -192,12 +192,12 @@ testthat::test_that("e2e - tm_g_ipp: Deselecting paramcd throws validation error testthat::test_that("e2e - tm_g_ipp: Selecting visit_var changes plot and doesn't throw validation errors.", { skip_if_too_deep(5) app_driver <- app_driver_tm_g_ipp() - plot_before <- app_driver$get_active_module_plot_output("myplot") + plot_before <- app_driver$get_active_module_plot_output("tmcplot") app_driver$set_active_module_input("visit_var-dataset_ADLB_singleextract-select", "ATOXGR") testthat::expect_false( identical( plot_before, - app_driver$get_active_module_plot_output("myplot") + app_driver$get_active_module_plot_output("tmcplot") ) ) app_driver$expect_no_validation_error() @@ -208,7 +208,7 @@ testthat::test_that("e2e - tm_g_ipp: Deselecting visit_var throws validation err skip_if_too_deep(5) app_driver <- app_driver_tm_g_ipp() app_driver$set_active_module_input("visit_var-dataset_ADLB_singleextract-select", NULL) - testthat::expect_identical(app_driver$get_active_module_plot_output("myplot"), character(0)) + testthat::expect_identical(app_driver$get_active_module_plot_output("tmcplot"), character(0)) testthat::expect_identical( app_driver$active_module_element_text("visit_var-dataset_ADLB_singleextract-select_input > div > span"), "A Timepoint Variable must be selected" @@ -220,12 +220,12 @@ testthat::test_that("e2e - tm_g_ipp: Deselecting visit_var throws validation err testthat::test_that("e2e - tm_g_ipp: Selecting aval_var changes plot and doesn't throw validation errors.", { skip_if_too_deep(5) app_driver <- app_driver_tm_g_ipp() - plot_before <- app_driver$get_active_module_plot_output("myplot") + plot_before <- app_driver$get_active_module_plot_output("tmcplot") app_driver$set_active_module_input("aval_var-dataset_ADLB_singleextract-select", "CHG") testthat::expect_false( identical( plot_before, - app_driver$get_active_module_plot_output("myplot") + app_driver$get_active_module_plot_output("tmcplot") ) ) app_driver$expect_no_validation_error() @@ -236,7 +236,7 @@ testthat::test_that("e2e - tm_g_ipp: Deselecting aval_var throws validation erro skip_if_too_deep(5) app_driver <- app_driver_tm_g_ipp() app_driver$set_active_module_input("aval_var-dataset_ADLB_singleextract-select", NULL) - testthat::expect_identical(app_driver$get_active_module_plot_output("myplot"), character(0)) + testthat::expect_identical(app_driver$get_active_module_plot_output("tmcplot"), character(0)) testthat::expect_identical( app_driver$active_module_element_text("aval_var-dataset_ADLB_singleextract-select_input > div > span"), "A Parameter values over Time must be selected" @@ -248,12 +248,12 @@ testthat::test_that("e2e - tm_g_ipp: Deselecting aval_var throws validation erro testthat::test_that("e2e - tm_g_ipp: Changing add_baseline_hline changes plot and doesn't throw validation errors.", { skip_if_too_deep(5) app_driver <- app_driver_tm_g_ipp() - plot_before <- app_driver$get_active_module_plot_output("myplot") + plot_before <- app_driver$get_active_module_plot_output("tmcplot") app_driver$set_active_module_input("add_baseline_hline", TRUE) testthat::expect_false( identical( plot_before, - app_driver$get_active_module_plot_output("myplot") + app_driver$get_active_module_plot_output("tmcplot") ) ) app_driver$expect_no_validation_error() @@ -262,12 +262,12 @@ testthat::test_that("e2e - tm_g_ipp: Changing add_baseline_hline changes plot an testthat::test_that("e2e - tm_g_ipp: Changing separate_by_obs changes plot and doesn't throw validation errors.", { skip_if_too_deep(5) app_driver <- app_driver_tm_g_ipp() - plot_before <- app_driver$get_active_module_plot_output("myplot") + plot_before <- app_driver$get_active_module_plot_output("tmcplot") app_driver$set_active_module_input("separate_by_obs", TRUE) testthat::expect_false( identical( plot_before, - app_driver$get_active_module_plot_output("myplot") + app_driver$get_active_module_plot_output("tmcplot") ) ) app_driver$expect_no_validation_error() @@ -277,12 +277,12 @@ testthat::test_that("e2e - tm_g_ipp: Changing separate_by_obs changes plot and d testthat::test_that("e2e - tm_g_ipp: Changing suppress_legend changes plot and doesn't throw validation errors.", { skip_if_too_deep(5) app_driver <- app_driver_tm_g_ipp() - plot_before <- app_driver$get_active_module_plot_output("myplot") + plot_before <- app_driver$get_active_module_plot_output("tmcplot") app_driver$set_active_module_input("suppress_legend", TRUE) testthat::expect_false( identical( plot_before, - app_driver$get_active_module_plot_output("myplot") + app_driver$get_active_module_plot_output("tmcplot") ) ) app_driver$expect_no_validation_error() @@ -292,12 +292,12 @@ testthat::test_that("e2e - tm_g_ipp: Changing suppress_legend changes plot and d testthat::test_that("e2e - tm_g_ipp: Changing add_avalu changes plot and doesn't throw validation errors.", { skip_if_too_deep(5) app_driver <- app_driver_tm_g_ipp() - plot_before <- app_driver$get_active_module_plot_output("myplot") + plot_before <- app_driver$get_active_module_plot_output("tmcplot") app_driver$set_active_module_input("add_avalu", FALSE) testthat::expect_false( identical( plot_before, - app_driver$get_active_module_plot_output("myplot") + app_driver$get_active_module_plot_output("tmcplot") ) ) app_driver$expect_no_validation_error() diff --git a/tests/testthat/test-shinytest2-tm_g_km.R b/tests/testthat/test-shinytest2-tm_g_km.R index 57685ae350..eba84d4ddf 100644 --- a/tests/testthat/test-shinytest2-tm_g_km.R +++ b/tests/testthat/test-shinytest2-tm_g_km.R @@ -85,7 +85,7 @@ testthat::test_that("e2e - tm_g_km: Module initializes in teal without errors an app_driver$expect_no_validation_error() testthat::expect_match( - app_driver$get_active_module_plot_output("myplot"), + app_driver$get_active_module_plot_output("tmcplot"), "data:image/png;base64," ) app_driver$stop() @@ -139,50 +139,50 @@ testthat::test_that( testthat::test_that("e2e - tm_g_km: Changing {paramcd} changes the plot without errors.", { skip_if_too_deep(5) app_driver <- app_driver_tm_g_km() - plot_before <- app_driver$get_active_module_plot_output("myplot") + plot_before <- app_driver$get_active_module_plot_output("tmcplot") app_driver$set_active_module_input("paramcd-dataset_ADTTE_singleextract-filter1-vals", "EFS") app_driver$expect_no_validation_error() - testthat::expect_false(identical(plot_before, app_driver$get_active_module_plot_output("myplot"))) + testthat::expect_false(identical(plot_before, app_driver$get_active_module_plot_output("tmcplot"))) app_driver$stop() }) testthat::test_that("e2e - tm_g_km: Changing {facet_var} changes the plot without errors.", { skip_if_too_deep(5) app_driver <- app_driver_tm_g_km() - plot_before <- app_driver$get_active_module_plot_output("myplot") + plot_before <- app_driver$get_active_module_plot_output("tmcplot") app_driver$set_active_module_input(ns_des_input("facet_var", "ADSL", "select"), "SEX") app_driver$expect_no_validation_error() - testthat::expect_false(identical(plot_before, app_driver$get_active_module_plot_output("myplot"))) + testthat::expect_false(identical(plot_before, app_driver$get_active_module_plot_output("tmcplot"))) app_driver$stop() }) testthat::test_that("e2e - tm_g_km: Changing {arm_var} changes the plot without errors.", { skip_if_too_deep(5) app_driver <- app_driver_tm_g_km() - plot_before <- app_driver$get_active_module_plot_output("myplot") + plot_before <- app_driver$get_active_module_plot_output("tmcplot") app_driver$set_active_module_input(ns_des_input("arm_var", "ADSL", "select"), "ACTARMCD") app_driver$expect_no_validation_error() - testthat::expect_false(identical(plot_before, app_driver$get_active_module_plot_output("myplot"))) + testthat::expect_false(identical(plot_before, app_driver$get_active_module_plot_output("tmcplot"))) app_driver$stop() }) testthat::test_that("e2e - tm_g_km: Changing {compare_arms} changes the plot without errors.", { skip_if_too_deep(5) app_driver <- app_driver_tm_g_km() - plot_before <- app_driver$get_active_module_plot_output("myplot") + plot_before <- app_driver$get_active_module_plot_output("tmcplot") app_driver$set_active_module_input("compare_arms", FALSE) app_driver$expect_no_validation_error() - testthat::expect_false(identical(plot_before, app_driver$get_active_module_plot_output("myplot"))) + testthat::expect_false(identical(plot_before, app_driver$get_active_module_plot_output("tmcplot"))) app_driver$stop() }) testthat::test_that("e2e - tm_g_km: Changing {strata_var} changes the plot without errors.", { skip_if_too_deep(5) app_driver <- app_driver_tm_g_km() - plot_before <- app_driver$get_active_module_plot_output("myplot") + plot_before <- app_driver$get_active_module_plot_output("tmcplot") app_driver$set_active_module_input(ns_des_input("strata_var", "ADSL", "select"), "BMRKR2") app_driver$expect_no_validation_error() - testthat::expect_false(identical(plot_before, app_driver$get_active_module_plot_output("myplot"))) + testthat::expect_false(identical(plot_before, app_driver$get_active_module_plot_output("tmcplot"))) app_driver$stop() }) @@ -280,20 +280,20 @@ testthat::test_that("e2e - tm_g_km: Starts with specified collapsed comparison s testthat::test_that("e2e - tm_g_km: Changing {pval_method_coxph} changes the plot without errors.", { skip_if_too_deep(5) app_driver <- app_driver_tm_g_km() - plot_before <- app_driver$get_active_module_plot_output("myplot") + plot_before <- app_driver$get_active_module_plot_output("tmcplot") app_driver$set_active_module_input("pval_method_coxph", "wald") app_driver$expect_no_validation_error() - testthat::expect_false(identical(plot_before, app_driver$get_active_module_plot_output("myplot"))) + testthat::expect_false(identical(plot_before, app_driver$get_active_module_plot_output("tmcplot"))) app_driver$stop() }) testthat::test_that("e2e - tm_g_km: Changing {ties_coxph} changes the plot without errors.", { skip_if_too_deep(5) app_driver <- app_driver_tm_g_km() - plot_before <- app_driver$get_active_module_plot_output("myplot") + plot_before <- app_driver$get_active_module_plot_output("tmcplot") app_driver$set_active_module_input("ties_coxph", "breslow") app_driver$expect_no_validation_error() - testthat::expect_false(identical(plot_before, app_driver$get_active_module_plot_output("myplot"))) + testthat::expect_false(identical(plot_before, app_driver$get_active_module_plot_output("tmcplot"))) app_driver$stop() }) @@ -358,9 +358,9 @@ test_that_plot_settings <- function(input_id, new_value) { { skip_if_too_deep(5) app_driver <- app_driver_tm_g_km() - plot_before <- app_driver$get_active_module_plot_output("myplot") + plot_before <- app_driver$get_active_module_plot_output("tmcplot") app_driver$set_active_module_input(input_id, new_value) - testthat::expect_false(identical(plot_before, app_driver$get_active_module_plot_output("myplot"))) + testthat::expect_false(identical(plot_before, app_driver$get_active_module_plot_output("tmcplot"))) app_driver$expect_no_validation_error() app_driver$stop() } diff --git a/tests/testthat/test-shinytest2-tm_g_lineplot.R b/tests/testthat/test-shinytest2-tm_g_lineplot.R index cb7ac91b33..6c8ecd5018 100644 --- a/tests/testthat/test-shinytest2-tm_g_lineplot.R +++ b/tests/testthat/test-shinytest2-tm_g_lineplot.R @@ -114,12 +114,12 @@ testthat::test_that( testthat::test_that("e2e - tm_g_lineplot: Selecting param changes plot and doesn't throw validation errors.", { skip_if_too_deep(5) app_driver <- app_driver_tm_g_lineplot() - plot_before <- app_driver$get_active_module_plot_output("myplot") + plot_before <- app_driver$get_active_module_plot_output("tmcplot") app_driver$set_active_module_input("param-dataset_ADLB_singleextract-filter1-vals", "CRP") testthat::expect_false( identical( plot_before, - app_driver$get_active_module_plot_output("myplot") + app_driver$get_active_module_plot_output("tmcplot") ) ) app_driver$expect_no_validation_error() @@ -130,7 +130,7 @@ testthat::test_that("e2e - tm_g_lineplot: Deselecting param throws validation er skip_if_too_deep(5) app_driver <- app_driver_tm_g_lineplot() app_driver$set_active_module_input("param-dataset_ADLB_singleextract-filter1-vals", NULL) - testthat::expect_identical(app_driver$get_active_module_plot_output("myplot"), character(0)) + testthat::expect_identical(app_driver$get_active_module_plot_output("tmcplot"), character(0)) testthat::expect_identical( app_driver$active_module_element_text("param-dataset_ADLB_singleextract-filter1-vals_input > div > span"), "Please select Biomarker filter." @@ -144,12 +144,12 @@ testthat::test_that( { skip_if_too_deep(5) app_driver <- app_driver_tm_g_lineplot() - plot_before <- app_driver$get_active_module_plot_output("myplot") + plot_before <- app_driver$get_active_module_plot_output("tmcplot") app_driver$set_active_module_input("strata-dataset_ADSL_singleextract-select", "ARMCD") testthat::expect_false( identical( plot_before, - app_driver$get_active_module_plot_output("myplot") + app_driver$get_active_module_plot_output("tmcplot") ) ) app_driver$expect_no_validation_error() @@ -161,7 +161,7 @@ testthat::test_that("e2e - tm_g_lineplot: Deselecting strata throws validation e skip_if_too_deep(5) app_driver <- app_driver_tm_g_lineplot() app_driver$set_active_module_input("strata-dataset_ADSL_singleextract-select", NULL) - testthat::expect_identical(app_driver$get_active_module_plot_output("myplot"), character(0)) + testthat::expect_identical(app_driver$get_active_module_plot_output("tmcplot"), character(0)) testthat::expect_identical( app_driver$active_module_element_text( "strata-dataset_ADSL_singleextract-select_input > div > span" @@ -175,12 +175,12 @@ testthat::test_that("e2e - tm_g_lineplot: Deselecting strata throws validation e testthat::test_that("e2e - tm_g_lineplot: Selecting y changes plot and doesn't throw validation errors.", { skip_if_too_deep(5) app_driver <- app_driver_tm_g_lineplot() - plot_before <- app_driver$get_active_module_plot_output("myplot") + plot_before <- app_driver$get_active_module_plot_output("tmcplot") app_driver$set_active_module_input("y-dataset_ADLB_singleextract-select", "BASE") testthat::expect_false( identical( plot_before, - app_driver$get_active_module_plot_output("myplot") + app_driver$get_active_module_plot_output("tmcplot") ) ) app_driver$expect_no_validation_error() @@ -191,7 +191,7 @@ testthat::test_that("e2e - tm_g_lineplot: Deselecting y throws validation error. skip_if_too_deep(5) app_driver <- app_driver_tm_g_lineplot() app_driver$set_active_module_input("y-dataset_ADLB_singleextract-select", NULL) - testthat::expect_identical(app_driver$get_active_module_plot_output("myplot"), character(0)) + testthat::expect_identical(app_driver$get_active_module_plot_output("tmcplot"), character(0)) testthat::expect_identical( app_driver$active_module_element_text( "y-dataset_ADLB_singleextract-select_input > div > span" @@ -205,12 +205,12 @@ testthat::test_that("e2e - tm_g_lineplot: Deselecting y throws validation error. testthat::test_that("e2e - tm_g_lineplot: Selecting conf_level changes plot and doesn't throw validation errors.", { skip_if_too_deep(5) app_driver <- app_driver_tm_g_lineplot() - plot_before <- app_driver$get_active_module_plot_output("myplot") + plot_before <- app_driver$get_active_module_plot_output("tmcplot") app_driver$set_active_module_input("conf_level", "0.8") testthat::expect_false( identical( plot_before, - app_driver$get_active_module_plot_output("myplot") + app_driver$get_active_module_plot_output("tmcplot") ) ) app_driver$expect_no_validation_error() @@ -221,7 +221,7 @@ testthat::test_that("e2e - tm_g_lineplot: Deselecting conf_level validation erro skip_if_too_deep(5) app_driver <- app_driver_tm_g_lineplot() app_driver$set_active_module_input("conf_level", NULL) - testthat::expect_identical(app_driver$get_active_module_plot_output("myplot"), character(0)) + testthat::expect_identical(app_driver$get_active_module_plot_output("tmcplot"), character(0)) testthat::expect_identical( app_driver$active_module_element_text("conf_level_input > div > span"), "Please choose a confidence level" diff --git a/tests/testthat/test-shinytest2-tm_g_pp_adverse_events.R b/tests/testthat/test-shinytest2-tm_g_pp_adverse_events.R index a2c9309d09..575771e532 100644 --- a/tests/testthat/test-shinytest2-tm_g_pp_adverse_events.R +++ b/tests/testthat/test-shinytest2-tm_g_pp_adverse_events.R @@ -60,7 +60,7 @@ testthat::test_that( app_driver <- app_driver_tm_g_pp_adverse_events() app_driver$expect_no_shiny_error() app_driver$expect_no_validation_error() - testthat::expect_match(app_driver$get_active_module_plot_output("chart"), "data:image/png;base64,") + testthat::expect_match(app_driver$get_active_module_plot_output("tmcplot"), "data:image/png;base64,") testthat::expect_true( app_driver$is_visible(app_driver$active_module_element("table")) ) @@ -127,13 +127,13 @@ testthat::test_that( { skip_if_too_deep(5) app_driver <- app_driver_tm_g_pp_adverse_events() - plot_before <- app_driver$get_active_module_plot_output("chart") + plot_before <- app_driver$get_active_module_plot_output("tmcplot") table_before <- app_driver$get_active_module_table_output("table") app_driver$set_active_module_input("patient_id", "AB12345-CHN-15-id-262") testthat::expect_false( identical( plot_before, - app_driver$get_active_module_plot_output("chart") + app_driver$get_active_module_plot_output("tmcplot") ) ) testthat::expect_false( @@ -168,13 +168,13 @@ testthat::test_that( { skip_if_too_deep(5) app_driver <- app_driver_tm_g_pp_adverse_events() - plot_before <- app_driver$get_active_module_plot_output("chart") + plot_before <- app_driver$get_active_module_plot_output("tmcplot") table_before <- app_driver$get_active_module_table_output("table") app_driver$set_active_module_input("aeterm-dataset_ADAE_singleextract-select", "AGEU") testthat::expect_false( identical( plot_before, - app_driver$get_active_module_plot_output("chart") + app_driver$get_active_module_plot_output("tmcplot") ) ) @@ -210,13 +210,13 @@ testthat::test_that( { skip_if_too_deep(5) app_driver <- app_driver_tm_g_pp_adverse_events() - plot_before <- app_driver$get_active_module_plot_output("chart") + plot_before <- app_driver$get_active_module_plot_output("tmcplot") table_before <- app_driver$get_active_module_table_output("table") app_driver$set_active_module_input("tox_grade-dataset_ADAE_singleextract-select", "COUNTRY") testthat::expect_false( identical( plot_before, - app_driver$get_active_module_plot_output("chart") + app_driver$get_active_module_plot_output("tmcplot") ) ) @@ -252,13 +252,13 @@ testthat::test_that( { skip_if_too_deep(5) app_driver <- app_driver_tm_g_pp_adverse_events() - plot_before <- app_driver$get_active_module_plot_output("chart") + plot_before <- app_driver$get_active_module_plot_output("tmcplot") table_before <- app_driver$get_active_module_table_output("table") app_driver$set_active_module_input("causality-dataset_ADAE_singleextract-select", "ACTARM") testthat::expect_false( identical( plot_before, - app_driver$get_active_module_plot_output("chart") + app_driver$get_active_module_plot_output("tmcplot") ) ) @@ -294,13 +294,13 @@ testthat::test_that( { skip_if_too_deep(5) app_driver <- app_driver_tm_g_pp_adverse_events() - plot_before <- app_driver$get_active_module_plot_output("chart") + plot_before <- app_driver$get_active_module_plot_output("tmcplot") table_before <- app_driver$get_active_module_table_output("table") app_driver$set_active_module_input("outcome-dataset_ADAE_singleextract-select", "SITEID") testthat::expect_false( identical( plot_before, - app_driver$get_active_module_plot_output("chart") + app_driver$get_active_module_plot_output("tmcplot") ) ) @@ -336,13 +336,13 @@ testthat::test_that( { skip_if_too_deep(5) app_driver <- app_driver_tm_g_pp_adverse_events() - plot_before <- app_driver$get_active_module_plot_output("chart") + plot_before <- app_driver$get_active_module_plot_output("tmcplot") table_before <- app_driver$get_active_module_table_output("table") app_driver$set_active_module_input("action-dataset_ADAE_singleextract-select", "SMQ01NAM") testthat::expect_false( identical( plot_before, - app_driver$get_active_module_plot_output("chart") + app_driver$get_active_module_plot_output("tmcplot") ) ) @@ -378,13 +378,13 @@ testthat::test_that( { skip_if_too_deep(5) app_driver <- app_driver_tm_g_pp_adverse_events() - plot_before <- app_driver$get_active_module_plot_output("chart") + plot_before <- app_driver$get_active_module_plot_output("tmcplot") table_before <- app_driver$get_active_module_table_output("table") app_driver$set_active_module_input("time-dataset_ADAE_singleextract-select", "AGE") testthat::expect_false( identical( plot_before, - app_driver$get_active_module_plot_output("chart") + app_driver$get_active_module_plot_output("tmcplot") ) ) diff --git a/tests/testthat/test-shinytest2-tm_g_pp_patient_timeline.R b/tests/testthat/test-shinytest2-tm_g_pp_patient_timeline.R index a46061bfb6..28c39564f6 100644 --- a/tests/testthat/test-shinytest2-tm_g_pp_patient_timeline.R +++ b/tests/testthat/test-shinytest2-tm_g_pp_patient_timeline.R @@ -94,7 +94,7 @@ testthat::test_that( app_driver$expect_no_validation_error() testthat::expect_match( - app_driver$get_active_module_plot_output("patient_timeline_plot"), + app_driver$get_active_module_plot_output("tmcplot"), "data:image/png;base64," ) @@ -234,12 +234,12 @@ testthat::test_that( { skip_if_too_deep(5) app_driver <- app_driver_tm_g_pp_patient_timeline() - plot_before <- app_driver$get_active_module_plot_output("patient_timeline_plot") + plot_before <- app_driver$get_active_module_plot_output("tmcplot") app_driver$set_active_module_input("patient_id", "AB12345-USA-2-id-3") testthat::expect_false( identical( plot_before, - app_driver$get_active_module_plot_output("patient_timeline_plot") + app_driver$get_active_module_plot_output("tmcplot") ) ) app_driver$expect_no_validation_error() @@ -251,7 +251,7 @@ testthat::test_that("e2e - tm_g_pp_patient_timeline: Deselecting patient_id colu skip_if_too_deep(5) app_driver <- app_driver_tm_g_pp_patient_timeline() app_driver$set_active_module_input("patient_id", NULL) - testthat::expect_identical(app_driver$get_active_module_plot_output("patient_timeline_plot"), character(0)) + testthat::expect_identical(app_driver$get_active_module_plot_output("tmcplot"), character(0)) testthat::expect_identical( app_driver$active_module_element_text("patient_id_input > div > span"), "Please select a patient" @@ -265,12 +265,12 @@ testthat::test_that( { skip_if_too_deep(5) app_driver <- app_driver_tm_g_pp_patient_timeline() - plot_before <- app_driver$get_active_module_plot_output("patient_timeline_plot") + plot_before <- app_driver$get_active_module_plot_output("tmcplot") app_driver$set_active_module_input("cmdecod-dataset_ADCM_singleextract-select", "CMCAT") testthat::expect_false( identical( plot_before, - app_driver$get_active_module_plot_output("patient_timeline_plot") + app_driver$get_active_module_plot_output("tmcplot") ) ) app_driver$expect_no_validation_error() @@ -283,9 +283,9 @@ testthat::test_that( { skip_if_too_deep(5) app_driver <- app_driver_tm_g_pp_patient_timeline() - plot_before <- app_driver$get_active_module_plot_output("patient_timeline_plot") + plot_before <- app_driver$get_active_module_plot_output("tmcplot") app_driver$set_active_module_input("cmdecod-dataset_ADCM_singleextract-select", NULL) - testthat::expect_false(identical(plot_before, app_driver$get_active_module_plot_output("patient_timeline_plot"))) + testthat::expect_false(identical(plot_before, app_driver$get_active_module_plot_output("tmcplot"))) app_driver$expect_no_validation_error() app_driver$stop() } @@ -296,12 +296,12 @@ testthat::test_that( { skip_if_too_deep(5) app_driver <- app_driver_tm_g_pp_patient_timeline() - plot_before <- app_driver$get_active_module_plot_output("patient_timeline_plot") + plot_before <- app_driver$get_active_module_plot_output("tmcplot") app_driver$set_active_module_input("aeterm-dataset_ADAE_singleextract-select", "AESOC") testthat::expect_false( identical( plot_before, - app_driver$get_active_module_plot_output("patient_timeline_plot") + app_driver$get_active_module_plot_output("tmcplot") ) ) app_driver$expect_no_validation_error() @@ -314,9 +314,9 @@ testthat::test_that( { skip_if_too_deep(5) app_driver <- app_driver_tm_g_pp_patient_timeline() - plot_before <- app_driver$get_active_module_plot_output("patient_timeline_plot") + plot_before <- app_driver$get_active_module_plot_output("tmcplot") app_driver$set_active_module_input("aeterm-dataset_ADAE_singleextract-select", NULL) - testthat::expect_false(identical(plot_before, app_driver$get_active_module_plot_output("patient_timeline_plot"))) + testthat::expect_false(identical(plot_before, app_driver$get_active_module_plot_output("tmcplot"))) app_driver$expect_no_validation_error() app_driver$stop() } @@ -328,12 +328,12 @@ testthat::test_that( skip_if_too_deep(5) app_driver <- app_driver_tm_g_pp_patient_timeline() app_driver$set_active_module_input("relday_x_axis", FALSE) - plot_before <- app_driver$get_active_module_plot_output("patient_timeline_plot") + plot_before <- app_driver$get_active_module_plot_output("tmcplot") app_driver$set_active_module_input("aetime_start-dataset_ADAE_singleextract-select", "TRTSDTM") testthat::expect_false( identical( plot_before, - app_driver$get_active_module_plot_output("patient_timeline_plot") + app_driver$get_active_module_plot_output("tmcplot") ) ) app_driver$expect_no_validation_error() @@ -348,7 +348,7 @@ testthat::test_that( app_driver <- app_driver_tm_g_pp_patient_timeline() app_driver$set_active_module_input("relday_x_axis", FALSE) app_driver$set_active_module_input("aetime_start-dataset_ADAE_singleextract-select", NULL) - testthat::expect_identical(app_driver$get_active_module_plot_output("myplot"), character(0)) + testthat::expect_identical(app_driver$get_active_module_plot_output("tmcplot"), character(0)) testthat::expect_identical( app_driver$active_module_element_text("aetime_start-dataset_ADAE_singleextract-select_input > div > span"), "Please add AE start date." @@ -364,12 +364,12 @@ testthat::test_that( skip_if_too_deep(5) app_driver <- app_driver_tm_g_pp_patient_timeline() app_driver$set_active_module_input("relday_x_axis", FALSE) - plot_before <- app_driver$get_active_module_plot_output("patient_timeline_plot") + plot_before <- app_driver$get_active_module_plot_output("tmcplot") app_driver$set_active_module_input("aetime_end-dataset_ADAE_singleextract-select", "EOSDT") testthat::expect_false( identical( plot_before, - app_driver$get_active_module_plot_output("patient_timeline_plot") + app_driver$get_active_module_plot_output("tmcplot") ) ) app_driver$expect_no_validation_error() @@ -384,7 +384,7 @@ testthat::test_that( app_driver <- app_driver_tm_g_pp_patient_timeline() app_driver$set_active_module_input("relday_x_axis", FALSE) app_driver$set_active_module_input("aetime_end-dataset_ADAE_singleextract-select", NULL) - testthat::expect_identical(app_driver$get_active_module_plot_output("myplot"), character(0)) + testthat::expect_identical(app_driver$get_active_module_plot_output("tmcplot"), character(0)) testthat::expect_identical( app_driver$active_module_element_text("aetime_end-dataset_ADAE_singleextract-select_input > div > span"), "Please add AE end date." @@ -399,12 +399,12 @@ testthat::test_that( { skip_if_too_deep(5) app_driver <- app_driver_tm_g_pp_patient_timeline() - plot_before <- app_driver$get_active_module_plot_output("patient_timeline_plot") + plot_before <- app_driver$get_active_module_plot_output("tmcplot") app_driver$set_active_module_input("aerelday_start-dataset_ADAE_singleextract-select", "AENDY") testthat::expect_false( identical( plot_before, - app_driver$get_active_module_plot_output("patient_timeline_plot") + app_driver$get_active_module_plot_output("tmcplot") ) ) app_driver$expect_no_validation_error() @@ -418,7 +418,7 @@ testthat::test_that( skip_if_too_deep(5) app_driver <- app_driver_tm_g_pp_patient_timeline() app_driver$set_active_module_input("aerelday_start-dataset_ADAE_singleextract-select", NULL) - testthat::expect_identical(app_driver$get_active_module_plot_output("myplot"), character(0)) + testthat::expect_identical(app_driver$get_active_module_plot_output("tmcplot"), character(0)) testthat::expect_identical( app_driver$active_module_element_text("aerelday_start-dataset_ADAE_singleextract-select_input > div > span"), "Please add AE start date." @@ -433,12 +433,12 @@ testthat::test_that( { skip_if_too_deep(5) app_driver <- app_driver_tm_g_pp_patient_timeline() - plot_before <- app_driver$get_active_module_plot_output("patient_timeline_plot") + plot_before <- app_driver$get_active_module_plot_output("tmcplot") app_driver$set_active_module_input("aerelday_end-dataset_ADAE_singleextract-select", "ASTDY") testthat::expect_false( identical( plot_before, - app_driver$get_active_module_plot_output("patient_timeline_plot") + app_driver$get_active_module_plot_output("tmcplot") ) ) app_driver$expect_no_validation_error() @@ -452,7 +452,7 @@ testthat::test_that( skip_if_too_deep(5) app_driver <- app_driver_tm_g_pp_patient_timeline() app_driver$set_active_module_input("aerelday_end-dataset_ADAE_singleextract-select", NULL) - testthat::expect_identical(app_driver$get_active_module_plot_output("myplot"), character(0)) + testthat::expect_identical(app_driver$get_active_module_plot_output("tmcplot"), character(0)) testthat::expect_identical( app_driver$active_module_element_text("aerelday_end-dataset_ADAE_singleextract-select_input > div > span"), "Please add AE end date." @@ -468,12 +468,12 @@ testthat::test_that( skip_if_too_deep(5) app_driver <- app_driver_tm_g_pp_patient_timeline() app_driver$set_active_module_input("relday_x_axis", FALSE) - plot_before <- app_driver$get_active_module_plot_output("patient_timeline_plot") + plot_before <- app_driver$get_active_module_plot_output("tmcplot") app_driver$set_active_module_input("dstime_start-dataset_ADCM_singleextract-select", "TRTEDTM") testthat::expect_false( identical( plot_before, - app_driver$get_active_module_plot_output("patient_timeline_plot") + app_driver$get_active_module_plot_output("tmcplot") ) ) app_driver$expect_no_validation_error() @@ -488,7 +488,7 @@ testthat::test_that( app_driver <- app_driver_tm_g_pp_patient_timeline() app_driver$set_active_module_input("relday_x_axis", FALSE) app_driver$set_active_module_input("dstime_start-dataset_ADCM_singleextract-select", NULL) - testthat::expect_identical(app_driver$get_active_module_plot_output("myplot"), character(0)) + testthat::expect_identical(app_driver$get_active_module_plot_output("tmcplot"), character(0)) testthat::expect_identical( app_driver$active_module_element_text("dstime_start-dataset_ADCM_singleextract-select_input > div > span"), "Please add Medication start date." @@ -504,12 +504,12 @@ testthat::test_that( skip_if_too_deep(5) app_driver <- app_driver_tm_g_pp_patient_timeline() app_driver$set_active_module_input("relday_x_axis", FALSE) - plot_before <- app_driver$get_active_module_plot_output("patient_timeline_plot") + plot_before <- app_driver$get_active_module_plot_output("tmcplot") app_driver$set_active_module_input("dstime_end-dataset_ADCM_singleextract-select", "TRTEDTM") testthat::expect_false( identical( plot_before, - app_driver$get_active_module_plot_output("patient_timeline_plot") + app_driver$get_active_module_plot_output("tmcplot") ) ) app_driver$expect_no_validation_error() @@ -524,7 +524,7 @@ testthat::test_that( app_driver <- app_driver_tm_g_pp_patient_timeline() app_driver$set_active_module_input("relday_x_axis", FALSE) app_driver$set_active_module_input("dstime_end-dataset_ADCM_singleextract-select", NULL) - testthat::expect_identical(app_driver$get_active_module_plot_output("myplot"), character(0)) + testthat::expect_identical(app_driver$get_active_module_plot_output("tmcplot"), character(0)) testthat::expect_identical( app_driver$active_module_element_text("dstime_end-dataset_ADCM_singleextract-select_input > div > span"), "Please add Medication end date." @@ -539,12 +539,12 @@ testthat::test_that( { skip_if_too_deep(5) app_driver <- app_driver_tm_g_pp_patient_timeline() - plot_before <- app_driver$get_active_module_plot_output("patient_timeline_plot") + plot_before <- app_driver$get_active_module_plot_output("tmcplot") app_driver$set_active_module_input("dsrelday_start-dataset_ADCM_singleextract-select", "AENDY") testthat::expect_false( identical( plot_before, - app_driver$get_active_module_plot_output("patient_timeline_plot") + app_driver$get_active_module_plot_output("tmcplot") ) ) app_driver$expect_no_validation_error() @@ -558,7 +558,7 @@ testthat::test_that( skip_if_too_deep(5) app_driver <- app_driver_tm_g_pp_patient_timeline() app_driver$set_active_module_input("dsrelday_start-dataset_ADCM_singleextract-select", NULL) - testthat::expect_identical(app_driver$get_active_module_plot_output("myplot"), character(0)) + testthat::expect_identical(app_driver$get_active_module_plot_output("tmcplot"), character(0)) testthat::expect_identical( app_driver$active_module_element_text("dsrelday_start-dataset_ADCM_singleextract-select_input > div > span"), "Please add Medication start date." @@ -573,12 +573,12 @@ testthat::test_that( { skip_if_too_deep(5) app_driver <- app_driver_tm_g_pp_patient_timeline() - plot_before <- app_driver$get_active_module_plot_output("patient_timeline_plot") + plot_before <- app_driver$get_active_module_plot_output("tmcplot") app_driver$set_active_module_input("dsrelday_end-dataset_ADCM_singleextract-select", "ASTDY") testthat::expect_false( identical( plot_before, - app_driver$get_active_module_plot_output("patient_timeline_plot") + app_driver$get_active_module_plot_output("tmcplot") ) ) app_driver$expect_no_validation_error() @@ -592,7 +592,7 @@ testthat::test_that( skip_if_too_deep(5) app_driver <- app_driver_tm_g_pp_patient_timeline() app_driver$set_active_module_input("dsrelday_end-dataset_ADCM_singleextract-select", NULL) - testthat::expect_identical(app_driver$get_active_module_plot_output("myplot"), character(0)) + testthat::expect_identical(app_driver$get_active_module_plot_output("tmcplot"), character(0)) testthat::expect_identical( app_driver$active_module_element_text("dsrelday_end-dataset_ADCM_singleextract-select_input > div > span"), "Please add Medication end date." diff --git a/tests/testthat/test-shinytest2-tm_g_pp_therapy.R b/tests/testthat/test-shinytest2-tm_g_pp_therapy.R index dcd0f6fba4..f103536e7f 100644 --- a/tests/testthat/test-shinytest2-tm_g_pp_therapy.R +++ b/tests/testthat/test-shinytest2-tm_g_pp_therapy.R @@ -154,7 +154,7 @@ test_different_selection <- function(input_name, input_id, new_value) { # nolint skip_if_too_deep(5) app_driver <- app_driver_tm_g_pp_therapy() plot_before <- list( - app_driver$get_active_module_plot_output("therapy_plot"), + app_driver$get_active_module_plot_output("tmcplot"), app_driver$active_module_element_text("therapy_table") ) app_driver$set_active_module_input(input_id, new_value) @@ -162,7 +162,7 @@ test_different_selection <- function(input_name, input_id, new_value) { # nolint identical( plot_before, list( - app_driver$get_active_module_plot_output("therapy_plot"), + app_driver$get_active_module_plot_output("tmcplot"), app_driver$active_module_element_text("therapy_table") ) ) @@ -189,9 +189,9 @@ testthat::test_that( { skip_if_too_deep(5) app_driver <- app_driver_tm_g_pp_therapy() - plot_before <- app_driver$get_active_module_plot_output("therapy_plot") + plot_before <- app_driver$get_active_module_plot_output("tmcplot") app_driver$set_active_module_input("font_size", 15) - testthat::expect_false(identical(plot_before, app_driver$get_active_module_plot_output("therapy_plot"))) + testthat::expect_false(identical(plot_before, app_driver$get_active_module_plot_output("tmcplot"))) app_driver$expect_no_validation_error() app_driver$stop() } diff --git a/tests/testthat/test-shinytest2-tm_g_pp_vitals.R b/tests/testthat/test-shinytest2-tm_g_pp_vitals.R index da6fc1a61e..8f4b16ef51 100644 --- a/tests/testthat/test-shinytest2-tm_g_pp_vitals.R +++ b/tests/testthat/test-shinytest2-tm_g_pp_vitals.R @@ -95,12 +95,12 @@ testthat::test_that( testthat::test_that("e2e - tm_g_pp_vitals: Selecting patient_id changes plot and doesn't throw validation errors.", { skip_if_too_deep(5) app_driver <- app_driver_tm_g_pp_vitals() - plot_before <- app_driver$get_active_module_plot_output("vitals_plot") + plot_before <- app_driver$get_active_module_plot_output("tmcplot") app_driver$set_active_module_input("patient_id", "AB12345-CHN-15-id-262") testthat::expect_false( identical( plot_before, - app_driver$get_active_module_plot_output("vitals_plot") + app_driver$get_active_module_plot_output("tmcplot") ) ) app_driver$expect_no_validation_error() @@ -111,7 +111,7 @@ testthat::test_that("e2e - tm_g_pp_vitals: Deselecting patient_id column throws skip_if_too_deep(5) app_driver <- app_driver_tm_g_pp_vitals() app_driver$set_active_module_input("patient_id", NULL) - testthat::expect_identical(app_driver$get_active_module_plot_output("vitals_plot"), character(0)) + testthat::expect_identical(app_driver$get_active_module_plot_output("tmcplot"), character(0)) testthat::expect_identical( app_driver$active_module_element_text("patient_id_input > div > span"), "Please select a patient." @@ -126,7 +126,7 @@ testthat::test_that( { skip_if_too_deep(5) app_driver <- app_driver_tm_g_pp_vitals() - plot_before <- app_driver$get_active_module_plot_output("vitals_plot") + plot_before <- app_driver$get_active_module_plot_output("tmcplot") # Changing the PARAMCD variable app_driver$set_active_module_input("paramcd-dataset_ADVS_singleextract-select", "PARAM") @@ -151,7 +151,7 @@ testthat::test_that( testthat::expect_false( identical( plot_before, - app_driver$get_active_module_plot_output("vitals_plot") + app_driver$get_active_module_plot_output("tmcplot") ) ) app_driver$expect_no_validation_error() @@ -163,7 +163,7 @@ testthat::test_that("e2e - tm_g_pp_vitals: Deselecting paramcd throws validation skip_if_too_deep(5) app_driver <- app_driver_tm_g_pp_vitals() app_driver$set_active_module_input("paramcd-dataset_ADVS_singleextract-select", NULL) - testthat::expect_identical(app_driver$get_active_module_plot_output("vitals_plot"), character(0)) + testthat::expect_identical(app_driver$get_active_module_plot_output("tmcplot"), character(0)) testthat::expect_identical( app_driver$active_module_element_text("paramcd-dataset_ADVS_singleextract-select_input > div > span"), "Please select PARAMCD variable." @@ -175,12 +175,12 @@ testthat::test_that("e2e - tm_g_pp_vitals: Deselecting paramcd throws validation testthat::test_that("e2e - tm_g_pp_vitals: Selecting xaxis changes plot and doesn't throw validation errors.", { skip_if_too_deep(5) app_driver <- app_driver_tm_g_pp_vitals() - plot_before <- app_driver$get_active_module_plot_output("vitals_plot") + plot_before <- app_driver$get_active_module_plot_output("tmcplot") app_driver$set_active_module_input("xaxis-dataset_ADVS_singleextract-select", "BMRKR1") testthat::expect_false( identical( plot_before, - app_driver$get_active_module_plot_output("vitals_plot") + app_driver$get_active_module_plot_output("tmcplot") ) ) app_driver$expect_no_validation_error() @@ -191,7 +191,7 @@ testthat::test_that("e2e - tm_g_pp_vitals: Deselecting xaxis column throws valid skip_if_too_deep(5) app_driver <- app_driver_tm_g_pp_vitals() app_driver$set_active_module_input("xaxis-dataset_ADVS_singleextract-select", NULL) - testthat::expect_identical(app_driver$get_active_module_plot_output("vitals_plot"), character(0)) + testthat::expect_identical(app_driver$get_active_module_plot_output("tmcplot"), character(0)) testthat::expect_identical( app_driver$active_module_element_text("xaxis-dataset_ADVS_singleextract-select_input > div > span"), "Please select Vitals x-axis variable." @@ -203,12 +203,12 @@ testthat::test_that("e2e - tm_g_pp_vitals: Deselecting xaxis column throws valid testthat::test_that("e2e - tm_g_pp_vitals: Selecting aval_var changes plot and doesn't throw validation errors.", { skip_if_too_deep(5) app_driver <- app_driver_tm_g_pp_vitals() - plot_before <- app_driver$get_active_module_plot_output("vitals_plot") + plot_before <- app_driver$get_active_module_plot_output("tmcplot") app_driver$set_active_module_input("aval_var-dataset_ADVS_singleextract-select", "BASE2") testthat::expect_false( identical( plot_before, - app_driver$get_active_module_plot_output("vitals_plot") + app_driver$get_active_module_plot_output("tmcplot") ) ) app_driver$expect_no_validation_error() @@ -219,7 +219,7 @@ testthat::test_that("e2e - tm_g_pp_vitals: Deselecting aval_var column throws va skip_if_too_deep(5) app_driver <- app_driver_tm_g_pp_vitals() app_driver$set_active_module_input("aval_var-dataset_ADVS_singleextract-select", NULL) - testthat::expect_identical(app_driver$get_active_module_plot_output("vitals_plot"), character(0)) + testthat::expect_identical(app_driver$get_active_module_plot_output("tmcplot"), character(0)) testthat::expect_identical( app_driver$active_module_element_text("aval_var-dataset_ADVS_singleextract-select_input > div > span"), "Please select AVAL variable." @@ -231,9 +231,9 @@ testthat::test_that("e2e - tm_g_pp_vitals: Deselecting aval_var column throws va testthat::test_that("e2e - tm_g_pp_vitals: Changing font_size changes plot and doesn't throw validation error.", { skip_if_too_deep(5) app_driver <- app_driver_tm_g_pp_vitals() - plot_before <- app_driver$get_active_module_plot_output("vitals_plot") + plot_before <- app_driver$get_active_module_plot_output("tmcplot") app_driver$set_active_module_input("font_size", 20) - testthat::expect_false(identical(plot_before, app_driver$get_active_module_plot_output("vitals_plot"))) + testthat::expect_false(identical(plot_before, app_driver$get_active_module_plot_output("tmcplot"))) app_driver$expect_no_validation_error() app_driver$stop() }) From 68061fdc1f4ad26d8f2d1aff98a54ed518b6b374 Mon Sep 17 00:00:00 2001 From: m7pr Date: Wed, 12 Jun 2024 15:22:52 +0200 Subject: [PATCH 05/14] do not change logging on this branch --- R/tm_a_gee.R | 2 +- R/tm_a_mmrm.R | 2 +- R/tm_g_barchart_simple.R | 2 +- R/tm_g_ci.R | 2 +- R/tm_g_forest_rsp.R | 2 +- R/tm_g_forest_tte.R | 2 +- R/tm_g_ipp.R | 2 +- R/tm_g_km.R | 2 +- R/tm_g_lineplot.R | 2 +- R/tm_g_pp_adverse_events.R | 2 +- R/tm_g_pp_patient_timeline.R | 2 +- R/tm_g_pp_therapy.R | 2 +- R/tm_g_pp_vitals.R | 2 +- R/tm_t_abnormality.R | 2 +- R/tm_t_abnormality_by_worst_grade.R | 2 +- R/tm_t_ancova.R | 2 +- R/tm_t_binary_outcome.R | 2 +- R/tm_t_coxreg.R | 2 +- R/tm_t_events.R | 2 +- R/tm_t_events_by_grade.R | 2 +- R/tm_t_events_patyear.R | 2 +- R/tm_t_events_summary.R | 2 +- R/tm_t_exposure.R | 2 +- R/tm_t_logistic.R | 2 +- R/tm_t_mult_events.R | 2 +- R/tm_t_pp_basic_info.R | 2 +- R/tm_t_pp_laboratory.R | 2 +- R/tm_t_pp_medical_history.R | 2 +- R/tm_t_pp_prior_medication.R | 2 +- R/tm_t_shift_by_arm.R | 2 +- R/tm_t_shift_by_arm_by_worst.R | 2 +- R/tm_t_shift_by_grade.R | 2 +- R/tm_t_smq.R | 2 +- R/tm_t_summary.R | 2 +- R/tm_t_summary_by.R | 2 +- R/tm_t_tte.R | 2 +- 36 files changed, 36 insertions(+), 36 deletions(-) diff --git a/R/tm_a_gee.R b/R/tm_a_gee.R index acde38d4e5..3fe8fd18eb 100644 --- a/R/tm_a_gee.R +++ b/R/tm_a_gee.R @@ -389,7 +389,7 @@ srv_gee <- function(id, checkmate::assert_class(isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - track_shiny_input_changes(input) + if (shiny::isRunning()) logger::log_shiny_input_changes(input, namespace = "teal.modules.clinical") ## split_covariates ---- observeEvent(input[[extract_input("cov_var", dataname)]], ignoreNULL = FALSE, diff --git a/R/tm_a_mmrm.R b/R/tm_a_mmrm.R index 2d62f5ddec..3202e0b444 100644 --- a/R/tm_a_mmrm.R +++ b/R/tm_a_mmrm.R @@ -845,7 +845,7 @@ srv_mmrm <- function(id, checkmate::assert_class(isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - track_shiny_input_changes(input) + if (shiny::isRunning()) logger::log_shiny_input_changes(input, namespace = "teal.modules.clinical") # Reactive responsible for sending a disable/enable signal # to show R code and debug info buttons disable_r_code <- reactiveVal(FALSE) diff --git a/R/tm_g_barchart_simple.R b/R/tm_g_barchart_simple.R index 744958a2af..3181b3c853 100644 --- a/R/tm_g_barchart_simple.R +++ b/R/tm_g_barchart_simple.R @@ -340,7 +340,7 @@ srv_g_barchart_simple <- function(id, moduleServer(id, function(input, output, session) { - track_shiny_input_changes(input) + if (shiny::isRunning()) logger::log_shiny_input_changes(input, namespace = "teal.modules.clinical") rule_dupl <- function(others) { function(value) { othervals <- lapply( diff --git a/R/tm_g_ci.R b/R/tm_g_ci.R index d6538218e1..b5ca188ac3 100644 --- a/R/tm_g_ci.R +++ b/R/tm_g_ci.R @@ -382,7 +382,7 @@ srv_g_ci <- function(id, checkmate::assert_class(isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - track_shiny_input_changes(input) + if (shiny::isRunning()) logger::log_shiny_input_changes(input, namespace = "teal.modules.clinical") selector_list <- teal.transform::data_extract_multiple_srv( data_extract = list(x_var = x_var, y_var = y_var, color = color), datasets = data, diff --git a/R/tm_g_forest_rsp.R b/R/tm_g_forest_rsp.R index 2ca831e466..6f1f94f9c5 100644 --- a/R/tm_g_forest_rsp.R +++ b/R/tm_g_forest_rsp.R @@ -508,7 +508,7 @@ srv_g_forest_rsp <- function(id, checkmate::assert_class(isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - track_shiny_input_changes(input) + if (shiny::isRunning()) logger::log_shiny_input_changes(input, namespace = "teal.modules.clinical") # Setup arm variable selection, default reference arms, and default # comparison arms for encoding panel iv_arm_ref <- arm_ref_comp_observer( diff --git a/R/tm_g_forest_tte.R b/R/tm_g_forest_tte.R index 371ef0c3b5..4e3d395b9f 100644 --- a/R/tm_g_forest_tte.R +++ b/R/tm_g_forest_tte.R @@ -502,7 +502,7 @@ srv_g_forest_tte <- function(id, checkmate::assert_class(isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - track_shiny_input_changes(input) + if (shiny::isRunning()) logger::log_shiny_input_changes(input, namespace = "teal.modules.clinical") # Setup arm variable selection, default reference arms, and default # comparison arms for encoding panel iv_arm_ref <- arm_ref_comp_observer( diff --git a/R/tm_g_ipp.R b/R/tm_g_ipp.R index cd3b57af68..a8d8d926f4 100644 --- a/R/tm_g_ipp.R +++ b/R/tm_g_ipp.R @@ -482,7 +482,7 @@ srv_g_ipp <- function(id, checkmate::assert_class(isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - track_shiny_input_changes(input) + if (shiny::isRunning()) logger::log_shiny_input_changes(input, namespace = "teal.modules.clinical") selector_list <- teal.transform::data_extract_multiple_srv( datasets = data, data_extract = list( diff --git a/R/tm_g_km.R b/R/tm_g_km.R index 644f53998e..9c94feb6e6 100644 --- a/R/tm_g_km.R +++ b/R/tm_g_km.R @@ -637,7 +637,7 @@ srv_g_km <- function(id, checkmate::assert_class(isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - track_shiny_input_changes(input) + if (shiny::isRunning()) logger::log_shiny_input_changes(input, namespace = "teal.modules.clinical") # Setup arm variable selection, default reference arms and default # comparison arms for encoding panel iv_arm_ref <- arm_ref_comp_observer( diff --git a/R/tm_g_lineplot.R b/R/tm_g_lineplot.R index 289bab5c5e..8b53c2ec71 100644 --- a/R/tm_g_lineplot.R +++ b/R/tm_g_lineplot.R @@ -516,7 +516,7 @@ srv_g_lineplot <- function(id, checkmate::assert_class(isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - track_shiny_input_changes(input) + if (shiny::isRunning()) logger::log_shiny_input_changes(input, namespace = "teal.modules.clinical") selector_list <- teal.transform::data_extract_multiple_srv( data_extract = list(x = x, y = y, strata = strata, paramcd = paramcd, y_unit = y_unit, param = param), datasets = data, diff --git a/R/tm_g_pp_adverse_events.R b/R/tm_g_pp_adverse_events.R index a04fee5422..9b5f3bc58f 100644 --- a/R/tm_g_pp_adverse_events.R +++ b/R/tm_g_pp_adverse_events.R @@ -442,7 +442,7 @@ srv_g_adverse_events <- function(id, checkmate::assert_class(isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - track_shiny_input_changes(input) + if (shiny::isRunning()) logger::log_shiny_input_changes(input, namespace = "teal.modules.clinical") patient_id <- reactive(input$patient_id) # Init diff --git a/R/tm_g_pp_patient_timeline.R b/R/tm_g_pp_patient_timeline.R index bbaca9cde6..0648c9ba9e 100644 --- a/R/tm_g_pp_patient_timeline.R +++ b/R/tm_g_pp_patient_timeline.R @@ -713,7 +713,7 @@ srv_g_patient_timeline <- function(id, checkmate::assert_class(isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - track_shiny_input_changes(input) + if (shiny::isRunning()) logger::log_shiny_input_changes(input, namespace = "teal.modules.clinical") patient_id <- reactive(input$patient_id) # Init diff --git a/R/tm_g_pp_therapy.R b/R/tm_g_pp_therapy.R index c94bda1ddc..de0a80fb08 100644 --- a/R/tm_g_pp_therapy.R +++ b/R/tm_g_pp_therapy.R @@ -557,7 +557,7 @@ srv_g_therapy <- function(id, checkmate::assert_class(isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - track_shiny_input_changes(input) + if (shiny::isRunning()) logger::log_shiny_input_changes(input, namespace = "teal.modules.clinical") patient_id <- reactive(input$patient_id) # Init diff --git a/R/tm_g_pp_vitals.R b/R/tm_g_pp_vitals.R index a754427b33..216b463cc7 100644 --- a/R/tm_g_pp_vitals.R +++ b/R/tm_g_pp_vitals.R @@ -411,7 +411,7 @@ srv_g_vitals <- function(id, checkmate::assert_class(isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - track_shiny_input_changes(input) + if (shiny::isRunning()) logger::log_shiny_input_changes(input, namespace = "teal.modules.clinical") patient_id <- reactive(input$patient_id) # Init diff --git a/R/tm_t_abnormality.R b/R/tm_t_abnormality.R index 33da8ebdfe..8bafc9f35a 100644 --- a/R/tm_t_abnormality.R +++ b/R/tm_t_abnormality.R @@ -505,7 +505,7 @@ srv_t_abnormality <- function(id, checkmate::assert_class(isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - track_shiny_input_changes(input) + if (shiny::isRunning()) logger::log_shiny_input_changes(input, namespace = "teal.modules.clinical") selector_list <- teal.transform::data_extract_multiple_srv( data_extract = list( arm_var = arm_var, diff --git a/R/tm_t_abnormality_by_worst_grade.R b/R/tm_t_abnormality_by_worst_grade.R index 7c69765211..177b320488 100644 --- a/R/tm_t_abnormality_by_worst_grade.R +++ b/R/tm_t_abnormality_by_worst_grade.R @@ -503,7 +503,7 @@ srv_t_abnormality_by_worst_grade <- function(id, # nolint: object_length. checkmate::assert_class(shiny::isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - track_shiny_input_changes(input) + if (shiny::isRunning()) logger::log_shiny_input_changes(input, namespace = "teal.modules.clinical") isolate({ resolved <- teal.transform::resolve_delayed(worst_flag_indicator, as.list(data()@env)) teal.widgets::updateOptionalSelectInput( diff --git a/R/tm_t_ancova.R b/R/tm_t_ancova.R index b14bcb182d..1190c56e20 100644 --- a/R/tm_t_ancova.R +++ b/R/tm_t_ancova.R @@ -696,7 +696,7 @@ srv_ancova <- function(id, checkmate::assert_class(shiny::isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - track_shiny_input_changes(input) + if (shiny::isRunning()) logger::log_shiny_input_changes(input, namespace = "teal.modules.clinical") # Setup arm variable selection, default reference arms, and default # comparison arms for encoding panel. iv_arco <- arm_ref_comp_observer( diff --git a/R/tm_t_binary_outcome.R b/R/tm_t_binary_outcome.R index 9f2598ae40..8ce5e39ad5 100644 --- a/R/tm_t_binary_outcome.R +++ b/R/tm_t_binary_outcome.R @@ -752,7 +752,7 @@ srv_t_binary_outcome <- function(id, checkmate::assert_class(shiny::isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - track_shiny_input_changes(input) + if (shiny::isRunning()) logger::log_shiny_input_changes(input, namespace = "teal.modules.clinical") # Setup arm variable selection, default reference arms, and default # comparison arms for encoding panel iv_arm_ref <- arm_ref_comp_observer( diff --git a/R/tm_t_coxreg.R b/R/tm_t_coxreg.R index 466786c362..54ffd94a6f 100644 --- a/R/tm_t_coxreg.R +++ b/R/tm_t_coxreg.R @@ -716,7 +716,7 @@ srv_t_coxreg <- function(id, checkmate::assert_class(shiny::isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - track_shiny_input_changes(input) + if (shiny::isRunning()) logger::log_shiny_input_changes(input, namespace = "teal.modules.clinical") # Observer to update reference and comparison arm input options. iv_arm_ref <- arm_ref_comp_observer( session, diff --git a/R/tm_t_events.R b/R/tm_t_events.R index 9f842977f7..b7e27dd67f 100644 --- a/R/tm_t_events.R +++ b/R/tm_t_events.R @@ -677,7 +677,7 @@ srv_t_events_byterm <- function(id, checkmate::assert_class(shiny::isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - track_shiny_input_changes(input) + if (shiny::isRunning()) logger::log_shiny_input_changes(input, namespace = "teal.modules.clinical") selector_list <- teal.transform::data_extract_multiple_srv( data_extract = list(arm_var = arm_var, hlt = hlt, llt = llt), datasets = data, diff --git a/R/tm_t_events_by_grade.R b/R/tm_t_events_by_grade.R index f29c4e30ed..95faf4a55d 100644 --- a/R/tm_t_events_by_grade.R +++ b/R/tm_t_events_by_grade.R @@ -1021,7 +1021,7 @@ srv_t_events_by_grade <- function(id, checkmate::assert_class(shiny::isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - track_shiny_input_changes(input) + if (shiny::isRunning()) logger::log_shiny_input_changes(input, namespace = "teal.modules.clinical") selector_list <- teal.transform::data_extract_multiple_srv( data_extract = list(arm_var = arm_var, hlt = hlt, llt = llt, grade = grade), datasets = data, diff --git a/R/tm_t_events_patyear.R b/R/tm_t_events_patyear.R index 170ab7763b..0baad9186f 100644 --- a/R/tm_t_events_patyear.R +++ b/R/tm_t_events_patyear.R @@ -401,7 +401,7 @@ srv_events_patyear <- function(id, checkmate::assert_class(shiny::isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - track_shiny_input_changes(input) + if (shiny::isRunning()) logger::log_shiny_input_changes(input, namespace = "teal.modules.clinical") observeEvent(anl_q(), { data_anl <- merged$anl_q()[["ANL"]] aval_unit_var <- merged$anl_input_r()$columns_source$avalu_var diff --git a/R/tm_t_events_summary.R b/R/tm_t_events_summary.R index ea9964d712..3d3becd826 100644 --- a/R/tm_t_events_summary.R +++ b/R/tm_t_events_summary.R @@ -809,7 +809,7 @@ srv_t_events_summary <- function(id, checkmate::assert_class(shiny::isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - track_shiny_input_changes(input) + if (shiny::isRunning()) logger::log_shiny_input_changes(input, namespace = "teal.modules.clinical") data_extract_vars <- list( arm_var = arm_var, dthfl_var = dthfl_var, dcsreas_var = dcsreas_var, aeseq_var = aeseq_var, llt = llt diff --git a/R/tm_t_exposure.R b/R/tm_t_exposure.R index 39210a0de5..1bcac65742 100644 --- a/R/tm_t_exposure.R +++ b/R/tm_t_exposure.R @@ -489,7 +489,7 @@ srv_t_exposure <- function(id, checkmate::assert_class(data, "reactive") checkmate::assert_class(shiny::isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - track_shiny_input_changes(input) + if (shiny::isRunning()) logger::log_shiny_input_changes(input, namespace = "teal.modules.clinical") rule_intersection <- function(other) { function(value) { others <- selector_list()[[other]]()$select diff --git a/R/tm_t_logistic.R b/R/tm_t_logistic.R index 1a1f5b44db..770ea428e4 100644 --- a/R/tm_t_logistic.R +++ b/R/tm_t_logistic.R @@ -450,7 +450,7 @@ srv_t_logistic <- function(id, checkmate::assert_class(shiny::isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - track_shiny_input_changes(input) + if (shiny::isRunning()) logger::log_shiny_input_changes(input, namespace = "teal.modules.clinical") # Observer to update reference and comparison arm input options. iv_arco <- arm_ref_comp_observer( session, diff --git a/R/tm_t_mult_events.R b/R/tm_t_mult_events.R index b986d292c9..048afa1c82 100644 --- a/R/tm_t_mult_events.R +++ b/R/tm_t_mult_events.R @@ -479,7 +479,7 @@ srv_t_mult_events_byterm <- function(id, checkmate::assert_class(shiny::isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - track_shiny_input_changes(input) + if (shiny::isRunning()) logger::log_shiny_input_changes(input, namespace = "teal.modules.clinical") selector_list <- teal.transform::data_extract_multiple_srv( data_extract = list( arm_var = arm_var, diff --git a/R/tm_t_pp_basic_info.R b/R/tm_t_pp_basic_info.R index 818844e13f..e948427202 100644 --- a/R/tm_t_pp_basic_info.R +++ b/R/tm_t_pp_basic_info.R @@ -180,7 +180,7 @@ srv_t_basic_info <- function(id, checkmate::assert_class(shiny::isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - track_shiny_input_changes(input) + if (shiny::isRunning()) logger::log_shiny_input_changes(input, namespace = "teal.modules.clinical") patient_id <- reactive(input$patient_id) # Init diff --git a/R/tm_t_pp_laboratory.R b/R/tm_t_pp_laboratory.R index af5b9dbf63..35925cce9f 100644 --- a/R/tm_t_pp_laboratory.R +++ b/R/tm_t_pp_laboratory.R @@ -376,7 +376,7 @@ srv_g_laboratory <- function(id, checkmate::assert_class(shiny::isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - track_shiny_input_changes(input) + if (shiny::isRunning()) logger::log_shiny_input_changes(input, namespace = "teal.modules.clinical") patient_id <- reactive(input$patient_id) # Init diff --git a/R/tm_t_pp_medical_history.R b/R/tm_t_pp_medical_history.R index 4a1d8ece74..a83eab4dd5 100644 --- a/R/tm_t_pp_medical_history.R +++ b/R/tm_t_pp_medical_history.R @@ -244,7 +244,7 @@ srv_t_medical_history <- function(id, checkmate::assert_class(shiny::isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - track_shiny_input_changes(input) + if (shiny::isRunning()) logger::log_shiny_input_changes(input, namespace = "teal.modules.clinical") patient_id <- reactive(input$patient_id) # Init diff --git a/R/tm_t_pp_prior_medication.R b/R/tm_t_pp_prior_medication.R index 4fa422b072..ee9c5e466e 100644 --- a/R/tm_t_pp_prior_medication.R +++ b/R/tm_t_pp_prior_medication.R @@ -242,7 +242,7 @@ srv_t_prior_medication <- function(id, checkmate::assert_class(shiny::isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - track_shiny_input_changes(input) + if (shiny::isRunning()) logger::log_shiny_input_changes(input, namespace = "teal.modules.clinical") patient_id <- reactive(input$patient_id) selector_list <- teal.transform::data_extract_multiple_srv( diff --git a/R/tm_t_shift_by_arm.R b/R/tm_t_shift_by_arm.R index 8901b0344c..a6abe85134 100644 --- a/R/tm_t_shift_by_arm.R +++ b/R/tm_t_shift_by_arm.R @@ -436,7 +436,7 @@ srv_shift_by_arm <- function(id, checkmate::assert_class(data, "reactive") checkmate::assert_class(shiny::isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - track_shiny_input_changes(input) + if (shiny::isRunning()) logger::log_shiny_input_changes(input, namespace = "teal.modules.clinical") selector_list <- teal.transform::data_extract_multiple_srv( data_extract = list( arm_var = arm_var, diff --git a/R/tm_t_shift_by_arm_by_worst.R b/R/tm_t_shift_by_arm_by_worst.R index d7b46172e5..31fdeffbae 100644 --- a/R/tm_t_shift_by_arm_by_worst.R +++ b/R/tm_t_shift_by_arm_by_worst.R @@ -456,7 +456,7 @@ srv_shift_by_arm_by_worst <- function(id, checkmate::assert_class(data, "reactive") checkmate::assert_class(shiny::isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - track_shiny_input_changes(input) + if (shiny::isRunning()) logger::log_shiny_input_changes(input, namespace = "teal.modules.clinical") selector_list <- teal.transform::data_extract_multiple_srv( data_extract = list( arm_var = arm_var, diff --git a/R/tm_t_shift_by_grade.R b/R/tm_t_shift_by_grade.R index 0541f24b66..9cfdf8f00c 100644 --- a/R/tm_t_shift_by_grade.R +++ b/R/tm_t_shift_by_grade.R @@ -754,7 +754,7 @@ srv_t_shift_by_grade <- function(id, checkmate::assert_class(shiny::isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - track_shiny_input_changes(input) + if (shiny::isRunning()) logger::log_shiny_input_changes(input, namespace = "teal.modules.clinical") selector_list <- teal.transform::data_extract_multiple_srv( data_extract = list( arm_var = arm_var, diff --git a/R/tm_t_smq.R b/R/tm_t_smq.R index 4d1f24e13c..5209dbe167 100644 --- a/R/tm_t_smq.R +++ b/R/tm_t_smq.R @@ -543,7 +543,7 @@ srv_t_smq <- function(id, checkmate::assert_class(data, "reactive") checkmate::assert_class(shiny::isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - track_shiny_input_changes(input) + if (shiny::isRunning()) logger::log_shiny_input_changes(input, namespace = "teal.modules.clinical") selector_list <- teal.transform::data_extract_multiple_srv( data_extract = list( scopes = scopes, diff --git a/R/tm_t_summary.R b/R/tm_t_summary.R index 582bc2d144..13a4411c4d 100644 --- a/R/tm_t_summary.R +++ b/R/tm_t_summary.R @@ -404,7 +404,7 @@ srv_summary <- function(id, checkmate::assert_class(data, "reactive") checkmate::assert_class(shiny::isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - track_shiny_input_changes(input) + if (shiny::isRunning()) logger::log_shiny_input_changes(input, namespace = "teal.modules.clinical") selector_list <- teal.transform::data_extract_multiple_srv( data_extract = list(arm_var = arm_var, summarize_vars = summarize_vars), datasets = data, diff --git a/R/tm_t_summary_by.R b/R/tm_t_summary_by.R index 83375eb25f..c8d7cbe53d 100644 --- a/R/tm_t_summary_by.R +++ b/R/tm_t_summary_by.R @@ -598,7 +598,7 @@ srv_summary_by <- function(id, checkmate::assert_class(shiny::isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - track_shiny_input_changes(input) + if (shiny::isRunning()) logger::log_shiny_input_changes(input, namespace = "teal.modules.clinical") vars <- list(arm_var = arm_var, id_var = id_var, summarize_vars = summarize_vars, by_vars = by_vars) if (!is.null(paramcd)) { diff --git a/R/tm_t_tte.R b/R/tm_t_tte.R index d42a60bf92..bd2e82d559 100644 --- a/R/tm_t_tte.R +++ b/R/tm_t_tte.R @@ -754,7 +754,7 @@ srv_t_tte <- function(id, checkmate::assert_class(data, "reactive") checkmate::assert_class(shiny::isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - track_shiny_input_changes(input) + if (shiny::isRunning()) logger::log_shiny_input_changes(input, namespace = "teal.modules.clinical") # Setup arm variable selection, default reference arms, and default # comparison arms for encoding panel iv_arm_ref <- arm_ref_comp_observer( From 0541b99f4edfa6a6a9aa46797d422a5612d3ddd5 Mon Sep 17 00:00:00 2001 From: m7pr Date: Thu, 13 Jun 2024 11:53:35 +0200 Subject: [PATCH 06/14] fix names in plots --- .../test-shinytest2-tm_g_barchart_simple.R | 2 +- tests/testthat/test-shinytest2-tm_g_forest_rsp.R | 14 +++++++------- tests/testthat/test-shinytest2-tm_g_forest_tte.R | 2 +- tests/testthat/test-shinytest2-tm_g_km.R | 4 ++-- tests/testthat/test-shinytest2-tm_g_lineplot.R | 2 +- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/tests/testthat/test-shinytest2-tm_g_barchart_simple.R b/tests/testthat/test-shinytest2-tm_g_barchart_simple.R index c1c9e4f5f4..d41be69421 100644 --- a/tests/testthat/test-shinytest2-tm_g_barchart_simple.R +++ b/tests/testthat/test-shinytest2-tm_g_barchart_simple.R @@ -121,7 +121,7 @@ testthat::test_that("e2e - tm_g_barchart_simple: Module initializes in teal with app_driver$expect_no_shiny_error() app_driver$expect_no_validation_error() testthat::expect_true( - app_driver$is_visible(app_driver$active_module_element("myplot-plot_out_main")) + app_driver$is_visible(app_driver$active_module_element("tmcplot-plot_out_main")) ) testthat::expect_true(app_driver$is_visible(app_driver$active_module_element("table"))) diff --git a/tests/testthat/test-shinytest2-tm_g_forest_rsp.R b/tests/testthat/test-shinytest2-tm_g_forest_rsp.R index 5bbd97ac1a..bf1c6a95d7 100644 --- a/tests/testthat/test-shinytest2-tm_g_forest_rsp.R +++ b/tests/testthat/test-shinytest2-tm_g_forest_rsp.R @@ -94,7 +94,7 @@ testthat::test_that("e2e - tm_g_forest_rsp: Module initializes in teal without e app_driver <- app_driver_tm_g_forest_rsp() app_driver$expect_no_shiny_error() app_driver$expect_no_validation_error() - testthat::expect_true(app_driver$is_visible(app_driver$active_module_element("myplot-plot_main"))) + testthat::expect_true(app_driver$is_visible(app_driver$active_module_element("tmcplot-plot_main"))) app_driver$stop() }) @@ -175,7 +175,7 @@ testthat::test_that("e2e - tm_g_forest_rsp: Deselecting arm_var throws validatio app_driver$set_active_module_input("arm_var-dataset_ADSL_singleextract-select", NULL) app_driver$expect_validation_error() testthat::expect_match( - app_driver$active_module_element_text("myplot-plot_out_main"), + app_driver$active_module_element_text("tmcplot-plot_out_main"), "Treatment variable must be selected" ) app_driver$stop() @@ -197,7 +197,7 @@ testthat::test_that("e2e - tm_g_forest_rsp: Deselecting paramcd throws validatio app_driver$set_active_module_input("paramcd-dataset_ADRS_singleextract-filter1-vals", NULL) app_driver$expect_validation_error() testthat::expect_match( - app_driver$active_module_element_text("myplot-plot_out_main"), + app_driver$active_module_element_text("tmcplot-plot_out_main"), "Please select Endpoint filter" ) app_driver$stop() @@ -219,7 +219,7 @@ testthat::test_that("e2e - tm_g_forest_rsp: Deselecting responders throws valida app_driver$set_active_module_input("responders", NULL) app_driver$expect_validation_error() testthat::expect_match( - app_driver$active_module_element_text("myplot-plot_out_main"), + app_driver$active_module_element_text("tmcplot-plot_out_main"), "`Responders` field is empty" ) app_driver$stop() @@ -241,7 +241,7 @@ testthat::test_that("e2e - tm_g_forest_rsp: Selecting a non-factors column in su app_driver$set_active_module_input("subgroup_var-dataset_ADSL_singleextract-select", c("SEX", "AGE")) app_driver$expect_validation_error() testthat::expect_match( - app_driver$active_module_element_text("myplot-plot_out_main"), + app_driver$active_module_element_text("tmcplot-plot_out_main"), "Not all subgroup variables are factors" ) app_driver$stop() @@ -293,13 +293,13 @@ testthat::test_that("e2e - tm_g_forest_rsp: Deselecting conf_level or selecting app_driver$set_active_module_input("conf_level", NULL) app_driver$expect_validation_error() testthat::expect_match( - app_driver$active_module_element_text("myplot-plot_out_main"), + app_driver$active_module_element_text("tmcplot-plot_out_main"), "Please choose a confidence level between 0 and 1" ) app_driver$set_active_module_input("conf_level", 2) app_driver$expect_validation_error() testthat::expect_match( - app_driver$active_module_element_text("myplot-plot_out_main"), + app_driver$active_module_element_text("tmcplot-plot_out_main"), "Please choose a confidence level between 0 and 1" ) app_driver$stop() diff --git a/tests/testthat/test-shinytest2-tm_g_forest_tte.R b/tests/testthat/test-shinytest2-tm_g_forest_tte.R index e3d77e3e6e..766b2433d0 100644 --- a/tests/testthat/test-shinytest2-tm_g_forest_tte.R +++ b/tests/testthat/test-shinytest2-tm_g_forest_tte.R @@ -82,7 +82,7 @@ testthat::test_that("e2e - tm_g_forest_tte: Module initializes in teal without e app_driver$expect_no_shiny_error() app_driver$expect_no_validation_error() testthat::expect_true( - app_driver$is_visible(app_driver$active_module_element("myplot-plot_out_main")) + app_driver$is_visible(app_driver$active_module_element("tmcplot-plot_out_main")) ) app_driver$stop() diff --git a/tests/testthat/test-shinytest2-tm_g_km.R b/tests/testthat/test-shinytest2-tm_g_km.R index eba84d4ddf..a67e128f5a 100644 --- a/tests/testthat/test-shinytest2-tm_g_km.R +++ b/tests/testthat/test-shinytest2-tm_g_km.R @@ -198,7 +198,7 @@ testthat::test_that("e2e - tm_g_km: Deselecting {paramcd} throws validation erro "An endpoint is required" ) testthat::expect_match( - app_driver$active_module_element_text("myplot-plot-with-settings"), + app_driver$active_module_element_text("tmcplot-plot-with-settings"), "An endpoint is required" ) app_driver$stop() @@ -382,7 +382,7 @@ testthat::test_that("e2e - tm_g_km: Deselecting {conf_level} throws validation e app_driver$set_active_module_input("conf_level", -1) app_driver$expect_validation_error() testthat::expect_match( - app_driver$active_module_element_text("myplot-plot-with-settings"), + app_driver$active_module_element_text("tmcplot-plot-with-settings"), "Confidence level must be between 0 and 1." ) app_driver$stop() diff --git a/tests/testthat/test-shinytest2-tm_g_lineplot.R b/tests/testthat/test-shinytest2-tm_g_lineplot.R index 6c8ecd5018..b9bff5a2b2 100644 --- a/tests/testthat/test-shinytest2-tm_g_lineplot.R +++ b/tests/testthat/test-shinytest2-tm_g_lineplot.R @@ -72,7 +72,7 @@ testthat::test_that("e2e - tm_g_lineplot: Module initializes in teal without err app_driver$expect_no_validation_error() testthat::expect_true( - app_driver$is_visible(app_driver$active_module_element("myplot-plot_main")) + app_driver$is_visible(app_driver$active_module_element("tmcplot-plot_main")) ) app_driver$stop() From 1f63d38093821e756055e4248f7aea120b2106e5 Mon Sep 17 00:00:00 2001 From: m7pr Date: Thu, 13 Jun 2024 11:55:27 +0200 Subject: [PATCH 07/14] unify names of plots --- tests/testthat/test-shinytest2-tm_g_pp_therapy.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/testthat/test-shinytest2-tm_g_pp_therapy.R b/tests/testthat/test-shinytest2-tm_g_pp_therapy.R index f103536e7f..8aecc834ab 100644 --- a/tests/testthat/test-shinytest2-tm_g_pp_therapy.R +++ b/tests/testthat/test-shinytest2-tm_g_pp_therapy.R @@ -96,7 +96,7 @@ testthat::test_that("e2e - tm_g_pp_therapy: Module initializes in teal without e app_driver$expect_no_validation_error() testthat::expect_true( - app_driver$is_visible(app_driver$active_module_element("therapy_plot-plot_out_main")) + app_driver$is_visible(app_driver$active_module_element("tmcplot-plot_out_main")) ) testthat::expect_true( app_driver$is_visible(app_driver$active_module_element("therapy_table")) From 367594fc38eb3c1f1d92131d745830fdc1bfb1e1 Mon Sep 17 00:00:00 2001 From: m7pr Date: Thu, 13 Jun 2024 12:36:04 +0200 Subject: [PATCH 08/14] substitute teal.widgets::plot_with_settings_ui(id = ns("tmcplot")) with tmcplot_with_settings() --- R/tm_a_mmrm.R | 2 +- R/tm_g_barchart_simple.R | 2 +- R/tm_g_ci.R | 2 +- R/tm_g_forest_rsp.R | 2 +- R/tm_g_forest_tte.R | 2 +- R/tm_g_ipp.R | 2 +- R/tm_g_km.R | 4 +--- R/tm_g_lineplot.R | 4 +--- R/tm_g_pp_adverse_events.R | 2 +- R/tm_g_pp_patient_timeline.R | 2 +- R/tm_g_pp_therapy.R | 2 +- R/tm_g_pp_vitals.R | 2 +- R/utils.R | 5 ++--- 13 files changed, 14 insertions(+), 19 deletions(-) diff --git a/R/tm_a_mmrm.R b/R/tm_a_mmrm.R index 3202e0b444..0323b9cf9a 100644 --- a/R/tm_a_mmrm.R +++ b/R/tm_a_mmrm.R @@ -624,7 +624,7 @@ ui_mmrm <- function(id, ...) { textOutput(ns("null_input_msg")), tags$h3(textOutput(ns("mmrm_title"))), teal.widgets::table_with_settings_ui(ns("mmrm_table")), - teal.widgets::plot_with_settings_ui(id = ns("tmcplot")) + tmcplot_with_settings() ), encoding = tags$div( ### Reporter diff --git a/R/tm_g_barchart_simple.R b/R/tm_g_barchart_simple.R index 3181b3c853..47e411a041 100644 --- a/R/tm_g_barchart_simple.R +++ b/R/tm_g_barchart_simple.R @@ -204,7 +204,7 @@ ui_g_barchart_simple <- function(id, ...) { ), teal.widgets::standard_layout( output = teal.widgets::white_small_well( - teal.widgets::plot_with_settings_ui(id = ns("tmcplot")), + tmcplot_with_settings(), uiOutput(ns("table"), class = "overflow-y-scroll max-h-250") ), encoding = tags$div( diff --git a/R/tm_g_ci.R b/R/tm_g_ci.R index b5ca188ac3..a8875cb85c 100644 --- a/R/tm_g_ci.R +++ b/R/tm_g_ci.R @@ -319,7 +319,7 @@ ui_g_ci <- function(id, ...) { args <- list(...) teal.widgets::standard_layout( - output = teal.widgets::plot_with_settings_ui(id = ns("tmcplot")), + output = tmcplot_with_settings(), encoding = tags$div( ### Reporter teal.reporter::simple_reporter_ui(ns("simple_reporter")), diff --git a/R/tm_g_forest_rsp.R b/R/tm_g_forest_rsp.R index 6f1f94f9c5..d0f8a8ec1a 100644 --- a/R/tm_g_forest_rsp.R +++ b/R/tm_g_forest_rsp.R @@ -398,7 +398,7 @@ ui_g_forest_rsp <- function(id, ...) { ns <- NS(id) teal.widgets::standard_layout( - output = teal.widgets::plot_with_settings_ui(id = ns("tmcplot")), + output = tmcplot_with_settings(), encoding = tags$div( ### Reporter teal.reporter::simple_reporter_ui(ns("simple_reporter")), diff --git a/R/tm_g_forest_tte.R b/R/tm_g_forest_tte.R index 4e3d395b9f..049c04ffb9 100644 --- a/R/tm_g_forest_tte.R +++ b/R/tm_g_forest_tte.R @@ -387,7 +387,7 @@ ui_g_forest_tte <- function(id, ...) { ns <- NS(id) teal.widgets::standard_layout( - output = teal.widgets::plot_with_settings_ui(id = ns("tmcplot")), + output = tmcplot_with_settings(), encoding = tags$div( ### Reporter teal.reporter::simple_reporter_ui(ns("simple_reporter")), diff --git a/R/tm_g_ipp.R b/R/tm_g_ipp.R index a8d8d926f4..cc6ff1f799 100644 --- a/R/tm_g_ipp.R +++ b/R/tm_g_ipp.R @@ -373,7 +373,7 @@ ui_g_ipp <- function(id, ...) { ns <- NS(id) teal.widgets::standard_layout( - output = teal.widgets::plot_with_settings_ui(id = ns("tmcplot")), + output = tmcplot_with_settings(), encoding = tags$div( ### Reporter teal.reporter::simple_reporter_ui(ns("simple_reporter")), diff --git a/R/tm_g_km.R b/R/tm_g_km.R index 9c94feb6e6..d3554f2999 100644 --- a/R/tm_g_km.R +++ b/R/tm_g_km.R @@ -435,9 +435,7 @@ ui_g_km <- function(id, ...) { teal.widgets::standard_layout( output = teal.widgets::white_small_well( verbatimTextOutput(outputId = ns("text")), - teal.widgets::plot_with_settings_ui( - id = ns("tmcplot") - ) + tmcplot_with_settings() ), encoding = tags$div( ### Reporter diff --git a/R/tm_g_lineplot.R b/R/tm_g_lineplot.R index 8b53c2ec71..ad519ad2a2 100644 --- a/R/tm_g_lineplot.R +++ b/R/tm_g_lineplot.R @@ -353,9 +353,7 @@ ui_g_lineplot <- function(id, ...) { teal.widgets::standard_layout( output = teal.widgets::white_small_well( verbatimTextOutput(outputId = ns("text")), - teal.widgets::plot_with_settings_ui( - id = ns("tmcplot") - ) + tmcplot_with_settings() ), encoding = tags$div( ### Reporter diff --git a/R/tm_g_pp_adverse_events.R b/R/tm_g_pp_adverse_events.R index 9b5f3bc58f..44eea09568 100644 --- a/R/tm_g_pp_adverse_events.R +++ b/R/tm_g_pp_adverse_events.R @@ -335,7 +335,7 @@ ui_g_adverse_events <- function(id, ...) { htmlOutput(ns("title")), teal.widgets::get_dt_rows(ns("table"), ns("table_rows")), DT::DTOutput(outputId = ns("table")), - teal.widgets::plot_with_settings_ui(id = ns("tmcplot")) + tmcplot_with_settings() ), encoding = tags$div( ### Reporter diff --git a/R/tm_g_pp_patient_timeline.R b/R/tm_g_pp_patient_timeline.R index 0648c9ba9e..c6080a2428 100644 --- a/R/tm_g_pp_patient_timeline.R +++ b/R/tm_g_pp_patient_timeline.R @@ -562,7 +562,7 @@ ui_g_patient_timeline <- function(id, ...) { ns <- NS(id) teal.widgets::standard_layout( - output = teal.widgets::plot_with_settings_ui(id = ns("tmcplot")), + output = tmcplot_with_settings(), encoding = tags$div( ### Reporter teal.reporter::simple_reporter_ui(ns("simple_reporter")), diff --git a/R/tm_g_pp_therapy.R b/R/tm_g_pp_therapy.R index de0a80fb08..0bfa35ff11 100644 --- a/R/tm_g_pp_therapy.R +++ b/R/tm_g_pp_therapy.R @@ -432,7 +432,7 @@ ui_g_therapy <- function(id, ...) { htmlOutput(ns("title")), teal.widgets::get_dt_rows(ns("therapy_table"), ns("therapy_table_rows")), DT::DTOutput(outputId = ns("therapy_table")), - teal.widgets::plot_with_settings_ui(id = ns("tmcplot")) + tmcplot_with_settings() ), encoding = tags$div( ### Reporter diff --git a/R/tm_g_pp_vitals.R b/R/tm_g_pp_vitals.R index 216b463cc7..e0ddff384f 100644 --- a/R/tm_g_pp_vitals.R +++ b/R/tm_g_pp_vitals.R @@ -341,7 +341,7 @@ ui_g_vitals <- function(id, ...) { ns <- NS(id) teal.widgets::standard_layout( - output = teal.widgets::plot_with_settings_ui(id = ns("tmcplot")), + output = tmcplot_with_settings(), encoding = tags$div( ### Reporter teal.reporter::simple_reporter_ui(ns("simple_reporter")), diff --git a/R/utils.R b/R/utils.R index 108c7676d6..0a374bc735 100644 --- a/R/utils.R +++ b/R/utils.R @@ -947,15 +947,14 @@ set_default_total_label <- function(total_label) { # for mocking in tests interactive <- NULL +tmcplot_with_settings <- function() teal.widgets::plot_with_settings_ui(id = ns("tmcplot")) track_shiny_input_changes <- function(input){ if (shiny::isRunning()) { - plot_nss <- c("mmrm", "myplot", "chart", "patient_timeline_plot", "therapy_plot", "vitals_plot") - elements <- c("plot_modal_width", "flex_width", "plot_modal_height", "flex_height") + exclude_inputs <- paste("tmcplot", elements, sep = "-") - exclude_inputs <- unlist(lapply(plot_nss, paste, elements, sep = "-")) logger::log_shiny_input_changes( input, level = logger::DEBUG, From df0c5da92b42f3f1557c483caba73c7abf560b26 Mon Sep 17 00:00:00 2001 From: m7pr Date: Thu, 13 Jun 2024 12:40:48 +0200 Subject: [PATCH 09/14] introduce tmcplot_with_settings_srv and tmcplot_with_settings_ui --- R/tm_a_mmrm.R | 5 ++--- R/tm_g_barchart_simple.R | 5 ++--- R/tm_g_ci.R | 5 ++--- R/tm_g_forest_rsp.R | 5 ++--- R/tm_g_forest_tte.R | 5 ++--- R/tm_g_ipp.R | 5 ++--- R/tm_g_km.R | 5 ++--- R/tm_g_lineplot.R | 5 ++--- R/tm_g_pp_adverse_events.R | 5 ++--- R/tm_g_pp_patient_timeline.R | 5 ++--- R/tm_g_pp_therapy.R | 5 ++--- R/tm_g_pp_vitals.R | 5 ++--- 12 files changed, 24 insertions(+), 36 deletions(-) diff --git a/R/tm_a_mmrm.R b/R/tm_a_mmrm.R index 0323b9cf9a..a48894ca6a 100644 --- a/R/tm_a_mmrm.R +++ b/R/tm_a_mmrm.R @@ -624,7 +624,7 @@ ui_mmrm <- function(id, ...) { textOutput(ns("null_input_msg")), tags$h3(textOutput(ns("mmrm_title"))), teal.widgets::table_with_settings_ui(ns("mmrm_table")), - tmcplot_with_settings() + tmcplot_with_settings_ui() ), encoding = tags$div( ### Reporter @@ -1420,8 +1420,7 @@ srv_mmrm <- function(id, ) }) - pws <- teal.widgets::plot_with_settings_srv( - id = "tmcplot", + pws <- tmcplot_with_settings_srv( plot_r = plot_r, height = plot_height, width = plot_width, diff --git a/R/tm_g_barchart_simple.R b/R/tm_g_barchart_simple.R index 47e411a041..8ac94cd35a 100644 --- a/R/tm_g_barchart_simple.R +++ b/R/tm_g_barchart_simple.R @@ -204,7 +204,7 @@ ui_g_barchart_simple <- function(id, ...) { ), teal.widgets::standard_layout( output = teal.widgets::white_small_well( - tmcplot_with_settings(), + tmcplot_with_settings_ui(), uiOutput(ns("table"), class = "overflow-y-scroll max-h-250") ), encoding = tags$div( @@ -536,8 +536,7 @@ srv_g_barchart_simple <- function(id, } # Insert the plot into a plot with settings module from teal.widgets - pws <- teal.widgets::plot_with_settings_srv( - id = "tmcplot", + pws <- tmcplot_with_settings_srv( plot_r = plot_r, height = plot_height, width = plot_width diff --git a/R/tm_g_ci.R b/R/tm_g_ci.R index a8875cb85c..18c800e252 100644 --- a/R/tm_g_ci.R +++ b/R/tm_g_ci.R @@ -319,7 +319,7 @@ ui_g_ci <- function(id, ...) { args <- list(...) teal.widgets::standard_layout( - output = tmcplot_with_settings(), + output = tmcplot_with_settings_ui(), encoding = tags$div( ### Reporter teal.reporter::simple_reporter_ui(ns("simple_reporter")), @@ -473,8 +473,7 @@ srv_g_ci <- function(id, title = label ) - pws <- teal.widgets::plot_with_settings_srv( - id = "tmcplot", + pws <- tmcplot_with_settings_srv( plot_r = plot_r, height = plot_height, width = plot_width diff --git a/R/tm_g_forest_rsp.R b/R/tm_g_forest_rsp.R index d0f8a8ec1a..c4932f7cba 100644 --- a/R/tm_g_forest_rsp.R +++ b/R/tm_g_forest_rsp.R @@ -398,7 +398,7 @@ ui_g_forest_rsp <- function(id, ...) { ns <- NS(id) teal.widgets::standard_layout( - output = tmcplot_with_settings(), + output = tmcplot_with_settings_ui(), encoding = tags$div( ### Reporter teal.reporter::simple_reporter_ui(ns("simple_reporter")), @@ -733,8 +733,7 @@ srv_g_forest_rsp <- function(id, plot_r <- reactive(all_q()[["p"]]) - pws <- teal.widgets::plot_with_settings_srv( - id = "tmcplot", + pws <- tmcplot_with_settings_srv( plot_r = plot_r, height = plot_height, width = plot_width diff --git a/R/tm_g_forest_tte.R b/R/tm_g_forest_tte.R index 049c04ffb9..39dcb9cfc8 100644 --- a/R/tm_g_forest_tte.R +++ b/R/tm_g_forest_tte.R @@ -387,7 +387,7 @@ ui_g_forest_tte <- function(id, ...) { ns <- NS(id) teal.widgets::standard_layout( - output = tmcplot_with_settings(), + output = tmcplot_with_settings_ui(), encoding = tags$div( ### Reporter teal.reporter::simple_reporter_ui(ns("simple_reporter")), @@ -658,8 +658,7 @@ srv_g_forest_tte <- function(id, # Outputs to render. plot_r <- reactive(all_q()[["p"]]) - pws <- teal.widgets::plot_with_settings_srv( - id = "tmcplot", + pws <- tmcplot_with_settings_srv( plot_r = plot_r, height = plot_height, width = plot_width diff --git a/R/tm_g_ipp.R b/R/tm_g_ipp.R index cc6ff1f799..e4c52d9578 100644 --- a/R/tm_g_ipp.R +++ b/R/tm_g_ipp.R @@ -373,7 +373,7 @@ ui_g_ipp <- function(id, ...) { ns <- NS(id) teal.widgets::standard_layout( - output = tmcplot_with_settings(), + output = tmcplot_with_settings_ui(), encoding = tags$div( ### Reporter teal.reporter::simple_reporter_ui(ns("simple_reporter")), @@ -610,8 +610,7 @@ srv_g_ipp <- function(id, plot_r <- reactive(all_q()[["plot"]]) # Insert the plot into a plot with settings module from teal.widgets - pws <- teal.widgets::plot_with_settings_srv( - id = "tmcplot", + pws <- tmcplot_with_settings_srv( plot_r = plot_r, height = plot_height, width = plot_width diff --git a/R/tm_g_km.R b/R/tm_g_km.R index d3554f2999..8433454016 100644 --- a/R/tm_g_km.R +++ b/R/tm_g_km.R @@ -435,7 +435,7 @@ ui_g_km <- function(id, ...) { teal.widgets::standard_layout( output = teal.widgets::white_small_well( verbatimTextOutput(outputId = ns("text")), - tmcplot_with_settings() + tmcplot_with_settings_ui() ), encoding = tags$div( ### Reporter @@ -805,8 +805,7 @@ srv_g_km <- function(id, plot_r <- reactive(all_q()[["plot"]]) # Insert the plot into a plot with settings module from teal.widgets - pws <- teal.widgets::plot_with_settings_srv( - id = "tmcplot", + pws <- tmcplot_with_settings_srv( plot_r = plot_r, height = plot_height, width = plot_width diff --git a/R/tm_g_lineplot.R b/R/tm_g_lineplot.R index ad519ad2a2..4abf175c00 100644 --- a/R/tm_g_lineplot.R +++ b/R/tm_g_lineplot.R @@ -353,7 +353,7 @@ ui_g_lineplot <- function(id, ...) { teal.widgets::standard_layout( output = teal.widgets::white_small_well( verbatimTextOutput(outputId = ns("text")), - tmcplot_with_settings() + tmcplot_with_settings_ui() ), encoding = tags$div( ### Reporter @@ -625,8 +625,7 @@ srv_g_lineplot <- function(id, plot_r <- reactive(all_q()[["plot"]]) # Insert the plot into a plot with settings module from teal.widgets - pws <- teal.widgets::plot_with_settings_srv( - id = "tmcplot", + pws <- tmcplot_with_settings_srv( plot_r = plot_r, height = plot_height, width = plot_width diff --git a/R/tm_g_pp_adverse_events.R b/R/tm_g_pp_adverse_events.R index 44eea09568..afa2fa45b7 100644 --- a/R/tm_g_pp_adverse_events.R +++ b/R/tm_g_pp_adverse_events.R @@ -335,7 +335,7 @@ ui_g_adverse_events <- function(id, ...) { htmlOutput(ns("title")), teal.widgets::get_dt_rows(ns("table"), ns("table_rows")), DT::DTOutput(outputId = ns("table")), - tmcplot_with_settings() + tmcplot_with_settings_ui() ), encoding = tags$div( ### Reporter @@ -564,8 +564,7 @@ srv_g_adverse_events <- function(id, all_q()[["plot"]] }) - pws <- teal.widgets::plot_with_settings_srv( - id = "tmcplot", + pws <- tmcplot_with_settings_srv( plot_r = plot_r, height = plot_height, width = plot_width diff --git a/R/tm_g_pp_patient_timeline.R b/R/tm_g_pp_patient_timeline.R index c6080a2428..fa495bdc93 100644 --- a/R/tm_g_pp_patient_timeline.R +++ b/R/tm_g_pp_patient_timeline.R @@ -562,7 +562,7 @@ ui_g_patient_timeline <- function(id, ...) { ns <- NS(id) teal.widgets::standard_layout( - output = tmcplot_with_settings(), + output = tmcplot_with_settings_ui(), encoding = tags$div( ### Reporter teal.reporter::simple_reporter_ui(ns("simple_reporter")), @@ -905,8 +905,7 @@ srv_g_patient_timeline <- function(id, plot_r <- reactive(all_q()[["tmcplot"]]) - pws <- teal.widgets::plot_with_settings_srv( - id = "tmcplot", + pws <- tmcplot_with_settings_srv( plot_r = plot_r, height = plot_height, width = plot_width diff --git a/R/tm_g_pp_therapy.R b/R/tm_g_pp_therapy.R index 0bfa35ff11..1beb3b6e13 100644 --- a/R/tm_g_pp_therapy.R +++ b/R/tm_g_pp_therapy.R @@ -432,7 +432,7 @@ ui_g_therapy <- function(id, ...) { htmlOutput(ns("title")), teal.widgets::get_dt_rows(ns("therapy_table"), ns("therapy_table_rows")), DT::DTOutput(outputId = ns("therapy_table")), - tmcplot_with_settings() + tmcplot_with_settings_ui() ), encoding = tags$div( ### Reporter @@ -684,8 +684,7 @@ srv_g_therapy <- function(id, all_q()[["tmcplot"]] }) - pws <- teal.widgets::plot_with_settings_srv( - id = "tmcplot", + pws <- tmcplot_with_settings_srv( plot_r = plot_r, height = plot_height, width = plot_width diff --git a/R/tm_g_pp_vitals.R b/R/tm_g_pp_vitals.R index e0ddff384f..5dcdb65959 100644 --- a/R/tm_g_pp_vitals.R +++ b/R/tm_g_pp_vitals.R @@ -341,7 +341,7 @@ ui_g_vitals <- function(id, ...) { ns <- NS(id) teal.widgets::standard_layout( - output = tmcplot_with_settings(), + output = tmcplot_with_settings_ui(), encoding = tags$div( ### Reporter teal.reporter::simple_reporter_ui(ns("simple_reporter")), @@ -550,8 +550,7 @@ srv_g_vitals <- function(id, plot_r <- reactive(all_q()[["result_plot"]]) - pws <- teal.widgets::plot_with_settings_srv( - id = "tmcplot", + pws <- tmcplot_with_settings_srv( plot_r = plot_r, height = plot_height, width = plot_width From 68d684a89b7c63fc0fdea61bf5ed000d3aa7e4de Mon Sep 17 00:00:00 2001 From: m7pr Date: Thu, 13 Jun 2024 12:55:51 +0200 Subject: [PATCH 10/14] unify table names --- R/tm_a_gee.R | 7 ++----- R/tm_a_mmrm.R | 9 ++++----- R/tm_t_abnormality.R | 7 ++----- R/tm_t_abnormality_by_worst_grade.R | 7 ++----- R/tm_t_ancova.R | 7 ++----- R/tm_t_binary_outcome.R | 7 ++----- R/tm_t_coxreg.R | 7 ++----- R/tm_t_events.R | 9 ++------- R/tm_t_events_by_grade.R | 7 ++----- R/tm_t_events_patyear.R | 7 ++----- R/tm_t_events_summary.R | 7 ++----- R/tm_t_exposure.R | 7 ++----- R/tm_t_logistic.R | 9 ++------- R/tm_t_mult_events.R | 6 ++---- R/tm_t_pp_medical_history.R | 9 ++------- R/tm_t_shift_by_arm.R | 7 ++----- R/tm_t_shift_by_arm_by_worst.R | 7 ++----- R/tm_t_shift_by_grade.R | 7 ++----- R/tm_t_smq.R | 7 ++----- R/tm_t_summary.R | 4 ++-- R/tm_t_summary_by.R | 7 ++----- R/tm_t_tte.R | 4 ++-- R/utils.R | 6 +++++- tests/testthat/test-shinytest2-tm_a_mmrm.R | 18 +++++++++--------- 24 files changed, 60 insertions(+), 119 deletions(-) diff --git a/R/tm_a_gee.R b/R/tm_a_gee.R index 3fe8fd18eb..ac72b385e9 100644 --- a/R/tm_a_gee.R +++ b/R/tm_a_gee.R @@ -263,7 +263,7 @@ ui_gee <- function(id, ...) { teal.widgets::standard_layout( output = teal.widgets::white_small_well( tags$h3(textOutput(ns("gee_title"))), - teal.widgets::table_with_settings_ui(ns("table")) + tmctable_with_settings_ui() ), encoding = tags$div( ### Reporter @@ -547,10 +547,7 @@ srv_gee <- function(id, table_q()[["result_table"]] }) - teal.widgets::table_with_settings_srv( - id = "table", - table_r = table_r - ) + tmctable_with_settings_srv(table_r = table_r) # Render R code teal.widgets::verbatim_popup_srv( diff --git a/R/tm_a_mmrm.R b/R/tm_a_mmrm.R index a48894ca6a..4f56876944 100644 --- a/R/tm_a_mmrm.R +++ b/R/tm_a_mmrm.R @@ -623,7 +623,7 @@ ui_mmrm <- function(id, ...) { output = teal.widgets::white_small_well( textOutput(ns("null_input_msg")), tags$h3(textOutput(ns("mmrm_title"))), - teal.widgets::table_with_settings_ui(ns("mmrm_table")), + tmctable_with_settings_ui(), tmcplot_with_settings_ui() ), encoding = tags$div( @@ -1004,9 +1004,9 @@ srv_mmrm <- function(id, output_function <- input$output_function if (isTRUE(grepl("^t_", output_function))) { show_plot_rv(FALSE) - shinyjs::show("mmrm_table") + shinyjs::show("table") } else if (isTRUE(grepl("^g_", output_function))) { - shinyjs::hide("mmrm_table") + shinyjs::hide("table") show_plot_rv(TRUE) } else { stop("unknown output type") @@ -1427,8 +1427,7 @@ srv_mmrm <- function(id, show_hide_signal = reactive(show_plot_rv()) ) - teal.widgets::table_with_settings_srv( - id = "mmrm_table", + tmctable_with_settings_srv( table_r = table_r, show_hide_signal = reactive(!show_plot_rv()) ) diff --git a/R/tm_t_abnormality.R b/R/tm_t_abnormality.R index 8bafc9f35a..f35ee35ccd 100644 --- a/R/tm_t_abnormality.R +++ b/R/tm_t_abnormality.R @@ -397,7 +397,7 @@ ui_t_abnormality <- function(id, ...) { ) teal.widgets::standard_layout( - output = teal.widgets::white_small_well(teal.widgets::table_with_settings_ui(ns("table"))), + output = teal.widgets::white_small_well(tmctable_with_settings_ui()), encoding = tags$div( ### Reporter teal.reporter::simple_reporter_ui(ns("simple_reporter")), @@ -643,10 +643,7 @@ srv_t_abnormality <- function(id, # Outputs to render. table_r <- reactive(all_q()[["result"]]) - teal.widgets::table_with_settings_srv( - id = "table", - table_r = table_r - ) + tmctable_with_settings_srv(table_r = table_r) # Render R code. teal.widgets::verbatim_popup_srv( diff --git a/R/tm_t_abnormality_by_worst_grade.R b/R/tm_t_abnormality_by_worst_grade.R index 177b320488..296cdb6090 100644 --- a/R/tm_t_abnormality_by_worst_grade.R +++ b/R/tm_t_abnormality_by_worst_grade.R @@ -399,7 +399,7 @@ ui_t_abnormality_by_worst_grade <- function(id, ...) { # nolint: object_length. ) teal.widgets::standard_layout( - output = teal.widgets::white_small_well(teal.widgets::table_with_settings_ui(ns("table"))), + output = teal.widgets::white_small_well(tmctable_with_settings_ui()), encoding = tags$div( ### Reporter teal.reporter::simple_reporter_ui(ns("simple_reporter")), @@ -662,10 +662,7 @@ srv_t_abnormality_by_worst_grade <- function(id, # nolint: object_length. # Outputs to render. table_r <- reactive(all_q()[["result"]]) - teal.widgets::table_with_settings_srv( - id = "table", - table_r = table_r - ) + tmctable_with_settings_srv(table_r = table_r) # Render R code. teal.widgets::verbatim_popup_srv( diff --git a/R/tm_t_ancova.R b/R/tm_t_ancova.R index 1190c56e20..a21ebfb6c5 100644 --- a/R/tm_t_ancova.R +++ b/R/tm_t_ancova.R @@ -579,7 +579,7 @@ ui_ancova <- function(id, ...) { ns <- NS(id) teal.widgets::standard_layout( - output = teal.widgets::white_small_well(teal.widgets::table_with_settings_ui(ns("table"))), + output = teal.widgets::white_small_well(tmctable_with_settings_ui()), encoding = tags$div( ### Reporter teal.reporter::simple_reporter_ui(ns("simple_reporter")), @@ -941,10 +941,7 @@ srv_ancova <- function(id, table_q()[["result"]] }) - teal.widgets::table_with_settings_srv( - id = "table", - table_r = table_r - ) + tmctable_with_settings_srv(table_r = table_r) # Render R code. teal.widgets::verbatim_popup_srv( diff --git a/R/tm_t_binary_outcome.R b/R/tm_t_binary_outcome.R index 8ce5e39ad5..0ad0fcf119 100644 --- a/R/tm_t_binary_outcome.R +++ b/R/tm_t_binary_outcome.R @@ -550,7 +550,7 @@ ui_t_binary_outcome <- function(id, ...) { ns <- NS(id) teal.widgets::standard_layout( - output = teal.widgets::white_small_well(teal.widgets::table_with_settings_ui(ns("table"))), + output = teal.widgets::white_small_well(tmctable_with_settings_ui()), encoding = tags$div( ### Reporter teal.reporter::simple_reporter_ui(ns("simple_reporter")), @@ -997,10 +997,7 @@ srv_t_binary_outcome <- function(id, # Outputs to render. table_r <- reactive(table_q()[["result"]]) - teal.widgets::table_with_settings_srv( - id = "table", - table_r = table_r - ) + tmctable_with_settings_srv(table_r = table_r) # Render R code. teal.widgets::verbatim_popup_srv( diff --git a/R/tm_t_coxreg.R b/R/tm_t_coxreg.R index 54ffd94a6f..14613a4b88 100644 --- a/R/tm_t_coxreg.R +++ b/R/tm_t_coxreg.R @@ -572,7 +572,7 @@ ui_t_coxreg <- function(id, ...) { ns <- NS(id) teal.widgets::standard_layout( - output = teal.widgets::white_small_well(teal.widgets::table_with_settings_ui(ns("table"))), + output = teal.widgets::white_small_well(tmctable_with_settings_ui()), encoding = tags$div( ### Reporter teal.reporter::simple_reporter_ui(ns("simple_reporter")), @@ -1071,10 +1071,7 @@ srv_t_coxreg <- function(id, table_r <- reactive(all_q()[["result"]]) - teal.widgets::table_with_settings_srv( - id = "table", - table_r = table_r - ) + tmctable_with_settings_srv(table_r = table_r) teal.widgets::verbatim_popup_srv( id = "rcode", diff --git a/R/tm_t_events.R b/R/tm_t_events.R index b7e27dd67f..9623c5bf06 100644 --- a/R/tm_t_events.R +++ b/R/tm_t_events.R @@ -579,9 +579,7 @@ ui_t_events_byterm <- function(id, ...) { is_single_dataset_value <- teal.transform::is_single_dataset(a$arm_var, a$hlt, a$llt) teal.widgets::standard_layout( - output = teal.widgets::white_small_well( - teal.widgets::table_with_settings_ui(ns("table")) - ), + output = teal.widgets::white_small_well(tmctable_with_settings_ui()), encoding = tags$div( ### Reporter teal.reporter::simple_reporter_ui(ns("simple_reporter")), @@ -808,10 +806,7 @@ srv_t_events_byterm <- function(id, table_q()[["pruned_and_sorted_result"]] }) - teal.widgets::table_with_settings_srv( - id = "table", - table_r = table_r - ) + tmctable_with_settings_srv(table_r = table_r) # Render R code. teal.widgets::verbatim_popup_srv( diff --git a/R/tm_t_events_by_grade.R b/R/tm_t_events_by_grade.R index 95faf4a55d..2e51ccd75e 100644 --- a/R/tm_t_events_by_grade.R +++ b/R/tm_t_events_by_grade.R @@ -918,7 +918,7 @@ ui_t_events_by_grade <- function(id, ...) { is_single_dataset_value <- teal.transform::is_single_dataset(a$arm_var, a$hlt, a$llt, a$grade) teal.widgets::standard_layout( - output = teal.widgets::white_small_well(teal.widgets::table_with_settings_ui(ns("table"))), + output = teal.widgets::white_small_well(tmctable_with_settings_ui()), encoding = tags$div( ### Reporter teal.reporter::simple_reporter_ui(ns("simple_reporter")), @@ -1204,10 +1204,7 @@ srv_t_events_by_grade <- function(id, table_q()[["pruned_and_sorted_result"]] }) - teal.widgets::table_with_settings_srv( - id = "table", - table_r = table_r - ) + tmctable_with_settings_srv(table_r = table_r) # Render R code. teal.widgets::verbatim_popup_srv( diff --git a/R/tm_t_events_patyear.R b/R/tm_t_events_patyear.R index 0baad9186f..323093bffa 100644 --- a/R/tm_t_events_patyear.R +++ b/R/tm_t_events_patyear.R @@ -289,7 +289,7 @@ ui_events_patyear <- function(id, ...) { ) teal.widgets::standard_layout( - output = teal.widgets::white_small_well(teal.widgets::table_with_settings_ui(ns("patyear_table"))), + output = teal.widgets::white_small_well(tmctable_with_settings_ui()), encoding = tags$div( ### Reporter teal.reporter::simple_reporter_ui(ns("simple_reporter")), @@ -553,10 +553,7 @@ srv_events_patyear <- function(id, table_q()[["result"]] }) - teal.widgets::table_with_settings_srv( - id = "patyear_table", - table_r = table_r - ) + tmctable_with_settings_srv(table_r = table_r) # Render R code. teal.widgets::verbatim_popup_srv( diff --git a/R/tm_t_events_summary.R b/R/tm_t_events_summary.R index 3d3becd826..91d5e365a3 100644 --- a/R/tm_t_events_summary.R +++ b/R/tm_t_events_summary.R @@ -691,7 +691,7 @@ ui_t_events_summary <- function(id, ...) { ) teal.widgets::standard_layout( - output = teal.widgets::white_small_well(teal.widgets::table_with_settings_ui(ns("table"))), + output = teal.widgets::white_small_well(tmctable_with_settings_ui()), encoding = tags$div( ### Reporter teal.reporter::simple_reporter_ui(ns("simple_reporter")), @@ -967,10 +967,7 @@ srv_t_events_summary <- function(id, # Outputs to render. table_r <- reactive(table_q()[["result"]]) - teal.widgets::table_with_settings_srv( - id = "table", - table_r = table_r - ) + tmctable_with_settings_srv(table_r = table_r) teal.widgets::verbatim_popup_srv( id = "rcode", diff --git a/R/tm_t_exposure.R b/R/tm_t_exposure.R index 1bcac65742..b62717a029 100644 --- a/R/tm_t_exposure.R +++ b/R/tm_t_exposure.R @@ -397,7 +397,7 @@ ui_t_exposure <- function(id, ...) { ) teal.widgets::standard_layout( - output = teal.widgets::white_small_well(teal.widgets::table_with_settings_ui(ns("table"))), + output = teal.widgets::white_small_well(tmctable_with_settings_ui()), encoding = tags$div( ### Reporter teal.reporter::simple_reporter_ui(ns("simple_reporter")), @@ -635,10 +635,7 @@ srv_t_exposure <- function(id, # Outputs to render. table_r <- reactive(all_q()[["result"]]) - teal.widgets::table_with_settings_srv( - id = "table", - table_r = table_r - ) + tmctable_with_settings_srv(table_r = table_r) # Render R code. teal.widgets::verbatim_popup_srv( diff --git a/R/tm_t_logistic.R b/R/tm_t_logistic.R index 770ea428e4..9235ea7ae9 100644 --- a/R/tm_t_logistic.R +++ b/R/tm_t_logistic.R @@ -356,9 +356,7 @@ ui_t_logistic <- function(id, ...) { ns <- NS(id) teal.widgets::standard_layout( - output = teal.widgets::white_small_well( - teal.widgets::table_with_settings_ui(ns("table")) - ), + output = teal.widgets::white_small_well(tmctable_with_settings_ui()), encoding = tags$div( ### Reporter teal.reporter::simple_reporter_ui(ns("simple_reporter")), @@ -694,10 +692,7 @@ srv_t_logistic <- function(id, table_r <- reactive(all_q()[["result"]]) - teal.widgets::table_with_settings_srv( - id = "table", - table_r = table_r - ) + tmctable_with_settings_srv(table_r = table_r) teal.widgets::verbatim_popup_srv( id = "rcode", diff --git a/R/tm_t_mult_events.R b/R/tm_t_mult_events.R index 048afa1c82..5e99c5313c 100644 --- a/R/tm_t_mult_events.R +++ b/R/tm_t_mult_events.R @@ -398,9 +398,7 @@ ui_t_mult_events_byterm <- function(id, ...) { is_single_dataset_value <- teal.transform::is_single_dataset(a$arm_var, a$seq_var, a$hlt, a$llt) teal.widgets::standard_layout( - output = teal.widgets::white_small_well( - teal.widgets::table_with_settings_ui(ns("table")) - ), + output = teal.widgets::white_small_well(tmctable_with_settings_ui()), encoding = tags$div( ### Reporter teal.reporter::simple_reporter_ui(ns("simple_reporter")), @@ -593,7 +591,7 @@ srv_t_mult_events_byterm <- function(id, # Outputs to render. table_r <- reactive(all_q()[["result"]]) - teal.widgets::table_with_settings_srv(id = "table", table_r = table_r) + tmctable_with_settings_srv(table_r = table_r) # Render R code. teal.widgets::verbatim_popup_srv( diff --git a/R/tm_t_pp_medical_history.R b/R/tm_t_pp_medical_history.R index a83eab4dd5..82702ade38 100644 --- a/R/tm_t_pp_medical_history.R +++ b/R/tm_t_pp_medical_history.R @@ -184,9 +184,7 @@ ui_t_medical_history <- function(id, ...) { ns <- NS(id) teal.widgets::standard_layout( - output = tags$div( - teal.widgets::table_with_settings_ui(ns("table")) - ), + output = tags$div(tmctable_with_settings_ui()), encoding = tags$div( ### Reporter teal.reporter::simple_reporter_ui(ns("simple_reporter")), @@ -332,10 +330,7 @@ srv_t_medical_history <- function(id, table_r <- reactive(all_q()[["result"]]) - teal.widgets::table_with_settings_srv( - id = "table", - table_r = table_r - ) + tmctable_with_settings_srv(table_r = table_r) teal.widgets::verbatim_popup_srv( id = "rcode", diff --git a/R/tm_t_shift_by_arm.R b/R/tm_t_shift_by_arm.R index a6abe85134..f9e82da284 100644 --- a/R/tm_t_shift_by_arm.R +++ b/R/tm_t_shift_by_arm.R @@ -340,7 +340,7 @@ ui_shift_by_arm <- function(id, ...) { ) teal.widgets::standard_layout( - output = teal.widgets::white_small_well(teal.widgets::table_with_settings_ui(ns("table"))), + output = teal.widgets::white_small_well(tmctable_with_settings_ui()), encoding = tags$div( ### Reporter teal.reporter::simple_reporter_ui(ns("simple_reporter")), @@ -559,10 +559,7 @@ srv_shift_by_arm <- function(id, # Outputs to render. table_r <- reactive(all_q()[["result"]]) - teal.widgets::table_with_settings_srv( - id = "table", - table_r = table_r - ) + tmctable_with_settings_srv(table_r = table_r) # Render R code. teal.widgets::verbatim_popup_srv( diff --git a/R/tm_t_shift_by_arm_by_worst.R b/R/tm_t_shift_by_arm_by_worst.R index 31fdeffbae..d4e093a853 100644 --- a/R/tm_t_shift_by_arm_by_worst.R +++ b/R/tm_t_shift_by_arm_by_worst.R @@ -351,7 +351,7 @@ ui_shift_by_arm_by_worst <- function(id, ...) { a$baseline_var ) teal.widgets::standard_layout( - output = teal.widgets::white_small_well(teal.widgets::table_with_settings_ui(ns("table"))), + output = teal.widgets::white_small_well(tmctable_with_settings_ui()), encoding = tags$div( ### Reporter teal.reporter::simple_reporter_ui(ns("simple_reporter")), @@ -594,10 +594,7 @@ srv_shift_by_arm_by_worst <- function(id, # Outputs to render. table_r <- reactive(all_q()[["result"]]) - teal.widgets::table_with_settings_srv( - id = "table", - table_r = table_r - ) + tmctable_with_settings_srv(table_r = table_r) # Render R code. teal.widgets::verbatim_popup_srv( diff --git a/R/tm_t_shift_by_grade.R b/R/tm_t_shift_by_grade.R index 9cfdf8f00c..ce67a72698 100644 --- a/R/tm_t_shift_by_grade.R +++ b/R/tm_t_shift_by_grade.R @@ -639,7 +639,7 @@ ui_t_shift_by_grade <- function(id, ...) { ) teal.widgets::standard_layout( - output = teal.widgets::white_small_well(teal.widgets::table_with_settings_ui(ns("table"))), + output = teal.widgets::white_small_well(tmctable_with_settings_ui()), encoding = tags$div( ### Reporter teal.reporter::simple_reporter_ui(ns("simple_reporter")), @@ -864,10 +864,7 @@ srv_t_shift_by_grade <- function(id, # Outputs to render. table_r <- reactive(all_q()[["result"]]) - teal.widgets::table_with_settings_srv( - id = "table", - table_r = table_r - ) + tmctable_with_settings_srv(table_r = table_r) # Render R code. teal.widgets::verbatim_popup_srv( diff --git a/R/tm_t_smq.R b/R/tm_t_smq.R index 5209dbe167..f7de949204 100644 --- a/R/tm_t_smq.R +++ b/R/tm_t_smq.R @@ -451,7 +451,7 @@ ui_t_smq <- function(id, ...) { ) teal.widgets::standard_layout( - output = teal.widgets::white_small_well(teal.widgets::table_with_settings_ui(ns("table"))), + output = teal.widgets::white_small_well(tmctable_with_settings_ui()), encoding = tags$div( ### Reporter teal.reporter::simple_reporter_ui(ns("simple_reporter")), @@ -642,10 +642,7 @@ srv_t_smq <- function(id, # Outputs to render. table_r <- reactive(all_q()[["pruned_and_sorted_result"]]) - teal.widgets::table_with_settings_srv( - id = "table", - table_r = table_r - ) + tmctable_with_settings_srv(table_r = table_r) # Render R code. teal.widgets::verbatim_popup_srv( diff --git a/R/tm_t_summary.R b/R/tm_t_summary.R index 13a4411c4d..ce88369a85 100644 --- a/R/tm_t_summary.R +++ b/R/tm_t_summary.R @@ -308,7 +308,7 @@ ui_summary <- function(id, ...) { is_single_dataset_value <- teal.transform::is_single_dataset(a$arm_var, a$summarize_vars) teal.widgets::standard_layout( - output = teal.widgets::white_small_well(teal.widgets::table_with_settings_ui(ns("table"))), + output = teal.widgets::white_small_well(tmctable_with_settings_ui()), encoding = tags$div( ### Reporter teal.reporter::simple_reporter_ui(ns("simple_reporter")), @@ -536,7 +536,7 @@ srv_summary <- function(id, # Outputs to render. table_r <- reactive(all_q()[["result"]]) - teal.widgets::table_with_settings_srv(id = "table", table_r = table_r) + tmctable_with_settings_srv(table_r = table_r) # Render R code. teal.widgets::verbatim_popup_srv( diff --git a/R/tm_t_summary_by.R b/R/tm_t_summary_by.R index c8d7cbe53d..33d8239ac6 100644 --- a/R/tm_t_summary_by.R +++ b/R/tm_t_summary_by.R @@ -466,7 +466,7 @@ ui_summary_by <- function(id, ...) { ) teal.widgets::standard_layout( - output = teal.widgets::white_small_well(teal.widgets::table_with_settings_ui(ns("table"))), + output = teal.widgets::white_small_well(tmctable_with_settings_ui()), encoding = tags$div( ### Reporter teal.reporter::simple_reporter_ui(ns("simple_reporter")), @@ -713,10 +713,7 @@ srv_summary_by <- function(id, # Outputs to render. table_r <- reactive(all_q()[["result"]]) - teal.widgets::table_with_settings_srv( - id = "table", - table_r = table_r - ) + tmctable_with_settings_srv(table_r = table_r) # Render R code. teal.widgets::verbatim_popup_srv( diff --git a/R/tm_t_tte.R b/R/tm_t_tte.R index bd2e82d559..b2a727f5fc 100644 --- a/R/tm_t_tte.R +++ b/R/tm_t_tte.R @@ -558,7 +558,7 @@ ui_t_tte <- function(id, ...) { ns <- NS(id) teal.widgets::standard_layout( - output = teal.widgets::white_small_well(teal.widgets::table_with_settings_ui(ns("table"))), + output = teal.widgets::white_small_well(tmctable_with_settings_ui()), encoding = tags$div( ### Reporter teal.reporter::simple_reporter_ui(ns("simple_reporter")), @@ -944,7 +944,7 @@ srv_t_tte <- function(id, table_r <- reactive(all_q()[["table"]]) - teal.widgets::table_with_settings_srv(id = "table", table_r = table_r) + tmctable_with_settings_srv(table_r = table_r) teal.widgets::verbatim_popup_srv( id = "rcode", diff --git a/R/utils.R b/R/utils.R index 0a374bc735..d9225ac733 100644 --- a/R/utils.R +++ b/R/utils.R @@ -947,7 +947,11 @@ set_default_total_label <- function(total_label) { # for mocking in tests interactive <- NULL -tmcplot_with_settings <- function() teal.widgets::plot_with_settings_ui(id = ns("tmcplot")) +tmcplot_with_settings_ui <- function() teal.widgets::plot_with_settings_ui(id = ns("tmcplot")) +tmcplot_with_settings_srv <- function(...) teal.widgets::plot_with_settings_srv(id = "tmcplot", ...) + +tmctable_with_settings_ui <- function() teal.widgets::table_with_settings_ui(id = ns("tmctable")) +tmctable_with_settings_srv <- function(...) teal.widgets::table_with_settings_srv(id = "tmctable", ...) track_shiny_input_changes <- function(input){ if (shiny::isRunning()) { diff --git a/tests/testthat/test-shinytest2-tm_a_mmrm.R b/tests/testthat/test-shinytest2-tm_a_mmrm.R index 529ba4bf2b..6049c180a3 100644 --- a/tests/testthat/test-shinytest2-tm_a_mmrm.R +++ b/tests/testthat/test-shinytest2-tm_a_mmrm.R @@ -151,7 +151,7 @@ testthat::test_that("e2e - tm_a_mmrm: Click on fit model shows table for default app_driver <- app_driver_tm_a_mmrm() app_driver$expect_no_validation_error() - table <- app_driver$get_active_module_table_output("mmrm_table-table-with-settings") + table <- app_driver$get_active_module_table_output("table-table-with-settings") col_val <- app_driver$get_active_module_input("buckets") testthat::expect_true(all(unlist(col_val, use.names = FALSE) %in% colnames(table))) testthat::expect_equal(nrow(table), 25) @@ -265,7 +265,7 @@ for (func in output_functions) { testthat::expect_identical(app_driver$get_active_module_plot_output("tmcplot"), character(0)) } else { testthat::expect_identical( - app_driver$get_active_module_table_output("mmrm_table-table-with-settings"), data.frame() + app_driver$get_active_module_table_output("table-table-with-settings"), data.frame() ) } @@ -300,7 +300,7 @@ for (func in output_functions) { testthat::expect_identical(app_driver$get_active_module_plot_output("tmcplot"), character(0)) } else { testthat::expect_identical( - app_driver$get_active_module_table_output("mmrm_table-table-with-settings"), data.frame() + app_driver$get_active_module_table_output("table-table-with-settings"), data.frame() ) } @@ -335,7 +335,7 @@ for (func in output_functions) { testthat::expect_identical(app_driver$get_active_module_plot_output("tmcplot"), character(0)) } else { testthat::expect_identical( - app_driver$get_active_module_table_output("mmrm_table-table-with-settings"), data.frame() + app_driver$get_active_module_table_output("table-table-with-settings"), data.frame() ) } @@ -370,7 +370,7 @@ for (func in output_functions) { testthat::expect_identical(app_driver$get_active_module_plot_output("tmcplot"), character(0)) } else { testthat::expect_identical( - app_driver$get_active_module_table_output("mmrm_table-table-with-settings"), data.frame() + app_driver$get_active_module_table_output("table-table-with-settings"), data.frame() ) } @@ -405,7 +405,7 @@ for (func in output_functions) { testthat::expect_identical(app_driver$get_active_module_plot_output("tmcplot"), character(0)) } else { testthat::expect_identical( - app_driver$get_active_module_table_output("mmrm_table-table-with-settings"), data.frame() + app_driver$get_active_module_table_output("table-table-with-settings"), data.frame() ) } @@ -440,7 +440,7 @@ for (func in output_functions) { testthat::expect_identical(app_driver$get_active_module_plot_output("tmcplot"), character(0)) } else { testthat::expect_identical( - app_driver$get_active_module_table_output("mmrm_table-table-with-settings"), data.frame() + app_driver$get_active_module_table_output("table-table-with-settings"), data.frame() ) } @@ -506,7 +506,7 @@ for (func in output_functions) { if (grepl("^g_", func)) { plot_before <- app_driver$get_active_module_plot_output("tmcplot") } else { - table_before <- app_driver$get_active_module_table_output("mmrm_table-table-with-settings") + table_before <- app_driver$get_active_module_table_output("table-table-with-settings") } # Iterate over each input and test changes @@ -532,7 +532,7 @@ for (func in output_functions) { testthat::expect_false( identical( table_before, - app_driver$get_active_module_table_output("mmrm_table-table-with-settings") + app_driver$get_active_module_table_output("table-table-with-settings") ) ) } From 6bcfc46ebf05e163745ba9b26e4d0a770f5e19b0 Mon Sep 17 00:00:00 2001 From: m7pr Date: Thu, 13 Jun 2024 12:57:53 +0200 Subject: [PATCH 11/14] unify table names in shinytest2 tests --- tests/testthat/test-shinytest2-tm_a_gee.R | 48 +++++++++---------- tests/testthat/test-shinytest2-tm_a_mmrm.R | 18 +++---- .../test-shinytest2-tm_t_abnormality.R | 26 +++++----- ...inytest2-tm_t_abnormality_by_worst_grade.R | 22 ++++----- tests/testthat/test-shinytest2-tm_t_ancova.R | 34 ++++++------- .../test-shinytest2-tm_t_binary_outcome.R | 28 +++++------ tests/testthat/test-shinytest2-tm_t_coxreg.R | 30 ++++++------ tests/testthat/test-shinytest2-tm_t_events.R | 24 +++++----- .../test-shinytest2-tm_t_events_by_grade.R | 30 ++++++------ .../test-shinytest2-tm_t_events_patyear.R | 14 +++--- .../test-shinytest2-tm_t_events_summary.R | 24 +++++----- .../testthat/test-shinytest2-tm_t_exposure.R | 28 +++++------ .../testthat/test-shinytest2-tm_t_logistic.R | 20 ++++---- .../test-shinytest2-tm_t_mult_events.R | 16 +++---- .../test-shinytest2-tm_t_pp_medical_history.R | 26 +++++----- .../test-shinytest2-tm_t_shift_by_arm.R | 20 ++++---- ...st-shinytest2-tm_t_shift_by_arm_by_worst.R | 32 ++++++------- .../test-shinytest2-tm_t_shift_by_grade.R | 20 ++++---- tests/testthat/test-shinytest2-tm_t_smq.R | 20 ++++---- tests/testthat/test-shinytest2-tm_t_summary.R | 14 +++--- .../test-shinytest2-tm_t_summary_by.R | 28 +++++------ tests/testthat/test-shinytest2-tm_t_tte.R | 22 ++++----- 22 files changed, 272 insertions(+), 272 deletions(-) diff --git a/tests/testthat/test-shinytest2-tm_a_gee.R b/tests/testthat/test-shinytest2-tm_a_gee.R index 3563f2e9f6..69bd4151eb 100644 --- a/tests/testthat/test-shinytest2-tm_a_gee.R +++ b/tests/testthat/test-shinytest2-tm_a_gee.R @@ -49,7 +49,7 @@ testthat::test_that("e2e - tm_a_gee: Module initializes in teal without errors a app_driver <- app_driver_tm_a_gee() app_driver$expect_no_shiny_error() app_driver$expect_no_validation_error() - testthat::expect_true(app_driver$is_visible(app_driver$active_module_element("table-table-with-settings"))) + testthat::expect_true(app_driver$is_visible(app_driver$active_module_element("tmctable-table-with-settings"))) app_driver$stop() }) @@ -113,12 +113,12 @@ testthat::test_that( { skip_if_too_deep(5) app_driver <- app_driver_tm_a_gee() - table_before <- app_driver$get_active_module_table_output("table-table-with-settings") + table_before <- app_driver$get_active_module_table_output("tmctable-table-with-settings") app_driver$set_active_module_input(ns_des_input("id_var", "ADQS", "select"), "SUBJID") testthat::expect_true( identical( table_before, - app_driver$get_active_module_table_output("table-table-with-settings") + app_driver$get_active_module_table_output("tmctable-table-with-settings") ) ) app_driver$expect_no_validation_error() @@ -130,7 +130,7 @@ testthat::test_that("e2e - tm_a_gee: Deselection of id_var throws validation err skip_if_too_deep(5) app_driver <- app_driver_tm_a_gee() app_driver$set_active_module_input(ns_des_input("id_var", "ADQS", "select"), character(0)) - testthat::expect_identical(app_driver$get_active_module_table_output("table-table-with-settings"), data.frame()) + testthat::expect_identical(app_driver$get_active_module_table_output("tmctable-table-with-settings"), data.frame()) app_driver$expect_validation_error() testthat::expect_equal( app_driver$active_module_element_text("id_var-dataset_ADQS_singleextract-select_input > div > span"), @@ -143,12 +143,12 @@ testthat::test_that("e2e - tm_a_gee: Change in arm_var changes the table and doe skip_if_too_deep(5) app_driver <- app_driver_tm_a_gee() - table_before <- app_driver$get_active_module_table_output("table-table-with-settings") + table_before <- app_driver$get_active_module_table_output("tmctable-table-with-settings") app_driver$set_active_module_input(ns_des_input("arm_var", "ADSL", "select"), "ARMCD") testthat::expect_false( identical( table_before, - app_driver$get_active_module_table_output("table-table-with-settings") + app_driver$get_active_module_table_output("tmctable-table-with-settings") ) ) app_driver$expect_no_validation_error() @@ -159,7 +159,7 @@ testthat::test_that("e2e - tm_a_gee: Deselection of arm_var throws validation er skip_if_too_deep(5) app_driver <- app_driver_tm_a_gee() app_driver$set_active_module_input(ns_des_input("arm_var", "ADSL", "select"), character(0)) - testthat::expect_identical(app_driver$get_active_module_table_output("table-table-with-settings"), data.frame()) + testthat::expect_identical(app_driver$get_active_module_table_output("tmctable-table-with-settings"), data.frame()) app_driver$expect_validation_error() testthat::expect_equal( app_driver$active_module_element_text("arm_var-dataset_ADSL_singleextract-select_input > div > span"), @@ -173,12 +173,12 @@ testthat::test_that( { skip_if_too_deep(5) app_driver <- app_driver_tm_a_gee() - table_before <- app_driver$get_active_module_table_output("table-table-with-settings") + table_before <- app_driver$get_active_module_table_output("tmctable-table-with-settings") app_driver$set_active_module_input(ns_des_input("visit_var", "ADQS", "select"), "AVISITN") testthat::expect_true( identical( table_before, - app_driver$get_active_module_table_output("table-table-with-settings") + app_driver$get_active_module_table_output("tmctable-table-with-settings") ) ) app_driver$expect_no_validation_error() @@ -191,7 +191,7 @@ testthat::test_that("e2e - tm_a_gee: Deselection of visit_var throws validation app_driver <- app_driver_tm_a_gee() app_driver$set_active_module_input(ns_des_input("visit_var", "ADQS", "select"), character(0)) app_driver$wait_for_idle() - testthat::expect_identical(app_driver$get_active_module_table_output("table-table-with-settings"), data.frame()) + testthat::expect_identical(app_driver$get_active_module_table_output("tmctable-table-with-settings"), data.frame()) app_driver$expect_validation_error() testthat::expect_equal( app_driver$active_module_element_text("visit_var-dataset_ADQS_singleextract-select_input > div > span"), @@ -203,12 +203,12 @@ testthat::test_that("e2e - tm_a_gee: Deselection of visit_var throws validation testthat::test_that("e2e - tm_a_gee: Selection of paramcd changes the table and does not throw validation errors.", { skip_if_too_deep(5) app_driver <- app_driver_tm_a_gee() - table_before <- app_driver$get_active_module_table_output("table-table-with-settings") + table_before <- app_driver$get_active_module_table_output("tmctable-table-with-settings") app_driver$set_active_module_input(ns_des_input("paramcd", "ADQS", "filter1-vals"), "BFIALL") testthat::expect_false( identical( table_before, - app_driver$get_active_module_table_output("table-table-with-settings") + app_driver$get_active_module_table_output("tmctable-table-with-settings") ) ) app_driver$expect_no_validation_error() @@ -219,7 +219,7 @@ testthat::test_that("e2e - tm_a_gee: Deselection of paramcd throws validation er skip_if_too_deep(5) app_driver <- app_driver_tm_a_gee() app_driver$set_active_module_input(ns_des_input("paramcd", "ADQS", "filter1-vals"), character(0)) - testthat::expect_identical(app_driver$get_active_module_table_output("table-table-with-settings"), data.frame()) + testthat::expect_identical(app_driver$get_active_module_table_output("tmctable-table-with-settings"), data.frame()) app_driver$expect_validation_error() testthat::expect_equal( app_driver$active_module_element_text("paramcd-dataset_ADQS_singleextract-filter1-vals_input > div > span"), @@ -231,12 +231,12 @@ testthat::test_that("e2e - tm_a_gee: Deselection of paramcd throws validation er testthat::test_that("e2e - tm_a_gee: Selection of cov_var changes the table and does not throw validation errors.", { skip_if_too_deep(5) app_driver <- app_driver_tm_a_gee() - table_before <- app_driver$get_active_module_table_output("table-table-with-settings") + table_before <- app_driver$get_active_module_table_output("tmctable-table-with-settings") app_driver$set_active_module_input("cov_var-dataset_ADQS_singleextract-select", "BASE") testthat::expect_false( identical( table_before, - app_driver$get_active_module_table_output("table-table-with-settings") + app_driver$get_active_module_table_output("tmctable-table-with-settings") ) ) app_driver$expect_no_validation_error() @@ -246,12 +246,12 @@ testthat::test_that("e2e - tm_a_gee: Selection of cov_var changes the table and testthat::test_that("e2e - tm_a_gee: Selection of conf_level changes the table and does not throw validation errors.", { skip_if_too_deep(5) app_driver <- app_driver_tm_a_gee() - table_before <- app_driver$get_active_module_table_output("table-table-with-settings") + table_before <- app_driver$get_active_module_table_output("tmctable-table-with-settings") app_driver$set_active_module_input("conf_level", 0.90) testthat::expect_false( identical( table_before, - app_driver$get_active_module_table_output("table-table-with-settings") + app_driver$get_active_module_table_output("tmctable-table-with-settings") ) ) app_driver$expect_no_validation_error() @@ -261,9 +261,9 @@ testthat::test_that("e2e - tm_a_gee: Selection of conf_level changes the table a testthat::test_that("e2e - tm_a_gee: Selection of conf_level out of [0,1] range throws validation error.", { skip_if_too_deep(5) app_driver <- app_driver_tm_a_gee() - table_before <- app_driver$get_active_module_table_output("table-table-with-settings") + table_before <- app_driver$get_active_module_table_output("tmctable-table-with-settings") app_driver$set_active_module_input("conf_level", -1) - testthat::expect_identical(app_driver$get_active_module_table_output("table-table-with-settings"), data.frame()) + testthat::expect_identical(app_driver$get_active_module_table_output("tmctable-table-with-settings"), data.frame()) app_driver$expect_validation_error() testthat::expect_equal( app_driver$active_module_element_text("conf_level_input > div > span"), @@ -276,7 +276,7 @@ testthat::test_that("e2e - tm_a_gee: Deselection of conf_level throws validation skip_if_too_deep(5) app_driver <- app_driver_tm_a_gee() app_driver$set_active_module_input("conf_level", character(0)) - testthat::expect_identical(app_driver$get_active_module_table_output("table-table-with-settings"), data.frame()) + testthat::expect_identical(app_driver$get_active_module_table_output("tmctable-table-with-settings"), data.frame()) app_driver$expect_validation_error() testthat::expect_equal( app_driver$active_module_element_text("conf_level_input > div > span"), @@ -288,12 +288,12 @@ testthat::test_that("e2e - tm_a_gee: Deselection of conf_level throws validation testthat::test_that("e2e - tm_a_gee: Selection of cor_struct changes the table and does not throw validation errors.", { skip_if_too_deep(5) app_driver <- app_driver_tm_a_gee() - table_before <- app_driver$get_active_module_table_output("table-table-with-settings") + table_before <- app_driver$get_active_module_table_output("tmctable-table-with-settings") app_driver$set_active_module_input("cor_struct", "auto-regressive") testthat::expect_false( identical( table_before, - app_driver$get_active_module_table_output("table-table-with-settings") + app_driver$get_active_module_table_output("tmctable-table-with-settings") ) ) app_driver$expect_no_validation_error() @@ -311,12 +311,12 @@ testthat::test_that("e2e - tm_a_gee: Deselection of cor_struct does not throw va testthat::test_that("e2e - tm_a_gee: Selection of output_table changes the table and doesn't throw validation error.", { skip_if_too_deep(5) app_driver <- app_driver_tm_a_gee() - table_before <- app_driver$get_active_module_table_output("table-table-with-settings") + table_before <- app_driver$get_active_module_table_output("tmctable-table-with-settings") app_driver$set_active_module_input("output_table", "t_gee_cov") testthat::expect_false( identical( table_before, - app_driver$get_active_module_table_output("table-table-with-settings") + app_driver$get_active_module_table_output("tmctable-table-with-settings") ) ) app_driver$expect_no_validation_error() diff --git a/tests/testthat/test-shinytest2-tm_a_mmrm.R b/tests/testthat/test-shinytest2-tm_a_mmrm.R index 6049c180a3..5dbdfcf8bd 100644 --- a/tests/testthat/test-shinytest2-tm_a_mmrm.R +++ b/tests/testthat/test-shinytest2-tm_a_mmrm.R @@ -151,7 +151,7 @@ testthat::test_that("e2e - tm_a_mmrm: Click on fit model shows table for default app_driver <- app_driver_tm_a_mmrm() app_driver$expect_no_validation_error() - table <- app_driver$get_active_module_table_output("table-table-with-settings") + table <- app_driver$get_active_module_table_output("tmctable-table-with-settings") col_val <- app_driver$get_active_module_input("buckets") testthat::expect_true(all(unlist(col_val, use.names = FALSE) %in% colnames(table))) testthat::expect_equal(nrow(table), 25) @@ -265,7 +265,7 @@ for (func in output_functions) { testthat::expect_identical(app_driver$get_active_module_plot_output("tmcplot"), character(0)) } else { testthat::expect_identical( - app_driver$get_active_module_table_output("table-table-with-settings"), data.frame() + app_driver$get_active_module_table_output("tmctable-table-with-settings"), data.frame() ) } @@ -300,7 +300,7 @@ for (func in output_functions) { testthat::expect_identical(app_driver$get_active_module_plot_output("tmcplot"), character(0)) } else { testthat::expect_identical( - app_driver$get_active_module_table_output("table-table-with-settings"), data.frame() + app_driver$get_active_module_table_output("tmctable-table-with-settings"), data.frame() ) } @@ -335,7 +335,7 @@ for (func in output_functions) { testthat::expect_identical(app_driver$get_active_module_plot_output("tmcplot"), character(0)) } else { testthat::expect_identical( - app_driver$get_active_module_table_output("table-table-with-settings"), data.frame() + app_driver$get_active_module_table_output("tmctable-table-with-settings"), data.frame() ) } @@ -370,7 +370,7 @@ for (func in output_functions) { testthat::expect_identical(app_driver$get_active_module_plot_output("tmcplot"), character(0)) } else { testthat::expect_identical( - app_driver$get_active_module_table_output("table-table-with-settings"), data.frame() + app_driver$get_active_module_table_output("tmctable-table-with-settings"), data.frame() ) } @@ -405,7 +405,7 @@ for (func in output_functions) { testthat::expect_identical(app_driver$get_active_module_plot_output("tmcplot"), character(0)) } else { testthat::expect_identical( - app_driver$get_active_module_table_output("table-table-with-settings"), data.frame() + app_driver$get_active_module_table_output("tmctable-table-with-settings"), data.frame() ) } @@ -440,7 +440,7 @@ for (func in output_functions) { testthat::expect_identical(app_driver$get_active_module_plot_output("tmcplot"), character(0)) } else { testthat::expect_identical( - app_driver$get_active_module_table_output("table-table-with-settings"), data.frame() + app_driver$get_active_module_table_output("tmctable-table-with-settings"), data.frame() ) } @@ -506,7 +506,7 @@ for (func in output_functions) { if (grepl("^g_", func)) { plot_before <- app_driver$get_active_module_plot_output("tmcplot") } else { - table_before <- app_driver$get_active_module_table_output("table-table-with-settings") + table_before <- app_driver$get_active_module_table_output("tmctable-table-with-settings") } # Iterate over each input and test changes @@ -532,7 +532,7 @@ for (func in output_functions) { testthat::expect_false( identical( table_before, - app_driver$get_active_module_table_output("table-table-with-settings") + app_driver$get_active_module_table_output("tmctable-table-with-settings") ) ) } diff --git a/tests/testthat/test-shinytest2-tm_t_abnormality.R b/tests/testthat/test-shinytest2-tm_t_abnormality.R index 49f5bb43b8..c0ddf03964 100644 --- a/tests/testthat/test-shinytest2-tm_t_abnormality.R +++ b/tests/testthat/test-shinytest2-tm_t_abnormality.R @@ -69,7 +69,7 @@ testthat::test_that("e2e - tm_t_abnormality: Module initializes in teal without app_driver$expect_no_validation_error() testthat::expect_true( - app_driver$is_visible(app_driver$active_module_element("table-table-with-settings")) + app_driver$is_visible(app_driver$active_module_element("tmctable-table-with-settings")) ) app_driver$stop() }) @@ -113,12 +113,12 @@ testthat::test_that( { skip_if_too_deep(5) app_driver <- app_driver_tm_t_abnormality() - table_before <- app_driver$get_active_module_table_output("table-table-with-settings") + table_before <- app_driver$get_active_module_table_output("tmctable-table-with-settings") app_driver$set_active_module_input("arm_var-dataset_ADSL_singleextract-select", "ARMCD") testthat::expect_false( identical( table_before, - app_driver$get_active_module_table_output("table-table-with-settings") + app_driver$get_active_module_table_output("tmctable-table-with-settings") ) ) app_driver$expect_no_validation_error() @@ -130,7 +130,7 @@ testthat::test_that("e2e - arm_var: Deselection of arm_var throws validation err skip_if_too_deep(5) app_driver <- app_driver_tm_t_abnormality() app_driver$set_active_module_input("arm_var-dataset_ADSL_singleextract-select", NULL) - testthat::expect_identical(app_driver$get_active_module_table_output("table-table-with-settings"), data.frame()) + testthat::expect_identical(app_driver$get_active_module_table_output("tmctable-table-with-settings"), data.frame()) app_driver$expect_validation_error() testthat::expect_equal( app_driver$active_module_element_text("arm_var-dataset_ADSL_singleextract-select_input .shiny-validation-message"), @@ -144,12 +144,12 @@ testthat::test_that( { skip_if_too_deep(5) app_driver <- app_driver_tm_t_abnormality() - table_before <- app_driver$get_active_module_table_output("table-table-with-settings") + table_before <- app_driver$get_active_module_table_output("tmctable-table-with-settings") app_driver$set_active_module_input("by_vars-dataset_ADLB_singleextract-select", "AVISIT") testthat::expect_false( identical( table_before, - app_driver$get_active_module_table_output("table-table-with-settings") + app_driver$get_active_module_table_output("tmctable-table-with-settings") ) ) app_driver$expect_no_validation_error() @@ -161,7 +161,7 @@ testthat::test_that("e2e - tm_t_abnormality: Deselection of by_vars throws valid skip_if_too_deep(5) app_driver <- app_driver_tm_t_abnormality() app_driver$set_active_module_input("by_vars-dataset_ADLB_singleextract-select", NULL) - testthat::expect_identical(app_driver$get_active_module_table_output("table-table-with-settings"), data.frame()) + testthat::expect_identical(app_driver$get_active_module_table_output("tmctable-table-with-settings"), data.frame()) app_driver$expect_validation_error() testthat::expect_equal( app_driver$active_module_element_text("by_vars-dataset_ADLB_singleextract-select_input .shiny-validation-message"), @@ -175,12 +175,12 @@ testthat::test_that( { skip_if_too_deep(5) app_driver <- app_driver_tm_t_abnormality() - table_before <- app_driver$get_active_module_table_output("table-table-with-settings") + table_before <- app_driver$get_active_module_table_output("tmctable-table-with-settings") app_driver$set_active_module_input("add_total", TRUE) testthat::expect_false( identical( table_before, - app_driver$get_active_module_table_output("table-table-with-settings") + app_driver$get_active_module_table_output("tmctable-table-with-settings") ) ) app_driver$expect_no_validation_error() @@ -193,12 +193,12 @@ testthat::test_that( { skip_if_too_deep(5) app_driver <- app_driver_tm_t_abnormality() - table_before <- app_driver$get_active_module_table_output("table-table-with-settings") + table_before <- app_driver$get_active_module_table_output("tmctable-table-with-settings") app_driver$set_active_module_input("exclude_base_abn", TRUE) testthat::expect_false( identical( table_before, - app_driver$get_active_module_table_output("table-table-with-settings") + app_driver$get_active_module_table_output("tmctable-table-with-settings") ) ) app_driver$expect_no_validation_error() @@ -211,12 +211,12 @@ testthat::test_that( { skip_if_too_deep(5) app_driver <- app_driver_tm_t_abnormality() - table_before <- app_driver$get_active_module_table_output("table-table-with-settings") + table_before <- app_driver$get_active_module_table_output("tmctable-table-with-settings") app_driver$set_active_module_input("drop_arm_levels", FALSE) testthat::expect_true( identical( table_before, - app_driver$get_active_module_table_output("table-table-with-settings") + app_driver$get_active_module_table_output("tmctable-table-with-settings") ) ) app_driver$expect_no_validation_error() diff --git a/tests/testthat/test-shinytest2-tm_t_abnormality_by_worst_grade.R b/tests/testthat/test-shinytest2-tm_t_abnormality_by_worst_grade.R index 72ea302628..9523939649 100644 --- a/tests/testthat/test-shinytest2-tm_t_abnormality_by_worst_grade.R +++ b/tests/testthat/test-shinytest2-tm_t_abnormality_by_worst_grade.R @@ -66,7 +66,7 @@ testthat::test_that( app_driver$expect_no_validation_error() testthat::expect_true( - app_driver$is_visible(app_driver$active_module_element("table-table-with-settings")) + app_driver$is_visible(app_driver$active_module_element("tmctable-table-with-settings")) ) app_driver$stop() } @@ -122,12 +122,12 @@ testthat::test_that( { skip_if_too_deep(5) app_driver <- app_driver_tm_t_abnormality_by_worst_grade() - table_before <- app_driver$get_active_module_table_output("table-table-with-settings") + table_before <- app_driver$get_active_module_table_output("tmctable-table-with-settings") app_driver$set_active_module_input("arm_var-dataset_ADSL_singleextract-select", "ARMCD") testthat::expect_false( identical( table_before, - app_driver$get_active_module_table_output("table-table-with-settings") + app_driver$get_active_module_table_output("tmctable-table-with-settings") ) ) app_driver$expect_no_validation_error() @@ -140,12 +140,12 @@ testthat::test_that( { skip_if_too_deep(5) app_driver <- app_driver_tm_t_abnormality_by_worst_grade() - table_before <- app_driver$get_active_module_table_output("table-table-with-settings") + table_before <- app_driver$get_active_module_table_output("tmctable-table-with-settings") app_driver$set_active_module_input("paramcd-dataset_ADLB_singleextract-filter1-vals", c("ALT", "CRP")) testthat::expect_false( identical( table_before, - app_driver$get_active_module_table_output("table-table-with-settings") + app_driver$get_active_module_table_output("tmctable-table-with-settings") ) ) app_driver$expect_no_validation_error() @@ -157,7 +157,7 @@ testthat::test_that("e2e - tm_t_abnormality_by_worst_grade: Deselection of arm_v skip_if_too_deep(5) app_driver <- app_driver_tm_t_abnormality_by_worst_grade() app_driver$set_active_module_input("arm_var-dataset_ADSL_singleextract-select", NULL) - testthat::expect_identical(app_driver$get_active_module_table_output("table-table-with-settings"), data.frame()) + testthat::expect_identical(app_driver$get_active_module_table_output("tmctable-table-with-settings"), data.frame()) app_driver$expect_validation_error() testthat::expect_equal( app_driver$active_module_element_text("arm_var-dataset_ADSL_singleextract-select_input .shiny-validation-message"), @@ -170,7 +170,7 @@ testthat::test_that("e2e - tm_t_abnormality_by_worst_grade: Deselection of param skip_if_too_deep(5) app_driver <- app_driver_tm_t_abnormality_by_worst_grade() app_driver$set_active_module_input("paramcd-dataset_ADLB_singleextract-filter1-vals", NULL) - testthat::expect_identical(app_driver$get_active_module_table_output("table-table-with-settings"), data.frame()) + testthat::expect_identical(app_driver$get_active_module_table_output("tmctable-table-with-settings"), data.frame()) app_driver$expect_validation_error() testthat::expect_equal( app_driver$active_module_element_text( @@ -186,12 +186,12 @@ testthat::test_that( { skip_if_too_deep(5) app_driver <- app_driver_tm_t_abnormality_by_worst_grade() - table_before <- app_driver$get_active_module_table_output("table-table-with-settings") + table_before <- app_driver$get_active_module_table_output("tmctable-table-with-settings") app_driver$set_active_module_input("add_total", TRUE) testthat::expect_false( identical( table_before, - app_driver$get_active_module_table_output("table-table-with-settings") + app_driver$get_active_module_table_output("tmctable-table-with-settings") ) ) app_driver$expect_no_validation_error() @@ -205,9 +205,9 @@ testthat::test_that( { skip_if_too_deep(5) app_driver <- app_driver_tm_t_abnormality_by_worst_grade() - table_before <- app_driver$get_active_module_table_output("table-table-with-settings") + table_before <- app_driver$get_active_module_table_output("tmctable-table-with-settings") app_driver$set_active_module_input("drop_arm_levels", FALSE) - testthat::expect_identical(table_before, app_driver$get_active_module_table_output("table-table-with-settings")) + testthat::expect_identical(table_before, app_driver$get_active_module_table_output("tmctable-table-with-settings")) app_driver$expect_no_validation_error() app_driver$stop() } diff --git a/tests/testthat/test-shinytest2-tm_t_ancova.R b/tests/testthat/test-shinytest2-tm_t_ancova.R index 2953897737..baf5a84541 100644 --- a/tests/testthat/test-shinytest2-tm_t_ancova.R +++ b/tests/testthat/test-shinytest2-tm_t_ancova.R @@ -67,7 +67,7 @@ testthat::test_that("e2e - tm_t_ancova: Module initializes in teal without error app_driver$expect_no_shiny_error() app_driver$expect_no_validation_error() testthat::expect_true( - app_driver$is_visible(app_driver$active_module_element("table-table-with-settings")) + app_driver$is_visible(app_driver$active_module_element("tmctable-table-with-settings")) ) app_driver$stop() }) @@ -133,7 +133,7 @@ testthat::test_that( { skip_if_too_deep(5) app_driver <- app_driver_tm_t_ancova() - table_before <- app_driver$get_active_module_table_output("table-table-with-settings") + table_before <- app_driver$get_active_module_table_output("tmctable-table-with-settings") app_driver$set_active_module_input( "avisit-dataset_ADQS_singleextract-filter1-vals", c("WEEK 1 DAY 8", "WEEK 2 DAY 15") @@ -141,7 +141,7 @@ testthat::test_that( testthat::expect_false( identical( table_before, - app_driver$get_active_module_table_output("table-table-with-settings") + app_driver$get_active_module_table_output("tmctable-table-with-settings") ) ) app_driver$expect_no_validation_error() @@ -153,7 +153,7 @@ testthat::test_that("e2e - tm_t_ancova: Deselection of avisit throws validation skip_if_too_deep(5) app_driver <- app_driver_tm_t_ancova() app_driver$set_active_module_input("avisit-dataset_ADQS_singleextract-filter1-vals", NULL) - testthat::expect_identical(app_driver$get_active_module_table_output("table-table-with-settings"), data.frame()) + testthat::expect_identical(app_driver$get_active_module_table_output("tmctable-table-with-settings"), data.frame()) app_driver$expect_validation_error() testthat::expect_equal( app_driver$active_module_element_text( @@ -169,12 +169,12 @@ testthat::test_that( { skip_if_too_deep(5) app_driver <- app_driver_tm_t_ancova() - table_before <- app_driver$get_active_module_table_output("table-table-with-settings") + table_before <- app_driver$get_active_module_table_output("tmctable-table-with-settings") app_driver$set_active_module_input("paramcd-dataset_ADQS_singleextract-filter1-vals", c("BFIALL", "FATIGI")) testthat::expect_false( identical( table_before, - app_driver$get_active_module_table_output("table-table-with-settings") + app_driver$get_active_module_table_output("tmctable-table-with-settings") ) ) app_driver$expect_no_validation_error() @@ -186,7 +186,7 @@ testthat::test_that("e2e - tm_t_ancova: Deselection of paramcd throws validation skip_if_too_deep(5) app_driver <- app_driver_tm_t_ancova() app_driver$set_active_module_input("paramcd-dataset_ADQS_singleextract-filter1-vals", NULL) - testthat::expect_identical(app_driver$get_active_module_table_output("table-table-with-settings"), data.frame()) + testthat::expect_identical(app_driver$get_active_module_table_output("tmctable-table-with-settings"), data.frame()) app_driver$expect_validation_error() testthat::expect_equal( app_driver$active_module_element_text( @@ -202,12 +202,12 @@ testthat::test_that( { skip_if_too_deep(5) app_driver <- app_driver_tm_t_ancova() - table_before <- app_driver$get_active_module_table_output("table-table-with-settings") + table_before <- app_driver$get_active_module_table_output("tmctable-table-with-settings") app_driver$set_active_module_input("aval_var-dataset_ADQS_singleextract-select", "AVAL") testthat::expect_false( identical( table_before, - app_driver$get_active_module_table_output("table-table-with-settings") + app_driver$get_active_module_table_output("tmctable-table-with-settings") ) ) app_driver$expect_no_validation_error() @@ -219,7 +219,7 @@ testthat::test_that("e2e - tm_t_ancova: Deselection of aval_var throws validatio skip_if_too_deep(5) app_driver <- app_driver_tm_t_ancova() app_driver$set_active_module_input("aval_var-dataset_ADQS_singleextract-select", NULL) - testthat::expect_identical(app_driver$get_active_module_table_output("table-table-with-settings"), data.frame()) + testthat::expect_identical(app_driver$get_active_module_table_output("tmctable-table-with-settings"), data.frame()) app_driver$expect_validation_error() testthat::expect_equal( app_driver$active_module_element_text("aval_var-dataset_ADQS_singleextract-select_input .shiny-validation-message"), @@ -233,12 +233,12 @@ testthat::test_that( { skip_if_too_deep(5) app_driver <- app_driver_tm_t_ancova() - table_before <- app_driver$get_active_module_table_output("table-table-with-settings") + table_before <- app_driver$get_active_module_table_output("tmctable-table-with-settings") app_driver$set_active_module_input("arm_var-dataset_ADSL_singleextract-select", "ARM") testthat::expect_false( identical( table_before, - app_driver$get_active_module_table_output("table-table-with-settings") + app_driver$get_active_module_table_output("tmctable-table-with-settings") ) ) app_driver$expect_no_validation_error() @@ -250,7 +250,7 @@ testthat::test_that("e2e - tm_t_ancova: Deselection of arm_var throws validation skip_if_too_deep(5) app_driver <- app_driver_tm_t_ancova() app_driver$set_active_module_input("arm_var-dataset_ADSL_singleextract-select", NULL) - testthat::expect_identical(app_driver$get_active_module_table_output("table-table-with-settings"), data.frame()) + testthat::expect_identical(app_driver$get_active_module_table_output("tmctable-table-with-settings"), data.frame()) app_driver$expect_validation_error() testthat::expect_equal( app_driver$active_module_element_text("arm_var-dataset_ADSL_singleextract-select_input .shiny-validation-message"), @@ -264,12 +264,12 @@ testthat::test_that( { skip_if_too_deep(5) app_driver <- app_driver_tm_t_ancova() - table_before <- app_driver$get_active_module_table_output("table-table-with-settings") + table_before <- app_driver$get_active_module_table_output("tmctable-table-with-settings") app_driver$set_active_module_input("cov_var-dataset_ADQS_singleextract-select", "BASE") testthat::expect_false( identical( table_before, - app_driver$get_active_module_table_output("table-table-with-settings") + app_driver$get_active_module_table_output("tmctable-table-with-settings") ) ) app_driver$expect_no_validation_error() @@ -282,12 +282,12 @@ testthat::test_that( { skip_if_too_deep(5) app_driver <- app_driver_tm_t_ancova() - table_before <- app_driver$get_active_module_table_output("table-table-with-settings") + table_before <- app_driver$get_active_module_table_output("tmctable-table-with-settings") app_driver$set_active_module_input("cov_var-dataset_ADQS_singleextract-select", NULL) testthat::expect_false( identical( table_before, - app_driver$get_active_module_table_output("table-table-with-settings") + app_driver$get_active_module_table_output("tmctable-table-with-settings") ) ) app_driver$expect_no_validation_error() diff --git a/tests/testthat/test-shinytest2-tm_t_binary_outcome.R b/tests/testthat/test-shinytest2-tm_t_binary_outcome.R index 2f600f0aef..4f324721d3 100644 --- a/tests/testthat/test-shinytest2-tm_t_binary_outcome.R +++ b/tests/testthat/test-shinytest2-tm_t_binary_outcome.R @@ -97,7 +97,7 @@ testthat::test_that("e2e - tm_t_binary_outcome: Module initializes in teal witho app_driver$expect_no_shiny_error() app_driver$expect_no_validation_error() testthat::expect_true( - app_driver$is_visible(app_driver$active_module_element("table-table-with-settings")) + app_driver$is_visible(app_driver$active_module_element("tmctable-table-with-settings")) ) app_driver$stop() }) @@ -174,12 +174,12 @@ testthat::test_that( { skip_if_too_deep(5) app_driver <- app_driver_tm_t_binary_outcome() - table_before <- app_driver$get_active_module_table_output("table-table-with-settings") + table_before <- app_driver$get_active_module_table_output("tmctable-table-with-settings") app_driver$set_active_module_input("paramcd-dataset_ADRS_singleextract-filter1-vals", "INVET") testthat::expect_false( identical( table_before, - app_driver$get_active_module_table_output("table-table-with-settings") + app_driver$get_active_module_table_output("tmctable-table-with-settings") ) ) app_driver$expect_no_validation_error() @@ -191,7 +191,7 @@ testthat::test_that("e2e - tm_t_binary_outcome: Deselection of paramcd throws va skip_if_too_deep(5) app_driver <- app_driver_tm_t_binary_outcome() app_driver$set_active_module_input("paramcd-dataset_ADRS_singleextract-filter1-vals", NULL) - testthat::expect_identical(app_driver$get_active_module_table_output("table-table-with-settings"), data.frame()) + testthat::expect_identical(app_driver$get_active_module_table_output("tmctable-table-with-settings"), data.frame()) app_driver$expect_validation_error() testthat::expect_equal( app_driver$active_module_element_text( @@ -207,12 +207,12 @@ testthat::test_that( { skip_if_too_deep(5) app_driver <- app_driver_tm_t_binary_outcome() - table_before <- app_driver$get_active_module_table_output("table-table-with-settings") + table_before <- app_driver$get_active_module_table_output("tmctable-table-with-settings") app_driver$set_active_module_input("responders", c("Stable Disease (SD)", "Progressive Disease (PD)")) testthat::expect_false( identical( table_before, - app_driver$get_active_module_table_output("table-table-with-settings") + app_driver$get_active_module_table_output("tmctable-table-with-settings") ) ) app_driver$expect_no_validation_error() @@ -224,7 +224,7 @@ testthat::test_that("e2e - tm_t_binary_outcome: Deselection of responders throws skip_if_too_deep(5) app_driver <- app_driver_tm_t_binary_outcome() app_driver$set_active_module_input("responders", NULL) - testthat::expect_identical(app_driver$get_active_module_table_output("table-table-with-settings"), data.frame()) + testthat::expect_identical(app_driver$get_active_module_table_output("tmctable-table-with-settings"), data.frame()) app_driver$expect_validation_error() testthat::expect_equal( app_driver$get_text("#teal-main_ui-root-responders .shiny-validation-message"), @@ -238,12 +238,12 @@ testthat::test_that( { skip_if_too_deep(5) app_driver <- app_driver_tm_t_binary_outcome() - table_before <- app_driver$get_active_module_table_output("table-table-with-settings") + table_before <- app_driver$get_active_module_table_output("tmctable-table-with-settings") app_driver$set_active_module_input("arm_var-dataset_ADSL_singleextract-select", "ARMCD") testthat::expect_false( identical( table_before, - app_driver$get_active_module_table_output("table-table-with-settings") + app_driver$get_active_module_table_output("tmctable-table-with-settings") ) ) app_driver$expect_no_validation_error() @@ -255,7 +255,7 @@ testthat::test_that("e2e - tm_t_binary_outcome: Deselection of arm_var throws va skip_if_too_deep(5) app_driver <- app_driver_tm_t_binary_outcome() app_driver$set_active_module_input("arm_var-dataset_ADSL_singleextract-select", NULL) - testthat::expect_identical(app_driver$get_active_module_table_output("table-table-with-settings"), data.frame()) + testthat::expect_identical(app_driver$get_active_module_table_output("tmctable-table-with-settings"), data.frame()) app_driver$expect_validation_error() testthat::expect_equal( app_driver$active_module_element_text("arm_var-dataset_ADSL_singleextract-select_input .shiny-validation-message"), @@ -269,13 +269,13 @@ testthat::test_that( { skip_if_too_deep(5) app_driver <- app_driver_tm_t_binary_outcome() - table_before <- app_driver$get_active_module_table_output("table-table-with-settings") + table_before <- app_driver$get_active_module_table_output("tmctable-table-with-settings") app_driver$set_active_module_input("strata_var-dataset_ADSL_singleextract-select", "SEX") testthat::expect_false( identical( table_before, - app_driver$get_active_module_table_output("table-table-with-settings") + app_driver$get_active_module_table_output("tmctable-table-with-settings") ) ) app_driver$expect_no_validation_error() @@ -288,12 +288,12 @@ testthat::test_that( { skip_if_too_deep(5) app_driver <- app_driver_tm_t_binary_outcome() - table_before <- app_driver$get_active_module_table_output("table-table-with-settings") + table_before <- app_driver$get_active_module_table_output("tmctable-table-with-settings") app_driver$set_active_module_input("strata_var-dataset_ADSL_singleextract-select", NULL) testthat::expect_false( identical( table_before, - app_driver$get_active_module_table_output("table-table-with-settings") + app_driver$get_active_module_table_output("tmctable-table-with-settings") ) ) app_driver$expect_no_validation_error() diff --git a/tests/testthat/test-shinytest2-tm_t_coxreg.R b/tests/testthat/test-shinytest2-tm_t_coxreg.R index 61693fa9dd..7ca3901e9a 100644 --- a/tests/testthat/test-shinytest2-tm_t_coxreg.R +++ b/tests/testthat/test-shinytest2-tm_t_coxreg.R @@ -64,7 +64,7 @@ testthat::test_that("e2e - tm_t_coxreg: Module initializes in teal without error app_driver$expect_no_shiny_error() app_driver$expect_no_validation_error() testthat::expect_true( - app_driver$is_visible(app_driver$active_module_element("table-table-with-settings")) + app_driver$is_visible(app_driver$active_module_element("tmctable-table-with-settings")) ) app_driver$stop() }) @@ -128,12 +128,12 @@ testthat::test_that( { skip_if_too_deep(5) app_driver <- app_driver_tm_t_coxreg() - table_before <- app_driver$get_active_module_table_output("table-table-with-settings") + table_before <- app_driver$get_active_module_table_output("tmctable-table-with-settings") app_driver$set_active_module_input("paramcd-dataset_ADTTE_singleextract-filter1-vals", "CRSD") testthat::expect_false( identical( table_before, - app_driver$get_active_module_table_output("table-table-with-settings") + app_driver$get_active_module_table_output("tmctable-table-with-settings") ) ) app_driver$expect_no_validation_error() @@ -145,7 +145,7 @@ testthat::test_that("e2e - tm_t_coxreg: Deselection of paramcd throws validation skip_if_too_deep(5) app_driver <- app_driver_tm_t_coxreg() app_driver$set_active_module_input("paramcd-dataset_ADTTE_singleextract-filter1-vals", NULL) - testthat::expect_identical(app_driver$get_active_module_table_output("table-table-with-settings"), data.frame()) + testthat::expect_identical(app_driver$get_active_module_table_output("tmctable-table-with-settings"), data.frame()) app_driver$expect_validation_error() testthat::expect_equal( app_driver$active_module_element_text( @@ -161,12 +161,12 @@ testthat::test_that( { skip_if_too_deep(5) app_driver <- app_driver_tm_t_coxreg() - table_before <- app_driver$get_active_module_table_output("table-table-with-settings") + table_before <- app_driver$get_active_module_table_output("tmctable-table-with-settings") app_driver$set_active_module_input("arm_var-dataset_ADSL_singleextract-select", "ARMCD") testthat::expect_false( identical( table_before, - app_driver$get_active_module_table_output("table-table-with-settings") + app_driver$get_active_module_table_output("tmctable-table-with-settings") ) ) app_driver$expect_no_validation_error() @@ -178,7 +178,7 @@ testthat::test_that("e2e - tm_t_coxreg: Deselection of arm_var throws validation skip_if_too_deep(5) app_driver <- app_driver_tm_t_coxreg() app_driver$set_active_module_input("arm_var-dataset_ADSL_singleextract-select", NULL) - testthat::expect_identical(app_driver$get_active_module_table_output("table-table-with-settings"), data.frame()) + testthat::expect_identical(app_driver$get_active_module_table_output("tmctable-table-with-settings"), data.frame()) app_driver$expect_validation_error() testthat::expect_equal( app_driver$active_module_element_text("arm_var-dataset_ADSL_singleextract-select_input .shiny-validation-message"), @@ -192,12 +192,12 @@ testthat::test_that( { skip_if_too_deep(5) app_driver <- app_driver_tm_t_coxreg() - table_before <- app_driver$get_active_module_table_output("table-table-with-settings") + table_before <- app_driver$get_active_module_table_output("tmctable-table-with-settings") app_driver$set_active_module_input("cov_var-dataset_ADSL_singleextract-select", c("BMRKR1", "BMRKR2")) testthat::expect_false( identical( table_before, - app_driver$get_active_module_table_output("table-table-with-settings") + app_driver$get_active_module_table_output("tmctable-table-with-settings") ) ) app_driver$expect_no_validation_error() @@ -210,12 +210,12 @@ testthat::test_that( { skip_if_too_deep(5) app_driver <- app_driver_tm_t_coxreg() - table_before <- app_driver$get_active_module_table_output("table-table-with-settings") + table_before <- app_driver$get_active_module_table_output("tmctable-table-with-settings") app_driver$set_active_module_input("cov_var-dataset_ADSL_singleextract-select", NULL) testthat::expect_false( identical( table_before, - app_driver$get_active_module_table_output("table-table-with-settings") + app_driver$get_active_module_table_output("tmctable-table-with-settings") ) ) app_driver$expect_no_validation_error() @@ -228,12 +228,12 @@ testthat::test_that( { skip_if_too_deep(5) app_driver <- app_driver_tm_t_coxreg() - table_before <- app_driver$get_active_module_table_output("table-table-with-settings") + table_before <- app_driver$get_active_module_table_output("tmctable-table-with-settings") app_driver$set_active_module_input("strata_var-dataset_ADSL_singleextract-select", c("STRATA2", "COUNTRY")) testthat::expect_false( identical( table_before, - app_driver$get_active_module_table_output("table-table-with-settings") + app_driver$get_active_module_table_output("tmctable-table-with-settings") ) ) app_driver$expect_no_validation_error() @@ -246,12 +246,12 @@ testthat::test_that( { skip_if_too_deep(5) app_driver <- app_driver_tm_t_coxreg() - table_before <- app_driver$get_active_module_table_output("table-table-with-settings") + table_before <- app_driver$get_active_module_table_output("tmctable-table-with-settings") app_driver$set_active_module_input("strata_var-dataset_ADSL_singleextract-select", NULL) testthat::expect_false( identical( table_before, - app_driver$get_active_module_table_output("table-table-with-settings") + app_driver$get_active_module_table_output("tmctable-table-with-settings") ) ) app_driver$expect_no_validation_error() diff --git a/tests/testthat/test-shinytest2-tm_t_events.R b/tests/testthat/test-shinytest2-tm_t_events.R index 8cc68a408b..ac8611bd88 100644 --- a/tests/testthat/test-shinytest2-tm_t_events.R +++ b/tests/testthat/test-shinytest2-tm_t_events.R @@ -46,7 +46,7 @@ testthat::test_that("e2e - tm_t_events: Module initializes in teal without error app_driver$expect_no_shiny_error() app_driver$expect_no_validation_error() testthat::expect_true( - app_driver$is_visible(app_driver$active_module_element("table-table-with-settings")) + app_driver$is_visible(app_driver$active_module_element("tmctable-table-with-settings")) ) app_driver$stop() }) @@ -97,12 +97,12 @@ testthat::test_that( { skip_if_too_deep(5) app_driver <- app_driver_tm_t_events() - table_before <- app_driver$get_active_module_table_output("table-table-with-settings") + table_before <- app_driver$get_active_module_table_output("tmctable-table-with-settings") app_driver$set_active_module_input("arm_var-dataset_ADSL_singleextract-select", "ARMCD") testthat::expect_false( identical( table_before, - app_driver$get_active_module_table_output("table-table-with-settings") + app_driver$get_active_module_table_output("tmctable-table-with-settings") ) ) app_driver$expect_no_validation_error() @@ -114,7 +114,7 @@ testthat::test_that("e2e - tm_t_events: Deselection of arm_var throws validation skip_if_too_deep(5) app_driver <- app_driver_tm_t_events() app_driver$set_active_module_input("arm_var-dataset_ADSL_singleextract-select", NULL) - testthat::expect_identical(app_driver$get_active_module_table_output("table-table-with-settings"), data.frame()) + testthat::expect_identical(app_driver$get_active_module_table_output("tmctable-table-with-settings"), data.frame()) app_driver$expect_validation_error() testthat::expect_equal( app_driver$active_module_element_text("arm_var-dataset_ADSL_singleextract-select_input .shiny-validation-message"), @@ -128,12 +128,12 @@ testthat::test_that( { skip_if_too_deep(5) app_driver <- app_driver_tm_t_events() - table_before <- app_driver$get_active_module_table_output("table-table-with-settings") + table_before <- app_driver$get_active_module_table_output("tmctable-table-with-settings") app_driver$set_active_module_input("hlt-dataset_ADAE_singleextract-select", "AESOC") testthat::expect_false( identical( table_before, - app_driver$get_active_module_table_output("table-table-with-settings") + app_driver$get_active_module_table_output("tmctable-table-with-settings") ) ) app_driver$expect_no_validation_error() @@ -146,12 +146,12 @@ testthat::test_that( { skip_if_too_deep(5) app_driver <- app_driver_tm_t_events() - table_before <- app_driver$get_active_module_table_output("table-table-with-settings") + table_before <- app_driver$get_active_module_table_output("tmctable-table-with-settings") app_driver$set_active_module_input("hlt-dataset_ADAE_singleextract-select", NULL) testthat::expect_false( identical( table_before, - app_driver$get_active_module_table_output("table-table-with-settings") + app_driver$get_active_module_table_output("tmctable-table-with-settings") ) ) app_driver$expect_no_validation_error() @@ -164,12 +164,12 @@ testthat::test_that( { skip_if_too_deep(5) app_driver <- app_driver_tm_t_events() - table_before <- app_driver$get_active_module_table_output("table-table-with-settings") + table_before <- app_driver$get_active_module_table_output("tmctable-table-with-settings") app_driver$set_active_module_input("llt-dataset_ADAE_singleextract-select", "AETERM") testthat::expect_false( identical( table_before, - app_driver$get_active_module_table_output("table-table-with-settings") + app_driver$get_active_module_table_output("tmctable-table-with-settings") ) ) app_driver$expect_no_validation_error() @@ -182,12 +182,12 @@ testthat::test_that( { skip_if_too_deep(5) app_driver <- app_driver_tm_t_events() - table_before <- app_driver$get_active_module_table_output("table-table-with-settings") + table_before <- app_driver$get_active_module_table_output("tmctable-table-with-settings") app_driver$set_active_module_input("llt-dataset_ADAE_singleextract-select", NULL) testthat::expect_false( identical( table_before, - app_driver$get_active_module_table_output("table-table-with-settings") + app_driver$get_active_module_table_output("tmctable-table-with-settings") ) ) app_driver$expect_no_validation_error() diff --git a/tests/testthat/test-shinytest2-tm_t_events_by_grade.R b/tests/testthat/test-shinytest2-tm_t_events_by_grade.R index d62c0005d1..ab0c1d9c9d 100644 --- a/tests/testthat/test-shinytest2-tm_t_events_by_grade.R +++ b/tests/testthat/test-shinytest2-tm_t_events_by_grade.R @@ -59,7 +59,7 @@ testthat::test_that( app_driver$expect_no_shiny_error() app_driver$expect_no_validation_error() testthat::expect_true( - app_driver$is_visible(app_driver$active_module_element("table-table-with-settings")) + app_driver$is_visible(app_driver$active_module_element("tmctable-table-with-settings")) ) app_driver$stop() } @@ -111,12 +111,12 @@ testthat::test_that( { skip_if_too_deep(5) app_driver <- app_driver_tm_t_events_by_grade() - table_before <- app_driver$get_active_module_table_output("table-table-with-settings") + table_before <- app_driver$get_active_module_table_output("tmctable-table-with-settings") app_driver$set_active_module_input("arm_var-dataset_ADSL_singleextract-select", "ARMCD") testthat::expect_false( identical( table_before, - app_driver$get_active_module_table_output("table-table-with-settings") + app_driver$get_active_module_table_output("tmctable-table-with-settings") ) ) app_driver$expect_no_validation_error() @@ -128,7 +128,7 @@ testthat::test_that("e2e - tm_t_events_by_grade: Deselection of arm_var throws v skip_if_too_deep(5) app_driver <- app_driver_tm_t_events_by_grade() app_driver$set_active_module_input("arm_var-dataset_ADSL_singleextract-select", NULL) - testthat::expect_identical(app_driver$get_active_module_table_output("table-table-with-settings"), data.frame()) + testthat::expect_identical(app_driver$get_active_module_table_output("tmctable-table-with-settings"), data.frame()) app_driver$expect_validation_error() testthat::expect_equal( app_driver$active_module_element_text("arm_var-dataset_ADSL_singleextract-select_input .shiny-validation-message"), @@ -142,12 +142,12 @@ testthat::test_that( { skip_if_too_deep(5) app_driver <- app_driver_tm_t_events_by_grade() - table_before <- app_driver$get_active_module_table_output("table-table-with-settings") + table_before <- app_driver$get_active_module_table_output("tmctable-table-with-settings") app_driver$set_active_module_input("hlt-dataset_ADAE_singleextract-select", "AESOC") testthat::expect_false( identical( table_before, - app_driver$get_active_module_table_output("table-table-with-settings") + app_driver$get_active_module_table_output("tmctable-table-with-settings") ) ) app_driver$expect_no_validation_error() @@ -160,12 +160,12 @@ testthat::test_that( { skip_if_too_deep(5) app_driver <- app_driver_tm_t_events_by_grade() - table_before <- app_driver$get_active_module_table_output("table-table-with-settings") + table_before <- app_driver$get_active_module_table_output("tmctable-table-with-settings") app_driver$set_active_module_input("hlt-dataset_ADAE_singleextract-select", NULL) testthat::expect_false( identical( table_before, - app_driver$get_active_module_table_output("table-table-with-settings") + app_driver$get_active_module_table_output("tmctable-table-with-settings") ) ) app_driver$expect_no_validation_error() @@ -178,12 +178,12 @@ testthat::test_that( { skip_if_too_deep(5) app_driver <- app_driver_tm_t_events_by_grade() - table_before <- app_driver$get_active_module_table_output("table-table-with-settings") + table_before <- app_driver$get_active_module_table_output("tmctable-table-with-settings") app_driver$set_active_module_input("llt-dataset_ADAE_singleextract-select", "AETERM") testthat::expect_false( identical( table_before, - app_driver$get_active_module_table_output("table-table-with-settings") + app_driver$get_active_module_table_output("tmctable-table-with-settings") ) ) app_driver$expect_no_validation_error() @@ -196,12 +196,12 @@ testthat::test_that( { skip_if_too_deep(5) app_driver <- app_driver_tm_t_events_by_grade() - table_before <- app_driver$get_active_module_table_output("table-table-with-settings") + table_before <- app_driver$get_active_module_table_output("tmctable-table-with-settings") app_driver$set_active_module_input("llt-dataset_ADAE_singleextract-select", NULL) testthat::expect_false( identical( table_before, - app_driver$get_active_module_table_output("table-table-with-settings") + app_driver$get_active_module_table_output("tmctable-table-with-settings") ) ) app_driver$expect_no_validation_error() @@ -214,12 +214,12 @@ testthat::test_that( { skip_if_too_deep(5) app_driver <- app_driver_tm_t_events_by_grade() - table_before <- app_driver$get_active_module_table_output("table-table-with-settings") + table_before <- app_driver$get_active_module_table_output("tmctable-table-with-settings") app_driver$set_active_module_input("grade-dataset_ADAE_singleextract-select", "AESEV") testthat::expect_false( identical( table_before, - app_driver$get_active_module_table_output("table-table-with-settings") + app_driver$get_active_module_table_output("tmctable-table-with-settings") ) ) app_driver$expect_no_validation_error() @@ -231,7 +231,7 @@ testthat::test_that("e2e - tm_t_events_by_grade: Deselection of grade throws val skip_if_too_deep(5) app_driver <- app_driver_tm_t_events_by_grade() app_driver$set_active_module_input("grade-dataset_ADAE_singleextract-select", NULL) - testthat::expect_identical(app_driver$get_active_module_table_output("table-table-with-settings"), data.frame()) + testthat::expect_identical(app_driver$get_active_module_table_output("tmctable-table-with-settings"), data.frame()) app_driver$expect_validation_error() testthat::expect_equal( app_driver$active_module_element_text("grade-dataset_ADAE_singleextract-select_input .shiny-validation-message"), diff --git a/tests/testthat/test-shinytest2-tm_t_events_patyear.R b/tests/testthat/test-shinytest2-tm_t_events_patyear.R index ccd6e7f01f..45c6af4cf5 100644 --- a/tests/testthat/test-shinytest2-tm_t_events_patyear.R +++ b/tests/testthat/test-shinytest2-tm_t_events_patyear.R @@ -61,7 +61,7 @@ testthat::test_that("e2e - tm_t_events_patyear: Module initializes in teal witho app_driver$expect_no_shiny_error() app_driver$expect_no_validation_error() testthat::expect_true( - app_driver$is_visible(app_driver$active_module_element("patyear_table-table-with-settings")) + app_driver$is_visible(app_driver$active_module_element("patyear_tmctable-table-with-settings")) ) app_driver$stop() }) @@ -111,12 +111,12 @@ testthat::test_that( { skip_if_too_deep(5) app_driver <- app_driver_tm_t_events_patyear() - table_before <- app_driver$get_active_module_table_output("patyear_table-table-with-settings") + table_before <- app_driver$get_active_module_table_output("patyear_tmctable-table-with-settings") app_driver$set_active_module_input("paramcd-dataset_ADAETTE_singleextract-filter1-vals", "AETTE2") testthat::expect_false( identical( table_before, - app_driver$get_active_module_table_output("patyear_table-table-with-settings") + app_driver$get_active_module_table_output("patyear_tmctable-table-with-settings") ) ) app_driver$expect_no_validation_error() @@ -129,7 +129,7 @@ testthat::test_that("e2e - tm_t_events_patyear: Deselection of paramcd throws va app_driver <- app_driver_tm_t_events_patyear() app_driver$set_active_module_input("paramcd-dataset_ADAETTE_singleextract-filter1-vals", NULL) testthat::expect_identical( - app_driver$get_active_module_table_output("patyear_table-table-with-settings"), + app_driver$get_active_module_table_output("patyear_tmctable-table-with-settings"), data.frame() ) app_driver$expect_validation_error() @@ -147,12 +147,12 @@ testthat::test_that( { skip_if_too_deep(5) app_driver <- app_driver_tm_t_events_patyear() - table_before <- app_driver$get_active_module_table_output("patyear_table-table-with-settings") + table_before <- app_driver$get_active_module_table_output("patyear_tmctable-table-with-settings") app_driver$set_active_module_input("arm_var-dataset_ADSL_singleextract-select", "ARM") testthat::expect_false( identical( table_before, - app_driver$get_active_module_table_output("patyear_table-table-with-settings") + app_driver$get_active_module_table_output("patyear_tmctable-table-with-settings") ) ) app_driver$expect_no_validation_error() @@ -165,7 +165,7 @@ testthat::test_that("e2e - tm_t_events_patyear: Deselection of arm_var throws va app_driver <- app_driver_tm_t_events_patyear() app_driver$set_active_module_input("arm_var-dataset_ADSL_singleextract-select", NULL) testthat::expect_identical( - app_driver$get_active_module_table_output("patyear_table-table-with-settings"), + app_driver$get_active_module_table_output("patyear_tmctable-table-with-settings"), data.frame() ) app_driver$expect_validation_error() diff --git a/tests/testthat/test-shinytest2-tm_t_events_summary.R b/tests/testthat/test-shinytest2-tm_t_events_summary.R index 054be74fb1..6449d78c81 100644 --- a/tests/testthat/test-shinytest2-tm_t_events_summary.R +++ b/tests/testthat/test-shinytest2-tm_t_events_summary.R @@ -100,7 +100,7 @@ testthat::test_that("e2e - tm_t_events_summary: Module initializes in teal witho app_driver$expect_no_shiny_error() app_driver$expect_no_validation_error() testthat::expect_true( - app_driver$is_visible(app_driver$active_module_element("table-table-with-settings")) + app_driver$is_visible(app_driver$active_module_element("tmctable-table-with-settings")) ) app_driver$stop() }) @@ -140,12 +140,12 @@ testthat::test_that( { skip_if_too_deep(5) app_driver <- app_driver_tm_t_events_summary() - table_before <- app_driver$get_active_module_table_output("table-table-with-settings") + table_before <- app_driver$get_active_module_table_output("tmctable-table-with-settings") app_driver$set_active_module_input("arm_var-dataset_ADSL_singleextract-select", "ARMCD") testthat::expect_false( identical( table_before, - app_driver$get_active_module_table_output("table-table-with-settings") + app_driver$get_active_module_table_output("tmctable-table-with-settings") ) ) app_driver$expect_no_validation_error() @@ -157,7 +157,7 @@ testthat::test_that("e2e - tm_t_events_summary: Deselection of arm_var throws va skip_if_too_deep(5) app_driver <- app_driver_tm_t_events_summary() app_driver$set_active_module_input("arm_var-dataset_ADSL_singleextract-select", NULL) - testthat::expect_identical(app_driver$get_active_module_table_output("table-table-with-settings"), data.frame()) + testthat::expect_identical(app_driver$get_active_module_table_output("tmctable-table-with-settings"), data.frame()) app_driver$expect_validation_error() testthat::expect_equal( app_driver$active_module_element_text("arm_var-dataset_ADSL_singleextract-select_input .shiny-validation-message"), @@ -171,12 +171,12 @@ testthat::test_that( { skip_if_too_deep(5) app_driver <- app_driver_tm_t_events_summary() - table_before <- app_driver$get_active_module_table_output("table-table-with-settings") + table_before <- app_driver$get_active_module_table_output("tmctable-table-with-settings") app_driver$set_active_module_input("flag_var_anl-dataset_ADAE_singleextract-select", c("TMPFL_REL", "TMPFL_GR5")) testthat::expect_false( identical( table_before, - app_driver$get_active_module_table_output("table-table-with-settings") + app_driver$get_active_module_table_output("tmctable-table-with-settings") ) ) app_driver$expect_no_validation_error() @@ -190,12 +190,12 @@ testthat::test_that( { skip_if_too_deep(5) app_driver <- app_driver_tm_t_events_summary() - table_before <- app_driver$get_active_module_table_output("table-table-with-settings") + table_before <- app_driver$get_active_module_table_output("tmctable-table-with-settings") app_driver$set_active_module_input("flag_var_anl-dataset_ADAE_singleextract-select", NULL) testthat::expect_false( identical( table_before, - app_driver$get_active_module_table_output("table-table-with-settings") + app_driver$get_active_module_table_output("tmctable-table-with-settings") ) ) app_driver$expect_no_validation_error() @@ -209,12 +209,12 @@ testthat::test_that( { skip_if_too_deep(5) app_driver <- app_driver_tm_t_events_summary() - table_before <- app_driver$get_active_module_table_output("table-table-with-settings") + table_before <- app_driver$get_active_module_table_output("tmctable-table-with-settings") app_driver$set_active_module_input("flag_var_aesi-dataset_ADAE_singleextract-select", c("TMP_SMQ02", "TMP_CQ01")) testthat::expect_false( identical( table_before, - app_driver$get_active_module_table_output("table-table-with-settings") + app_driver$get_active_module_table_output("tmctable-table-with-settings") ) ) app_driver$expect_no_validation_error() @@ -228,12 +228,12 @@ testthat::test_that( { skip_if_too_deep(5) app_driver <- app_driver_tm_t_events_summary() - table_before <- app_driver$get_active_module_table_output("table-table-with-settings") + table_before <- app_driver$get_active_module_table_output("tmctable-table-with-settings") app_driver$set_active_module_input("flag_var_aesi-dataset_ADAE_singleextract-select", NULL) testthat::expect_false( identical( table_before, - app_driver$get_active_module_table_output("table-table-with-settings") + app_driver$get_active_module_table_output("tmctable-table-with-settings") ) ) app_driver$expect_no_validation_error() diff --git a/tests/testthat/test-shinytest2-tm_t_exposure.R b/tests/testthat/test-shinytest2-tm_t_exposure.R index 836a94d538..1a8dd3199f 100644 --- a/tests/testthat/test-shinytest2-tm_t_exposure.R +++ b/tests/testthat/test-shinytest2-tm_t_exposure.R @@ -77,7 +77,7 @@ testthat::test_that("e2e - tm_t_exposure: Module initializes in teal without err app_driver$expect_no_shiny_error() app_driver$expect_no_validation_error() testthat::expect_true( - app_driver$is_visible(app_driver$active_module_element("table-table-with-settings")) + app_driver$is_visible(app_driver$active_module_element("tmctable-table-with-settings")) ) app_driver$stop() }) @@ -119,12 +119,12 @@ testthat::test_that( { skip_if_too_deep(5) app_driver <- app_driver_tm_t_exposure() - table_before <- app_driver$get_active_module_table_output("table-table-with-settings") + table_before <- app_driver$get_active_module_table_output("tmctable-table-with-settings") app_driver$set_active_module_input("paramcd-dataset_ADEX_singleextract-filter1-vals", "DOSE") testthat::expect_false( identical( table_before, - app_driver$get_active_module_table_output("table-table-with-settings") + app_driver$get_active_module_table_output("tmctable-table-with-settings") ) ) app_driver$expect_no_validation_error() @@ -136,7 +136,7 @@ testthat::test_that("e2e - tm_t_exposure: Deselection of paramcd throws validati skip_if_too_deep(5) app_driver <- app_driver_tm_t_exposure() app_driver$set_active_module_input("paramcd-dataset_ADEX_singleextract-filter1-vals", NULL) - testthat::expect_identical(app_driver$get_active_module_table_output("table-table-with-settings"), data.frame()) + testthat::expect_identical(app_driver$get_active_module_table_output("tmctable-table-with-settings"), data.frame()) app_driver$expect_validation_error() testthat::expect_equal( app_driver$active_module_element_text( @@ -152,12 +152,12 @@ testthat::test_that( { skip_if_too_deep(5) app_driver <- app_driver_tm_t_exposure() - table_before <- app_driver$get_active_module_table_output("table-table-with-settings") + table_before <- app_driver$get_active_module_table_output("tmctable-table-with-settings") app_driver$set_active_module_input("parcat-dataset_ADEX_singleextract-filter1-vals", "Drug B") testthat::expect_false( identical( table_before, - app_driver$get_active_module_table_output("table-table-with-settings") + app_driver$get_active_module_table_output("tmctable-table-with-settings") ) ) app_driver$expect_no_validation_error() @@ -169,7 +169,7 @@ testthat::test_that("e2e - tm_t_exposure: Deselection of parcat throws validatio skip_if_too_deep(5) app_driver <- app_driver_tm_t_exposure() app_driver$set_active_module_input("parcat-dataset_ADEX_singleextract-filter1-vals", NULL) - testthat::expect_identical(app_driver$get_active_module_table_output("table-table-with-settings"), data.frame()) + testthat::expect_identical(app_driver$get_active_module_table_output("tmctable-table-with-settings"), data.frame()) app_driver$expect_validation_error() testthat::expect_equal( app_driver$active_module_element_text( @@ -185,12 +185,12 @@ testthat::test_that( { skip_if_too_deep(5) app_driver <- app_driver_tm_t_exposure() - table_before <- app_driver$get_active_module_table_output("table-table-with-settings") + table_before <- app_driver$get_active_module_table_output("tmctable-table-with-settings") app_driver$set_active_module_input("col_by_var-dataset_ADSL_singleextract-select", "ARM") testthat::expect_false( identical( table_before, - app_driver$get_active_module_table_output("table-table-with-settings") + app_driver$get_active_module_table_output("tmctable-table-with-settings") ) ) app_driver$expect_no_validation_error() @@ -203,12 +203,12 @@ testthat::test_that( { skip_if_too_deep(5) app_driver <- app_driver_tm_t_exposure() - table_before <- app_driver$get_active_module_table_output("table-table-with-settings") + table_before <- app_driver$get_active_module_table_output("tmctable-table-with-settings") app_driver$set_active_module_input("col_by_var-dataset_ADSL_singleextract-select", character(0), wait_ = FALSE) testthat::expect_false( identical( table_before, - app_driver$get_active_module_table_output("table-table-with-settings") + app_driver$get_active_module_table_output("tmctable-table-with-settings") ) ) app_driver$expect_no_validation_error() @@ -221,12 +221,12 @@ testthat::test_that( { skip_if_too_deep(5) app_driver <- app_driver_tm_t_exposure() - table_before <- app_driver$get_active_module_table_output("table-table-with-settings") + table_before <- app_driver$get_active_module_table_output("tmctable-table-with-settings") app_driver$set_active_module_input("row_by_var-dataset_ADEX_singleextract-select", "REGION1") testthat::expect_false( identical( table_before, - app_driver$get_active_module_table_output("table-table-with-settings") + app_driver$get_active_module_table_output("tmctable-table-with-settings") ) ) app_driver$expect_no_validation_error() @@ -238,7 +238,7 @@ testthat::test_that("e2e - tm_t_exposure: Deselection of row_by_var throws valid skip_if_too_deep(5) app_driver <- app_driver_tm_t_exposure() app_driver$set_active_module_input("row_by_var-dataset_ADEX_singleextract-select", NULL) - testthat::expect_identical(app_driver$get_active_module_table_output("table-table-with-settings"), data.frame()) + testthat::expect_identical(app_driver$get_active_module_table_output("tmctable-table-with-settings"), data.frame()) app_driver$expect_validation_error() testthat::expect_equal( app_driver$active_module_element_text( diff --git a/tests/testthat/test-shinytest2-tm_t_logistic.R b/tests/testthat/test-shinytest2-tm_t_logistic.R index 7968f5ea7c..9c35dca336 100644 --- a/tests/testthat/test-shinytest2-tm_t_logistic.R +++ b/tests/testthat/test-shinytest2-tm_t_logistic.R @@ -59,7 +59,7 @@ testthat::test_that("e2e - tm_t_logistic: Module initializes in teal without err app_driver$expect_no_shiny_error() app_driver$expect_no_validation_error() testthat::expect_true( - app_driver$is_visible(app_driver$active_module_element("table-table-with-settings")) + app_driver$is_visible(app_driver$active_module_element("tmctable-table-with-settings")) ) app_driver$stop() }) @@ -112,12 +112,12 @@ testthat::test_that( { skip_if_too_deep(5) app_driver <- app_driver_tm_t_logistic() - table_before <- app_driver$get_active_module_table_output("table-table-with-settings") + table_before <- app_driver$get_active_module_table_output("tmctable-table-with-settings") app_driver$set_active_module_input("paramcd-dataset_ADRS_singleextract-filter1-vals", "INVET") testthat::expect_false( identical( table_before, - app_driver$get_active_module_table_output("table-table-with-settings") + app_driver$get_active_module_table_output("tmctable-table-with-settings") ) ) app_driver$expect_no_validation_error() @@ -129,7 +129,7 @@ testthat::test_that("e2e - tm_t_logistic: Deselection of paramcd throws validati skip_if_too_deep(5) app_driver <- app_driver_tm_t_logistic() app_driver$set_active_module_input("paramcd-dataset_ADRS_singleextract-filter1-vals", NULL) - testthat::expect_identical(app_driver$get_active_module_table_output("table-table-with-settings"), data.frame()) + testthat::expect_identical(app_driver$get_active_module_table_output("tmctable-table-with-settings"), data.frame()) app_driver$expect_validation_error() testthat::expect_equal( app_driver$active_module_element_text( @@ -145,12 +145,12 @@ testthat::test_that( { skip_if_too_deep(5) app_driver <- app_driver_tm_t_logistic() - table_before <- app_driver$get_active_module_table_output("table-table-with-settings") + table_before <- app_driver$get_active_module_table_output("tmctable-table-with-settings") app_driver$set_active_module_input("arm_var-dataset_ADSL_singleextract-select", "ARMCD") testthat::expect_false( identical( table_before, - app_driver$get_active_module_table_output("table-table-with-settings") + app_driver$get_active_module_table_output("tmctable-table-with-settings") ) ) app_driver$expect_no_validation_error() @@ -162,7 +162,7 @@ testthat::test_that("e2e - tm_t_logistic: Deselection of arm_var throws validati skip_if_too_deep(5) app_driver <- app_driver_tm_t_logistic() app_driver$set_active_module_input("arm_var-dataset_ADSL_singleextract-select", NULL) - testthat::expect_identical(app_driver$get_active_module_table_output("table-table-with-settings"), data.frame()) + testthat::expect_identical(app_driver$get_active_module_table_output("tmctable-table-with-settings"), data.frame()) app_driver$expect_validation_error() testthat::expect_equal( app_driver$active_module_element_text("arm_var-dataset_ADSL_singleextract-select_input .shiny-validation-message"), @@ -176,12 +176,12 @@ testthat::test_that( { skip_if_too_deep(5) app_driver <- app_driver_tm_t_logistic() - table_before <- app_driver$get_active_module_table_output("table-table-with-settings") + table_before <- app_driver$get_active_module_table_output("tmctable-table-with-settings") app_driver$set_active_module_input("cov_var-dataset_ADRS_singleextract-select", c("AGE", "BMRKR1")) testthat::expect_false( identical( table_before, - app_driver$get_active_module_table_output("table-table-with-settings") + app_driver$get_active_module_table_output("tmctable-table-with-settings") ) ) app_driver$expect_no_validation_error() @@ -193,7 +193,7 @@ testthat::test_that("e2e - tm_t_logistic: Deselection of cov_var throws validati skip_if_too_deep(5) app_driver <- app_driver_tm_t_logistic() app_driver$set_active_module_input("cov_var-dataset_ADRS_singleextract-select", NULL) - testthat::expect_identical(app_driver$get_active_module_table_output("table-table-with-settings"), data.frame()) + testthat::expect_identical(app_driver$get_active_module_table_output("tmctable-table-with-settings"), data.frame()) app_driver$expect_validation_error() testthat::expect_equal( app_driver$active_module_element_text("cov_var-dataset_ADRS_singleextract-select_input .shiny-validation-message"), diff --git a/tests/testthat/test-shinytest2-tm_t_mult_events.R b/tests/testthat/test-shinytest2-tm_t_mult_events.R index 00555591a1..d124153502 100644 --- a/tests/testthat/test-shinytest2-tm_t_mult_events.R +++ b/tests/testthat/test-shinytest2-tm_t_mult_events.R @@ -45,7 +45,7 @@ testthat::test_that("e2e - tm_t_mult_events: Module initializes in teal without app_driver$expect_no_shiny_error() app_driver$expect_no_validation_error() testthat::expect_true( - app_driver$is_visible(app_driver$active_module_element("table-table-with-settings")) + app_driver$is_visible(app_driver$active_module_element("tmctable-table-with-settings")) ) app_driver$stop() }) @@ -82,12 +82,12 @@ testthat::test_that( { skip_if_too_deep(5) app_driver <- app_driver_tm_t_mult_events() - table_before <- app_driver$get_active_module_table_output("table-table-with-settings") + table_before <- app_driver$get_active_module_table_output("tmctable-table-with-settings") app_driver$set_active_module_input("arm_var-dataset_ADSL_singleextract-select", "ARMCD") testthat::expect_false( identical( table_before, - app_driver$get_active_module_table_output("table-table-with-settings") + app_driver$get_active_module_table_output("tmctable-table-with-settings") ) ) app_driver$expect_no_validation_error() @@ -99,7 +99,7 @@ testthat::test_that("e2e - tm_t_mult_events: Deselection of arm_var throws valid skip_if_too_deep(5) app_driver <- app_driver_tm_t_mult_events() app_driver$set_active_module_input("arm_var-dataset_ADSL_singleextract-select", NULL) - testthat::expect_identical(app_driver$get_active_module_table_output("table-table-with-settings"), data.frame()) + testthat::expect_identical(app_driver$get_active_module_table_output("tmctable-table-with-settings"), data.frame()) app_driver$expect_validation_error() testthat::expect_equal( app_driver$active_module_element_text("arm_var-dataset_ADSL_singleextract-select_input .shiny-validation-message"), @@ -113,12 +113,12 @@ testthat::test_that( { skip_if_too_deep(5) app_driver <- app_driver_tm_t_mult_events() - table_before <- app_driver$get_active_module_table_output("table-table-with-settings") + table_before <- app_driver$get_active_module_table_output("tmctable-table-with-settings") app_driver$set_active_module_input("hlt-dataset_ADCM_singleextract-select", c("ATC1", "ATC2")) testthat::expect_false( identical( table_before, - app_driver$get_active_module_table_output("table-table-with-settings") + app_driver$get_active_module_table_output("tmctable-table-with-settings") ) ) app_driver$expect_no_validation_error() @@ -131,12 +131,12 @@ testthat::test_that( { skip_if_too_deep(5) app_driver <- app_driver_tm_t_mult_events() - table_before <- app_driver$get_active_module_table_output("table-table-with-settings") + table_before <- app_driver$get_active_module_table_output("tmctable-table-with-settings") app_driver$set_active_module_input("hlt-dataset_ADCM_singleextract-select", NULL) testthat::expect_false( identical( table_before, - app_driver$get_active_module_table_output("table-table-with-settings") + app_driver$get_active_module_table_output("tmctable-table-with-settings") ) ) app_driver$expect_no_validation_error() diff --git a/tests/testthat/test-shinytest2-tm_t_pp_medical_history.R b/tests/testthat/test-shinytest2-tm_t_pp_medical_history.R index ba4569773b..7ae07dfb56 100644 --- a/tests/testthat/test-shinytest2-tm_t_pp_medical_history.R +++ b/tests/testthat/test-shinytest2-tm_t_pp_medical_history.R @@ -40,7 +40,7 @@ testthat::test_that( app_driver$expect_no_shiny_error() app_driver$expect_no_validation_error() testthat::expect_true( - app_driver$is_visible(app_driver$active_module_element("table-table-with-settings")) + app_driver$is_visible(app_driver$active_module_element("tmctable-table-with-settings")) ) app_driver$stop() } @@ -81,12 +81,12 @@ testthat::test_that( { skip_if_too_deep(5) app_driver <- app_driver_tm_t_pp_medical_history() - table_before <- app_driver$get_active_module_table_output("table-table-with-settings") + table_before <- app_driver$get_active_module_table_output("tmctable-table-with-settings") app_driver$set_active_module_input("patient_id", "AB12345-USA-1-id-45") testthat::expect_false( identical( table_before, - app_driver$get_active_module_table_output("table-table-with-settings") + app_driver$get_active_module_table_output("tmctable-table-with-settings") ) ) app_driver$expect_no_validation_error() @@ -98,7 +98,7 @@ testthat::test_that("e2e - tm_t_pp_medical_history: Deselection of patient_id th skip_if_too_deep(5) app_driver <- app_driver_tm_t_pp_medical_history() app_driver$set_active_module_input("patient_id", NULL) - testthat::expect_identical(app_driver$get_active_module_table_output("table-table-with-settings"), data.frame()) + testthat::expect_identical(app_driver$get_active_module_table_output("tmctable-table-with-settings"), data.frame()) app_driver$expect_validation_error() testthat::expect_equal( app_driver$active_module_element_text("patient_id_input .shiny-validation-message"), @@ -112,12 +112,12 @@ testthat::test_that( { skip_if_too_deep(5) app_driver <- app_driver_tm_t_pp_medical_history() - table_before <- app_driver$get_active_module_table_output("table-table-with-settings") + table_before <- app_driver$get_active_module_table_output("tmctable-table-with-settings") app_driver$set_active_module_input("mhterm-dataset_ADMH_singleextract-select", "STUDYID") testthat::expect_false( identical( table_before, - app_driver$get_active_module_table_output("table-table-with-settings") + app_driver$get_active_module_table_output("tmctable-table-with-settings") ) ) app_driver$expect_no_validation_error() @@ -129,7 +129,7 @@ testthat::test_that("e2e - tm_t_pp_medical_history: Deselection of mhterm throws skip_if_too_deep(5) app_driver <- app_driver_tm_t_pp_medical_history() app_driver$set_active_module_input("mhterm-dataset_ADMH_singleextract-select", NULL) - testthat::expect_identical(app_driver$get_active_module_table_output("table-table-with-settings"), data.frame()) + testthat::expect_identical(app_driver$get_active_module_table_output("tmctable-table-with-settings"), data.frame()) app_driver$expect_validation_error() testthat::expect_equal( app_driver$active_module_element_text("mhterm-dataset_ADMH_singleextract-select_input .shiny-validation-message"), @@ -143,12 +143,12 @@ testthat::test_that( { skip_if_too_deep(5) app_driver <- app_driver_tm_t_pp_medical_history() - table_before <- app_driver$get_active_module_table_output("table-table-with-settings") + table_before <- app_driver$get_active_module_table_output("tmctable-table-with-settings") app_driver$set_active_module_input("mhbodsys-dataset_ADMH_singleextract-select", "EOSSTT") testthat::expect_false( identical( table_before, - app_driver$get_active_module_table_output("table-table-with-settings") + app_driver$get_active_module_table_output("tmctable-table-with-settings") ) ) app_driver$expect_no_validation_error() @@ -160,7 +160,7 @@ testthat::test_that("e2e - tm_t_pp_medical_history: Deselection of mhbodsys thro skip_if_too_deep(5) app_driver <- app_driver_tm_t_pp_medical_history() app_driver$set_active_module_input("mhbodsys-dataset_ADMH_singleextract-select", NULL) - testthat::expect_identical(app_driver$get_active_module_table_output("table-table-with-settings"), data.frame()) + testthat::expect_identical(app_driver$get_active_module_table_output("tmctable-table-with-settings"), data.frame()) app_driver$expect_validation_error() testthat::expect_equal( app_driver$active_module_element_text("mhbodsys-dataset_ADMH_singleextract-select_input .shiny-validation-message"), @@ -174,12 +174,12 @@ testthat::test_that( { skip_if_too_deep(5) app_driver <- app_driver_tm_t_pp_medical_history() - table_before <- app_driver$get_active_module_table_output("table-table-with-settings") + table_before <- app_driver$get_active_module_table_output("tmctable-table-with-settings") app_driver$set_active_module_input("mhdistat-dataset_ADMH_singleextract-select", "STUDYID") testthat::expect_false( identical( table_before, - app_driver$get_active_module_table_output("table-table-with-settings") + app_driver$get_active_module_table_output("tmctable-table-with-settings") ) ) app_driver$expect_no_validation_error() @@ -191,7 +191,7 @@ testthat::test_that("e2e - tm_t_pp_medical_history: Deselection of mhdistat thro skip_if_too_deep(5) app_driver <- app_driver_tm_t_pp_medical_history() app_driver$set_active_module_input("mhdistat-dataset_ADMH_singleextract-select", NULL) - testthat::expect_identical(app_driver$get_active_module_table_output("table-table-with-settings"), data.frame()) + testthat::expect_identical(app_driver$get_active_module_table_output("tmctable-table-with-settings"), data.frame()) app_driver$expect_validation_error() testthat::expect_equal( app_driver$active_module_element_text("mhdistat-dataset_ADMH_singleextract-select_input .shiny-validation-message"), diff --git a/tests/testthat/test-shinytest2-tm_t_shift_by_arm.R b/tests/testthat/test-shinytest2-tm_t_shift_by_arm.R index ab0fbd8008..88063e34fa 100644 --- a/tests/testthat/test-shinytest2-tm_t_shift_by_arm.R +++ b/tests/testthat/test-shinytest2-tm_t_shift_by_arm.R @@ -57,7 +57,7 @@ testthat::test_that("e2e - tm_t_shift_by_arm: Module initializes in teal without app_driver$expect_no_shiny_error() app_driver$expect_no_validation_error() testthat::expect_true( - app_driver$is_visible(app_driver$active_module_element("table-table-with-settings")) + app_driver$is_visible(app_driver$active_module_element("tmctable-table-with-settings")) ) app_driver$stop() }) @@ -102,12 +102,12 @@ testthat::test_that( { skip_if_too_deep(5) app_driver <- app_driver_tm_t_shift_by_arm() - table_before <- app_driver$get_active_module_table_output("table-table-with-settings") + table_before <- app_driver$get_active_module_table_output("tmctable-table-with-settings") app_driver$set_active_module_input("arm_var-dataset_ADSL_singleextract-select", "ARMCD") testthat::expect_false( identical( table_before, - app_driver$get_active_module_table_output("table-table-with-settings") + app_driver$get_active_module_table_output("tmctable-table-with-settings") ) ) app_driver$expect_no_validation_error() @@ -119,7 +119,7 @@ testthat::test_that("e2e - tm_t_shift_by_arm: Deselection of arm_var throws vali skip_if_too_deep(5) app_driver <- app_driver_tm_t_shift_by_arm() app_driver$set_active_module_input("arm_var-dataset_ADSL_singleextract-select", NULL) - testthat::expect_identical(app_driver$get_active_module_table_output("table-table-with-settings"), data.frame()) + testthat::expect_identical(app_driver$get_active_module_table_output("tmctable-table-with-settings"), data.frame()) app_driver$expect_validation_error() testthat::expect_equal( app_driver$active_module_element_text("arm_var-dataset_ADSL_singleextract-select_input .shiny-validation-message"), @@ -133,12 +133,12 @@ testthat::test_that( { skip_if_too_deep(5) app_driver <- app_driver_tm_t_shift_by_arm() - table_before <- app_driver$get_active_module_table_output("table-table-with-settings") + table_before <- app_driver$get_active_module_table_output("tmctable-table-with-settings") app_driver$set_active_module_input("paramcd-dataset_ADEG_singleextract-filter1-vals", "QT") testthat::expect_false( identical( table_before, - app_driver$get_active_module_table_output("table-table-with-settings") + app_driver$get_active_module_table_output("tmctable-table-with-settings") ) ) app_driver$expect_no_validation_error() @@ -150,7 +150,7 @@ testthat::test_that("e2e - tm_t_shift_by_arm: Deselection of paramcd throws vali skip_if_too_deep(5) app_driver <- app_driver_tm_t_shift_by_arm() app_driver$set_active_module_input("paramcd-dataset_ADEG_singleextract-filter1-vals", NULL) - testthat::expect_identical(app_driver$get_active_module_table_output("table-table-with-settings"), data.frame()) + testthat::expect_identical(app_driver$get_active_module_table_output("tmctable-table-with-settings"), data.frame()) app_driver$expect_validation_error() testthat::expect_equal( app_driver$active_module_element_text( @@ -166,12 +166,12 @@ testthat::test_that( { skip_if_too_deep(5) app_driver <- app_driver_tm_t_shift_by_arm() - table_before <- app_driver$get_active_module_table_output("table-table-with-settings") + table_before <- app_driver$get_active_module_table_output("tmctable-table-with-settings") app_driver$set_active_module_input("visit_var-dataset_ADEG_singleextract-filter1-vals", "SCREENING") testthat::expect_false( identical( table_before, - app_driver$get_active_module_table_output("table-table-with-settings") + app_driver$get_active_module_table_output("tmctable-table-with-settings") ) ) app_driver$expect_no_validation_error() @@ -183,7 +183,7 @@ testthat::test_that("e2e - tm_t_shift_by_arm: Deselection of visit_var throws va skip_if_too_deep(5) app_driver <- app_driver_tm_t_shift_by_arm() app_driver$set_active_module_input("visit_var-dataset_ADEG_singleextract-filter1-vals", NULL) - testthat::expect_identical(app_driver$get_active_module_table_output("table-table-with-settings"), data.frame()) + testthat::expect_identical(app_driver$get_active_module_table_output("tmctable-table-with-settings"), data.frame()) app_driver$expect_validation_error() testthat::expect_equal( app_driver$active_module_element_text( diff --git a/tests/testthat/test-shinytest2-tm_t_shift_by_arm_by_worst.R b/tests/testthat/test-shinytest2-tm_t_shift_by_arm_by_worst.R index c6c1fe95c8..2e2f838507 100644 --- a/tests/testthat/test-shinytest2-tm_t_shift_by_arm_by_worst.R +++ b/tests/testthat/test-shinytest2-tm_t_shift_by_arm_by_worst.R @@ -59,7 +59,7 @@ testthat::test_that( app_driver$expect_no_shiny_error() app_driver$expect_no_validation_error() testthat::expect_true( - app_driver$is_visible(app_driver$active_module_element("table-table-with-settings")) + app_driver$is_visible(app_driver$active_module_element("tmctable-table-with-settings")) ) app_driver$stop() } @@ -115,12 +115,12 @@ testthat::test_that( { skip_if_too_deep(5) app_driver <- app_driver_tm_t_shift_by_arm_by_worst() - table_before <- app_driver$get_active_module_table_output("table-table-with-settings") + table_before <- app_driver$get_active_module_table_output("tmctable-table-with-settings") app_driver$set_active_module_input("arm_var-dataset_ADSL_singleextract-select", "ARMCD") testthat::expect_false( identical( table_before, - app_driver$get_active_module_table_output("table-table-with-settings") + app_driver$get_active_module_table_output("tmctable-table-with-settings") ) ) app_driver$expect_no_validation_error() @@ -132,7 +132,7 @@ testthat::test_that("e2e - tm_t_shift_by_arm_by_worst: Deselection of arm_var th skip_if_too_deep(5) app_driver <- app_driver_tm_t_shift_by_arm_by_worst() app_driver$set_active_module_input("arm_var-dataset_ADSL_singleextract-select", NULL) - testthat::expect_identical(app_driver$get_active_module_table_output("table-table-with-settings"), data.frame()) + testthat::expect_identical(app_driver$get_active_module_table_output("tmctable-table-with-settings"), data.frame()) app_driver$expect_validation_error() testthat::expect_equal( app_driver$active_module_element_text("arm_var-dataset_ADSL_singleextract-select_input .shiny-validation-message"), @@ -146,12 +146,12 @@ testthat::test_that( { skip_if_too_deep(5) app_driver <- app_driver_tm_t_shift_by_arm_by_worst() - table_before <- app_driver$get_active_module_table_output("table-table-with-settings") + table_before <- app_driver$get_active_module_table_output("tmctable-table-with-settings") app_driver$set_active_module_input("paramcd-dataset_ADEG_singleextract-filter1-vals", "HR") testthat::expect_false( identical( table_before, - app_driver$get_active_module_table_output("table-table-with-settings") + app_driver$get_active_module_table_output("tmctable-table-with-settings") ) ) app_driver$expect_no_validation_error() @@ -163,7 +163,7 @@ testthat::test_that("e2e - tm_t_shift_by_arm_by_worst: Deselection of paramcd th skip_if_too_deep(5) app_driver <- app_driver_tm_t_shift_by_arm_by_worst() app_driver$set_active_module_input("paramcd-dataset_ADEG_singleextract-filter1-vals", NULL) - testthat::expect_identical(app_driver$get_active_module_table_output("table-table-with-settings"), data.frame()) + testthat::expect_identical(app_driver$get_active_module_table_output("tmctable-table-with-settings"), data.frame()) app_driver$expect_validation_error() testthat::expect_equal( app_driver$active_module_element_text( @@ -180,12 +180,12 @@ testthat::test_that( { skip_if_too_deep(5) app_driver <- app_driver_tm_t_shift_by_arm_by_worst() - table_before <- app_driver$get_active_module_table_output("table-table-with-settings") + table_before <- app_driver$get_active_module_table_output("tmctable-table-with-settings") app_driver$set_active_module_input("worst_flag_var-dataset_ADEG_singleextract-select", "WORS01FL") testthat::expect_false( identical( table_before, - app_driver$get_active_module_table_output("table-table-with-settings") + app_driver$get_active_module_table_output("tmctable-table-with-settings") ) ) app_driver$expect_no_validation_error() @@ -197,7 +197,7 @@ testthat::test_that("e2e - tm_t_shift_by_arm_by_worst: Deselection of worst_flag skip_if_too_deep(5) app_driver <- app_driver_tm_t_shift_by_arm_by_worst() app_driver$set_active_module_input("worst_flag_var-dataset_ADEG_singleextract-select", NULL) - testthat::expect_identical(app_driver$get_active_module_table_output("table-table-with-settings"), data.frame()) + testthat::expect_identical(app_driver$get_active_module_table_output("tmctable-table-with-settings"), data.frame()) app_driver$expect_validation_error() testthat::expect_equal( app_driver$active_module_element_text( @@ -214,12 +214,12 @@ testthat::test_that( { skip_if_too_deep(5) app_driver <- app_driver_tm_t_shift_by_arm_by_worst() - table_before <- app_driver$get_active_module_table_output("table-table-with-settings") + table_before <- app_driver$get_active_module_table_output("tmctable-table-with-settings") app_driver$set_active_module_input("aval_var-dataset_ADEG_singleextract-select", "AVALC") testthat::expect_false( identical( table_before, - app_driver$get_active_module_table_output("table-table-with-settings") + app_driver$get_active_module_table_output("tmctable-table-with-settings") ) ) app_driver$expect_no_validation_error() @@ -231,7 +231,7 @@ testthat::test_that("e2e - tm_t_shift_by_arm_by_worst: Deselection of aval_var t skip_if_too_deep(5) app_driver <- app_driver_tm_t_shift_by_arm_by_worst() app_driver$set_active_module_input("aval_var-dataset_ADEG_singleextract-select", NULL) - testthat::expect_identical(app_driver$get_active_module_table_output("table-table-with-settings"), data.frame()) + testthat::expect_identical(app_driver$get_active_module_table_output("tmctable-table-with-settings"), data.frame()) app_driver$expect_validation_error() testthat::expect_equal( app_driver$active_module_element_text("aval_var-dataset_ADEG_singleextract-select_input .shiny-validation-message"), @@ -246,12 +246,12 @@ testthat::test_that( { skip_if_too_deep(5) app_driver <- app_driver_tm_t_shift_by_arm_by_worst() - table_before <- app_driver$get_active_module_table_output("table-table-with-settings") + table_before <- app_driver$get_active_module_table_output("tmctable-table-with-settings") app_driver$set_active_module_input("baseline_var-dataset_ADEG_singleextract-select", "BASEC") testthat::expect_false( identical( table_before, - app_driver$get_active_module_table_output("table-table-with-settings") + app_driver$get_active_module_table_output("tmctable-table-with-settings") ) ) app_driver$expect_no_validation_error() @@ -263,7 +263,7 @@ testthat::test_that("e2e - tm_t_shift_by_arm_by_worst: Deselection of baseline_v skip_if_too_deep(5) app_driver <- app_driver_tm_t_shift_by_arm_by_worst() app_driver$set_active_module_input("baseline_var-dataset_ADEG_singleextract-select", NULL) - testthat::expect_identical(app_driver$get_active_module_table_output("table-table-with-settings"), data.frame()) + testthat::expect_identical(app_driver$get_active_module_table_output("tmctable-table-with-settings"), data.frame()) app_driver$expect_validation_error() testthat::expect_equal( app_driver$active_module_element_text( diff --git a/tests/testthat/test-shinytest2-tm_t_shift_by_grade.R b/tests/testthat/test-shinytest2-tm_t_shift_by_grade.R index 794a3e272c..5fe8f6c164 100644 --- a/tests/testthat/test-shinytest2-tm_t_shift_by_grade.R +++ b/tests/testthat/test-shinytest2-tm_t_shift_by_grade.R @@ -73,7 +73,7 @@ testthat::test_that( app_driver$expect_no_shiny_error() app_driver$expect_no_validation_error() testthat::expect_true( - app_driver$is_visible(app_driver$active_module_element("table-table-with-settings")) + app_driver$is_visible(app_driver$active_module_element("tmctable-table-with-settings")) ) app_driver$stop() } @@ -125,12 +125,12 @@ testthat::test_that( { skip_if_too_deep(5) app_driver <- app_driver_tm_t_shift_by_grade() - table_before <- app_driver$get_active_module_table_output("table-table-with-settings") + table_before <- app_driver$get_active_module_table_output("tmctable-table-with-settings") app_driver$set_active_module_input("arm_var-dataset_ADSL_singleextract-select", "ARMCD") testthat::expect_false( identical( table_before, - app_driver$get_active_module_table_output("table-table-with-settings") + app_driver$get_active_module_table_output("tmctable-table-with-settings") ) ) app_driver$expect_no_validation_error() @@ -142,7 +142,7 @@ testthat::test_that("e2e - tm_t_shift_by_grade: Deselection of arm_var throws va skip_if_too_deep(5) app_driver <- app_driver_tm_t_shift_by_grade() app_driver$set_active_module_input("arm_var-dataset_ADSL_singleextract-select", NULL) - testthat::expect_identical(app_driver$get_active_module_table_output("table-table-with-settings"), data.frame()) + testthat::expect_identical(app_driver$get_active_module_table_output("tmctable-table-with-settings"), data.frame()) app_driver$expect_validation_error() testthat::expect_equal( app_driver$active_module_element_text("arm_var-dataset_ADSL_singleextract-select_input .shiny-validation-message"), @@ -156,12 +156,12 @@ testthat::test_that( { skip_if_too_deep(5) app_driver <- app_driver_tm_t_shift_by_grade() - table_before <- app_driver$get_active_module_table_output("table-table-with-settings") + table_before <- app_driver$get_active_module_table_output("tmctable-table-with-settings") app_driver$set_active_module_input("paramcd-dataset_ADLB_singleextract-filter1-vals", "CRP") testthat::expect_false( identical( table_before, - app_driver$get_active_module_table_output("table-table-with-settings") + app_driver$get_active_module_table_output("tmctable-table-with-settings") ) ) app_driver$expect_no_validation_error() @@ -173,7 +173,7 @@ testthat::test_that("e2e - tm_t_shift_by_grade: Deselection of paramcd throws va skip_if_too_deep(5) app_driver <- app_driver_tm_t_shift_by_grade() app_driver$set_active_module_input("paramcd-dataset_ADLB_singleextract-filter1-vals", NULL) - testthat::expect_identical(app_driver$get_active_module_table_output("table-table-with-settings"), data.frame()) + testthat::expect_identical(app_driver$get_active_module_table_output("tmctable-table-with-settings"), data.frame()) app_driver$expect_validation_error() testthat::expect_equal( app_driver$active_module_element_text( @@ -189,12 +189,12 @@ testthat::test_that( { skip_if_too_deep(5) app_driver <- app_driver_tm_t_shift_by_grade() - table_before <- app_driver$get_active_module_table_output("table-table-with-settings") + table_before <- app_driver$get_active_module_table_output("tmctable-table-with-settings") app_driver$set_active_module_input("worst_flag_var-dataset_ADLB_singleextract-select", "WGRLOFL") testthat::expect_false( identical( table_before, - app_driver$get_active_module_table_output("table-table-with-settings") + app_driver$get_active_module_table_output("tmctable-table-with-settings") ) ) app_driver$expect_no_validation_error() @@ -206,7 +206,7 @@ testthat::test_that("e2e - tm_t_shift_by_grade: Deselection of worst_flag throws skip_if_too_deep(5) app_driver <- app_driver_tm_t_shift_by_grade() app_driver$set_active_module_input("worst_flag_var-dataset_ADLB_singleextract-select", NULL) - testthat::expect_identical(app_driver$get_active_module_table_output("table-table-with-settings"), data.frame()) + testthat::expect_identical(app_driver$get_active_module_table_output("tmctable-table-with-settings"), data.frame()) app_driver$expect_validation_error() testthat::expect_equal( app_driver$active_module_element_text( diff --git a/tests/testthat/test-shinytest2-tm_t_smq.R b/tests/testthat/test-shinytest2-tm_t_smq.R index 4c14aa965e..c80dedb7f3 100644 --- a/tests/testthat/test-shinytest2-tm_t_smq.R +++ b/tests/testthat/test-shinytest2-tm_t_smq.R @@ -62,7 +62,7 @@ testthat::test_that("e2e - tm_t_smq: Module initializes in teal without errors a app_driver$expect_no_shiny_error() app_driver$expect_no_validation_error() testthat::expect_true( - app_driver$is_visible(app_driver$active_module_element("table-table-with-settings")) + app_driver$is_visible(app_driver$active_module_element("tmctable-table-with-settings")) ) app_driver$stop() }) @@ -103,12 +103,12 @@ testthat::test_that( { skip_if_too_deep(5) app_driver <- app_driver_tm_t_smq() - table_before <- app_driver$get_active_module_table_output("table-table-with-settings") + table_before <- app_driver$get_active_module_table_output("tmctable-table-with-settings") app_driver$set_active_module_input("arm_var-dataset_ADSL_singleextract-select", "SEX") testthat::expect_false( identical( table_before, - app_driver$get_active_module_table_output("table-table-with-settings") + app_driver$get_active_module_table_output("tmctable-table-with-settings") ) ) app_driver$expect_no_validation_error() @@ -120,7 +120,7 @@ testthat::test_that("e2e - tm_t_smq: Deselection of arm_var throws validation er skip_if_too_deep(5) app_driver <- app_driver_tm_t_smq() app_driver$set_active_module_input("arm_var-dataset_ADSL_singleextract-select", NULL) - testthat::expect_identical(app_driver$get_active_module_table_output("table-table-with-settings"), data.frame()) + testthat::expect_identical(app_driver$get_active_module_table_output("tmctable-table-with-settings"), data.frame()) app_driver$expect_validation_error() testthat::expect_equal( app_driver$active_module_element_text("arm_var-dataset_ADSL_singleextract-select_input .shiny-validation-message"), @@ -132,12 +132,12 @@ testthat::test_that("e2e - tm_t_smq: Deselection of arm_var throws validation er testthat::test_that("e2e - tm_t_smq: Selecting paramcd changes the table and does not throw validation errors.", { skip_if_too_deep(5) app_driver <- app_driver_tm_t_smq() - table_before <- app_driver$get_active_module_table_output("table-table-with-settings") + table_before <- app_driver$get_active_module_table_output("tmctable-table-with-settings") app_driver$set_active_module_input("llt-dataset_ADAE_singleextract-select", "SEX") testthat::expect_false( identical( table_before, - app_driver$get_active_module_table_output("table-table-with-settings") + app_driver$get_active_module_table_output("tmctable-table-with-settings") ) ) app_driver$expect_no_validation_error() @@ -148,7 +148,7 @@ testthat::test_that("e2e - tm_t_smq: Deselection of paramcd throws validation er skip_if_too_deep(5) app_driver <- app_driver_tm_t_smq() app_driver$set_active_module_input("llt-dataset_ADAE_singleextract-select", NULL) - testthat::expect_identical(app_driver$get_active_module_table_output("table-table-with-settings"), data.frame()) + testthat::expect_identical(app_driver$get_active_module_table_output("tmctable-table-with-settings"), data.frame()) app_driver$expect_validation_error() testthat::expect_equal( app_driver$active_module_element_text("llt-dataset_ADAE_singleextract-select_input .shiny-validation-message"), @@ -162,12 +162,12 @@ testthat::test_that( { skip_if_too_deep(5) app_driver <- app_driver_tm_t_smq() - table_before <- app_driver$get_active_module_table_output("table-table-with-settings") + table_before <- app_driver$get_active_module_table_output("tmctable-table-with-settings") app_driver$set_active_module_input("baskets-dataset_ADAE_singleextract-select", "CQ01NAM") testthat::expect_false( identical( table_before, - app_driver$get_active_module_table_output("table-table-with-settings") + app_driver$get_active_module_table_output("tmctable-table-with-settings") ) ) app_driver$expect_no_validation_error() @@ -179,7 +179,7 @@ testthat::test_that("e2e - tm_t_smq: Deselection of worst_flag throws validation skip_if_too_deep(5) app_driver <- app_driver_tm_t_smq() app_driver$set_active_module_input("baskets-dataset_ADAE_singleextract-select", NULL) - testthat::expect_identical(app_driver$get_active_module_table_output("table-table-with-settings"), data.frame()) + testthat::expect_identical(app_driver$get_active_module_table_output("tmctable-table-with-settings"), data.frame()) app_driver$expect_validation_error() testthat::expect_equal( app_driver$active_module_element_text("baskets-dataset_ADAE_singleextract-select_input .shiny-validation-message"), diff --git a/tests/testthat/test-shinytest2-tm_t_summary.R b/tests/testthat/test-shinytest2-tm_t_summary.R index 77a411c727..39168eb0da 100644 --- a/tests/testthat/test-shinytest2-tm_t_summary.R +++ b/tests/testthat/test-shinytest2-tm_t_summary.R @@ -41,7 +41,7 @@ testthat::test_that("e2e - tm_t_summary: Module initializes in teal without erro app_driver$expect_no_shiny_error() app_driver$expect_no_validation_error() testthat::expect_true( - app_driver$is_visible(app_driver$active_module_element("table-table-with-settings")) + app_driver$is_visible(app_driver$active_module_element("tmctable-table-with-settings")) ) app_driver$stop() }) @@ -77,12 +77,12 @@ testthat::test_that( { skip_if_too_deep(5) app_driver <- app_driver_tm_t_summary() - table_before <- app_driver$get_active_module_table_output("table-table-with-settings") + table_before <- app_driver$get_active_module_table_output("tmctable-table-with-settings") app_driver$set_active_module_input("arm_var-dataset_ADSL_singleextract-select", "ARMCD") testthat::expect_false( identical( table_before, - app_driver$get_active_module_table_output("table-table-with-settings") + app_driver$get_active_module_table_output("tmctable-table-with-settings") ) ) app_driver$expect_no_validation_error() @@ -94,7 +94,7 @@ testthat::test_that("e2e - tm_t_summary: Deselection of arm_var throws validatio skip_if_too_deep(5) app_driver <- app_driver_tm_t_summary() app_driver$set_active_module_input("arm_var-dataset_ADSL_singleextract-select", NULL) - testthat::expect_identical(app_driver$get_active_module_table_output("table-table-with-settings"), data.frame()) + testthat::expect_identical(app_driver$get_active_module_table_output("tmctable-table-with-settings"), data.frame()) app_driver$expect_validation_error() testthat::expect_equal( app_driver$active_module_element_text("arm_var-dataset_ADSL_singleextract-select_input .shiny-validation-message"), @@ -108,12 +108,12 @@ testthat::test_that( { skip_if_too_deep(5) app_driver <- app_driver_tm_t_summary() - table_before <- app_driver$get_active_module_table_output("table-table-with-settings") + table_before <- app_driver$get_active_module_table_output("tmctable-table-with-settings") app_driver$set_active_module_input("summarize_vars-dataset_ADSL_singleextract-select", c("SEX", "AGE")) testthat::expect_false( identical( table_before, - app_driver$get_active_module_table_output("table-table-with-settings") + app_driver$get_active_module_table_output("tmctable-table-with-settings") ) ) app_driver$expect_no_validation_error() @@ -125,7 +125,7 @@ testthat::test_that("e2e - tm_t_summary: Deselection of summarize_vars throws va skip_if_too_deep(5) app_driver <- app_driver_tm_t_summary() app_driver$set_active_module_input("summarize_vars-dataset_ADSL_singleextract-select", NULL) - testthat::expect_identical(app_driver$get_active_module_table_output("table-table-with-settings"), data.frame()) + testthat::expect_identical(app_driver$get_active_module_table_output("tmctable-table-with-settings"), data.frame()) app_driver$expect_validation_error() testthat::expect_equal( app_driver$active_module_element_text( diff --git a/tests/testthat/test-shinytest2-tm_t_summary_by.R b/tests/testthat/test-shinytest2-tm_t_summary_by.R index 47038a4c9f..856390a722 100644 --- a/tests/testthat/test-shinytest2-tm_t_summary_by.R +++ b/tests/testthat/test-shinytest2-tm_t_summary_by.R @@ -60,7 +60,7 @@ testthat::test_that("e2e - tm_t_summary_by: Module initializes in teal without e app_driver$expect_no_shiny_error() app_driver$expect_no_validation_error() testthat::expect_true( - app_driver$is_visible(app_driver$active_module_element("table-table-with-settings")) + app_driver$is_visible(app_driver$active_module_element("tmctable-table-with-settings")) ) app_driver$stop() }) @@ -112,12 +112,12 @@ testthat::test_that( { skip_if_too_deep(5) app_driver <- app_driver_tm_t_summary_by() - table_before <- app_driver$get_active_module_table_output("table-table-with-settings") + table_before <- app_driver$get_active_module_table_output("tmctable-table-with-settings") app_driver$set_active_module_input("arm_var-dataset_ADSL_singleextract-select", "ARMCD") testthat::expect_false( identical( table_before, - app_driver$get_active_module_table_output("table-table-with-settings") + app_driver$get_active_module_table_output("tmctable-table-with-settings") ) ) app_driver$expect_no_validation_error() @@ -129,7 +129,7 @@ testthat::test_that("e2e - tm_t_summary_by: Deselection of arm_var throws valida skip_if_too_deep(5) app_driver <- app_driver_tm_t_summary_by() app_driver$set_active_module_input("arm_var-dataset_ADSL_singleextract-select", NULL) - testthat::expect_identical(app_driver$get_active_module_table_output("table-table-with-settings"), data.frame()) + testthat::expect_identical(app_driver$get_active_module_table_output("tmctable-table-with-settings"), data.frame()) app_driver$expect_validation_error() testthat::expect_equal( app_driver$active_module_element_text("arm_var-dataset_ADSL_singleextract-select_input .shiny-validation-message"), @@ -143,12 +143,12 @@ testthat::test_that( { skip_if_too_deep(5) app_driver <- app_driver_tm_t_summary_by() - table_before <- app_driver$get_active_module_table_output("table-table-with-settings") + table_before <- app_driver$get_active_module_table_output("tmctable-table-with-settings") app_driver$set_active_module_input("paramcd-dataset_ADLB_singleextract-filter1-vals", "CRP") testthat::expect_false( identical( table_before, - app_driver$get_active_module_table_output("table-table-with-settings") + app_driver$get_active_module_table_output("tmctable-table-with-settings") ) ) app_driver$expect_no_validation_error() @@ -160,7 +160,7 @@ testthat::test_that("e2e - tm_t_summary_by: Deselection of arm_var throws valida skip_if_too_deep(5) app_driver <- app_driver_tm_t_summary_by() app_driver$set_active_module_input("paramcd-dataset_ADLB_singleextract-filter1-vals", NULL) - testthat::expect_identical(app_driver$get_active_module_table_output("table-table-with-settings"), data.frame()) + testthat::expect_identical(app_driver$get_active_module_table_output("tmctable-table-with-settings"), data.frame()) app_driver$expect_validation_error() testthat::expect_equal( app_driver$active_module_element_text( @@ -176,12 +176,12 @@ testthat::test_that( { skip_if_too_deep(5) app_driver <- app_driver_tm_t_summary_by() - table_before <- app_driver$get_active_module_table_output("table-table-with-settings") + table_before <- app_driver$get_active_module_table_output("tmctable-table-with-settings") app_driver$set_active_module_input("by_vars-dataset_ADLB_singleextract-select", "PARAM") testthat::expect_false( identical( table_before, - app_driver$get_active_module_table_output("table-table-with-settings") + app_driver$get_active_module_table_output("tmctable-table-with-settings") ) ) app_driver$expect_no_validation_error() @@ -194,12 +194,12 @@ testthat::test_that( { skip_if_too_deep(5) app_driver <- app_driver_tm_t_summary_by() - table_before <- app_driver$get_active_module_table_output("table-table-with-settings") + table_before <- app_driver$get_active_module_table_output("tmctable-table-with-settings") app_driver$set_active_module_input("by_vars-dataset_ADLB_singleextract-select", NULL) testthat::expect_false( identical( table_before, - app_driver$get_active_module_table_output("table-table-with-settings") + app_driver$get_active_module_table_output("tmctable-table-with-settings") ) ) app_driver$expect_no_validation_error() @@ -212,12 +212,12 @@ testthat::test_that( { skip_if_too_deep(5) app_driver <- app_driver_tm_t_summary_by() - table_before <- app_driver$get_active_module_table_output("table-table-with-settings") + table_before <- app_driver$get_active_module_table_output("tmctable-table-with-settings") app_driver$set_active_module_input("summarize_vars-dataset_ADLB_singleextract-select", "CHG") testthat::expect_false( identical( table_before, - app_driver$get_active_module_table_output("table-table-with-settings") + app_driver$get_active_module_table_output("tmctable-table-with-settings") ) ) app_driver$expect_no_validation_error() @@ -229,7 +229,7 @@ testthat::test_that("e2e - tm_t_summary_by: Deselection of summarize_vars throws skip_if_too_deep(5) app_driver <- app_driver_tm_t_summary_by() app_driver$set_active_module_input("summarize_vars-dataset_ADLB_singleextract-select", NULL) - testthat::expect_identical(app_driver$get_active_module_table_output("table-table-with-settings"), data.frame()) + testthat::expect_identical(app_driver$get_active_module_table_output("tmctable-table-with-settings"), data.frame()) app_driver$expect_validation_error() testthat::expect_equal( app_driver$active_module_element_text( diff --git a/tests/testthat/test-shinytest2-tm_t_tte.R b/tests/testthat/test-shinytest2-tm_t_tte.R index 6d43f47770..e506abf2f0 100644 --- a/tests/testthat/test-shinytest2-tm_t_tte.R +++ b/tests/testthat/test-shinytest2-tm_t_tte.R @@ -81,7 +81,7 @@ testthat::test_that("e2e - tm_t_tte: Module initializes in teal without errors a app_driver$expect_no_shiny_error() app_driver$expect_no_validation_error() testthat::expect_true( - app_driver$is_visible(app_driver$active_module_element("table-table-with-settings")) + app_driver$is_visible(app_driver$active_module_element("tmctable-table-with-settings")) ) app_driver$stop() }) @@ -159,12 +159,12 @@ testthat::test_that( { skip_if_too_deep(5) app_driver <- app_driver_tm_t_tte() - table_before <- app_driver$get_active_module_table_output("table-table-with-settings") + table_before <- app_driver$get_active_module_table_output("tmctable-table-with-settings") app_driver$set_active_module_input("paramcd-dataset_ADTTE_singleextract-filter1-vals", "CRSD") testthat::expect_false( identical( table_before, - app_driver$get_active_module_table_output("table-table-with-settings") + app_driver$get_active_module_table_output("tmctable-table-with-settings") ) ) app_driver$expect_no_validation_error() @@ -176,7 +176,7 @@ testthat::test_that("e2e - tm_t_tte: Deselection of paramcd throws validation er skip_if_too_deep(5) app_driver <- app_driver_tm_t_tte() app_driver$set_active_module_input("paramcd-dataset_ADTTE_singleextract-filter1-vals", NULL) - testthat::expect_identical(app_driver$get_active_module_table_output("table-table-with-settings"), data.frame()) + testthat::expect_identical(app_driver$get_active_module_table_output("tmctable-table-with-settings"), data.frame()) app_driver$expect_validation_error() testthat::expect_equal( app_driver$active_module_element_text( @@ -192,12 +192,12 @@ testthat::test_that( { skip_if_too_deep(5) app_driver <- app_driver_tm_t_tte() - table_before <- app_driver$get_active_module_table_output("table-table-with-settings") + table_before <- app_driver$get_active_module_table_output("tmctable-table-with-settings") app_driver$set_active_module_input("arm_var-dataset_ADSL_singleextract-select", "ARMCD") testthat::expect_false( identical( table_before, - app_driver$get_active_module_table_output("table-table-with-settings") + app_driver$get_active_module_table_output("tmctable-table-with-settings") ) ) app_driver$expect_no_validation_error() @@ -209,7 +209,7 @@ testthat::test_that("e2e - tm_t_tte: Deselection of arm_var throws validation er skip_if_too_deep(5) app_driver <- app_driver_tm_t_tte() app_driver$set_active_module_input("arm_var-dataset_ADSL_singleextract-select", NULL) - testthat::expect_identical(app_driver$get_active_module_table_output("table-table-with-settings"), data.frame()) + testthat::expect_identical(app_driver$get_active_module_table_output("tmctable-table-with-settings"), data.frame()) app_driver$expect_validation_error() testthat::expect_equal( app_driver$active_module_element_text( @@ -225,12 +225,12 @@ testthat::test_that( { skip_if_too_deep(5) app_driver <- app_driver_tm_t_tte() - table_before <- app_driver$get_active_module_table_output("table-table-with-settings") + table_before <- app_driver$get_active_module_table_output("tmctable-table-with-settings") app_driver$set_active_module_input("strata_var-dataset_ADSL_singleextract-select", "BMRKR2") testthat::expect_false( identical( table_before, - app_driver$get_active_module_table_output("table-table-with-settings") + app_driver$get_active_module_table_output("tmctable-table-with-settings") ) ) app_driver$expect_no_validation_error() @@ -243,12 +243,12 @@ testthat::test_that( { skip_if_too_deep(5) app_driver <- app_driver_tm_t_tte() - table_before <- app_driver$get_active_module_table_output("table-table-with-settings") + table_before <- app_driver$get_active_module_table_output("tmctable-table-with-settings") app_driver$set_active_module_input("strata_var-dataset_ADSL_singleextract-select", NULL) testthat::expect_false( identical( table_before, - app_driver$get_active_module_table_output("table-table-with-settings") + app_driver$get_active_module_table_output("tmctable-table-with-settings") ) ) app_driver$expect_no_validation_error() From 40a111566f76c63b4d751093932ee0256ec7a45e Mon Sep 17 00:00:00 2001 From: m7pr Date: Thu, 13 Jun 2024 13:08:37 +0200 Subject: [PATCH 12/14] append loggin with tmc prefix --- R/tm_a_gee.R | 2 +- R/tm_a_mmrm.R | 2 +- R/tm_g_barchart_simple.R | 2 +- R/tm_g_ci.R | 2 +- R/tm_g_forest_rsp.R | 2 +- R/tm_g_forest_tte.R | 2 +- R/tm_g_ipp.R | 2 +- R/tm_g_km.R | 2 +- R/tm_g_lineplot.R | 2 +- R/tm_g_pp_adverse_events.R | 2 +- R/tm_g_pp_patient_timeline.R | 2 +- R/tm_g_pp_therapy.R | 2 +- R/tm_g_pp_vitals.R | 2 +- R/tm_t_abnormality.R | 2 +- R/tm_t_abnormality_by_worst_grade.R | 2 +- R/tm_t_ancova.R | 2 +- R/tm_t_binary_outcome.R | 2 +- R/tm_t_coxreg.R | 2 +- R/tm_t_events.R | 2 +- R/tm_t_events_by_grade.R | 2 +- R/tm_t_events_patyear.R | 2 +- R/tm_t_events_summary.R | 2 +- R/tm_t_exposure.R | 2 +- R/tm_t_logistic.R | 2 +- R/tm_t_mult_events.R | 2 +- R/tm_t_pp_basic_info.R | 2 +- R/tm_t_pp_laboratory.R | 2 +- R/tm_t_pp_medical_history.R | 2 +- R/tm_t_pp_prior_medication.R | 2 +- R/tm_t_shift_by_arm.R | 2 +- R/tm_t_shift_by_arm_by_worst.R | 2 +- R/tm_t_shift_by_grade.R | 2 +- R/tm_t_smq.R | 2 +- R/tm_t_summary.R | 2 +- R/tm_t_summary_by.R | 2 +- R/tm_t_tte.R | 2 +- R/utils.R | 6 +++--- 37 files changed, 39 insertions(+), 39 deletions(-) diff --git a/R/tm_a_gee.R b/R/tm_a_gee.R index acde38d4e5..69db5a35f3 100644 --- a/R/tm_a_gee.R +++ b/R/tm_a_gee.R @@ -389,7 +389,7 @@ srv_gee <- function(id, checkmate::assert_class(isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - track_shiny_input_changes(input) + tmc_track_shiny_input_changes() ## split_covariates ---- observeEvent(input[[extract_input("cov_var", dataname)]], ignoreNULL = FALSE, diff --git a/R/tm_a_mmrm.R b/R/tm_a_mmrm.R index aeb07bdf8a..f7be704128 100644 --- a/R/tm_a_mmrm.R +++ b/R/tm_a_mmrm.R @@ -845,7 +845,7 @@ srv_mmrm <- function(id, checkmate::assert_class(isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - track_shiny_input_changes(input) + tmc_track_shiny_input_changes() # Reactive responsible for sending a disable/enable signal # to show R code and debug info buttons disable_r_code <- reactiveVal(FALSE) diff --git a/R/tm_g_barchart_simple.R b/R/tm_g_barchart_simple.R index f6bfcb7ff6..df1c4fa137 100644 --- a/R/tm_g_barchart_simple.R +++ b/R/tm_g_barchart_simple.R @@ -340,7 +340,7 @@ srv_g_barchart_simple <- function(id, moduleServer(id, function(input, output, session) { - track_shiny_input_changes(input) + tmc_track_shiny_input_changes() rule_dupl <- function(others) { function(value) { othervals <- lapply( diff --git a/R/tm_g_ci.R b/R/tm_g_ci.R index ad6de8db68..a45407a987 100644 --- a/R/tm_g_ci.R +++ b/R/tm_g_ci.R @@ -382,7 +382,7 @@ srv_g_ci <- function(id, checkmate::assert_class(isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - track_shiny_input_changes(input) + tmc_track_shiny_input_changes() selector_list <- teal.transform::data_extract_multiple_srv( data_extract = list(x_var = x_var, y_var = y_var, color = color), datasets = data, diff --git a/R/tm_g_forest_rsp.R b/R/tm_g_forest_rsp.R index e6cf105add..0d2f796a2a 100644 --- a/R/tm_g_forest_rsp.R +++ b/R/tm_g_forest_rsp.R @@ -508,7 +508,7 @@ srv_g_forest_rsp <- function(id, checkmate::assert_class(isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - track_shiny_input_changes(input) + tmc_track_shiny_input_changes() # Setup arm variable selection, default reference arms, and default # comparison arms for encoding panel iv_arm_ref <- arm_ref_comp_observer( diff --git a/R/tm_g_forest_tte.R b/R/tm_g_forest_tte.R index 7a960b9451..22406112ed 100644 --- a/R/tm_g_forest_tte.R +++ b/R/tm_g_forest_tte.R @@ -502,7 +502,7 @@ srv_g_forest_tte <- function(id, checkmate::assert_class(isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - track_shiny_input_changes(input) + tmc_track_shiny_input_changes() # Setup arm variable selection, default reference arms, and default # comparison arms for encoding panel iv_arm_ref <- arm_ref_comp_observer( diff --git a/R/tm_g_ipp.R b/R/tm_g_ipp.R index 9888a6d5f9..7c5183b427 100644 --- a/R/tm_g_ipp.R +++ b/R/tm_g_ipp.R @@ -482,7 +482,7 @@ srv_g_ipp <- function(id, checkmate::assert_class(isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - track_shiny_input_changes(input) + tmc_track_shiny_input_changes() selector_list <- teal.transform::data_extract_multiple_srv( datasets = data, data_extract = list( diff --git a/R/tm_g_km.R b/R/tm_g_km.R index 70829114b8..5a9543b1f8 100644 --- a/R/tm_g_km.R +++ b/R/tm_g_km.R @@ -637,7 +637,7 @@ srv_g_km <- function(id, checkmate::assert_class(isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - track_shiny_input_changes(input) + tmc_track_shiny_input_changes() # Setup arm variable selection, default reference arms and default # comparison arms for encoding panel iv_arm_ref <- arm_ref_comp_observer( diff --git a/R/tm_g_lineplot.R b/R/tm_g_lineplot.R index b2bed44117..5f18715ebe 100644 --- a/R/tm_g_lineplot.R +++ b/R/tm_g_lineplot.R @@ -516,7 +516,7 @@ srv_g_lineplot <- function(id, checkmate::assert_class(isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - track_shiny_input_changes(input) + tmc_track_shiny_input_changes() selector_list <- teal.transform::data_extract_multiple_srv( data_extract = list(x = x, y = y, strata = strata, paramcd = paramcd, y_unit = y_unit, param = param), datasets = data, diff --git a/R/tm_g_pp_adverse_events.R b/R/tm_g_pp_adverse_events.R index 1081c4c47a..dc2eff72af 100644 --- a/R/tm_g_pp_adverse_events.R +++ b/R/tm_g_pp_adverse_events.R @@ -442,7 +442,7 @@ srv_g_adverse_events <- function(id, checkmate::assert_class(isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - track_shiny_input_changes(input) + tmc_track_shiny_input_changes() patient_id <- reactive(input$patient_id) # Init diff --git a/R/tm_g_pp_patient_timeline.R b/R/tm_g_pp_patient_timeline.R index 86fb5cac96..2c5e0477d7 100644 --- a/R/tm_g_pp_patient_timeline.R +++ b/R/tm_g_pp_patient_timeline.R @@ -713,7 +713,7 @@ srv_g_patient_timeline <- function(id, checkmate::assert_class(isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - track_shiny_input_changes(input) + tmc_track_shiny_input_changes() patient_id <- reactive(input$patient_id) # Init diff --git a/R/tm_g_pp_therapy.R b/R/tm_g_pp_therapy.R index 9e83eb71c8..cfad0a0475 100644 --- a/R/tm_g_pp_therapy.R +++ b/R/tm_g_pp_therapy.R @@ -557,7 +557,7 @@ srv_g_therapy <- function(id, checkmate::assert_class(isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - track_shiny_input_changes(input) + tmc_track_shiny_input_changes() patient_id <- reactive(input$patient_id) # Init diff --git a/R/tm_g_pp_vitals.R b/R/tm_g_pp_vitals.R index 041c7680eb..0d42899538 100644 --- a/R/tm_g_pp_vitals.R +++ b/R/tm_g_pp_vitals.R @@ -411,7 +411,7 @@ srv_g_vitals <- function(id, checkmate::assert_class(isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - track_shiny_input_changes(input) + tmc_track_shiny_input_changes() patient_id <- reactive(input$patient_id) # Init diff --git a/R/tm_t_abnormality.R b/R/tm_t_abnormality.R index 33da8ebdfe..6f7521d173 100644 --- a/R/tm_t_abnormality.R +++ b/R/tm_t_abnormality.R @@ -505,7 +505,7 @@ srv_t_abnormality <- function(id, checkmate::assert_class(isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - track_shiny_input_changes(input) + tmc_track_shiny_input_changes() selector_list <- teal.transform::data_extract_multiple_srv( data_extract = list( arm_var = arm_var, diff --git a/R/tm_t_abnormality_by_worst_grade.R b/R/tm_t_abnormality_by_worst_grade.R index 7c69765211..9e6c8d698c 100644 --- a/R/tm_t_abnormality_by_worst_grade.R +++ b/R/tm_t_abnormality_by_worst_grade.R @@ -503,7 +503,7 @@ srv_t_abnormality_by_worst_grade <- function(id, # nolint: object_length. checkmate::assert_class(shiny::isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - track_shiny_input_changes(input) + tmc_track_shiny_input_changes() isolate({ resolved <- teal.transform::resolve_delayed(worst_flag_indicator, as.list(data()@env)) teal.widgets::updateOptionalSelectInput( diff --git a/R/tm_t_ancova.R b/R/tm_t_ancova.R index b14bcb182d..d054a4fa96 100644 --- a/R/tm_t_ancova.R +++ b/R/tm_t_ancova.R @@ -696,7 +696,7 @@ srv_ancova <- function(id, checkmate::assert_class(shiny::isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - track_shiny_input_changes(input) + tmc_track_shiny_input_changes() # Setup arm variable selection, default reference arms, and default # comparison arms for encoding panel. iv_arco <- arm_ref_comp_observer( diff --git a/R/tm_t_binary_outcome.R b/R/tm_t_binary_outcome.R index 9f2598ae40..5c1ea35928 100644 --- a/R/tm_t_binary_outcome.R +++ b/R/tm_t_binary_outcome.R @@ -752,7 +752,7 @@ srv_t_binary_outcome <- function(id, checkmate::assert_class(shiny::isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - track_shiny_input_changes(input) + tmc_track_shiny_input_changes() # Setup arm variable selection, default reference arms, and default # comparison arms for encoding panel iv_arm_ref <- arm_ref_comp_observer( diff --git a/R/tm_t_coxreg.R b/R/tm_t_coxreg.R index 466786c362..29efd6dba5 100644 --- a/R/tm_t_coxreg.R +++ b/R/tm_t_coxreg.R @@ -716,7 +716,7 @@ srv_t_coxreg <- function(id, checkmate::assert_class(shiny::isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - track_shiny_input_changes(input) + tmc_track_shiny_input_changes() # Observer to update reference and comparison arm input options. iv_arm_ref <- arm_ref_comp_observer( session, diff --git a/R/tm_t_events.R b/R/tm_t_events.R index 9f842977f7..cd35e0eacf 100644 --- a/R/tm_t_events.R +++ b/R/tm_t_events.R @@ -677,7 +677,7 @@ srv_t_events_byterm <- function(id, checkmate::assert_class(shiny::isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - track_shiny_input_changes(input) + tmc_track_shiny_input_changes() selector_list <- teal.transform::data_extract_multiple_srv( data_extract = list(arm_var = arm_var, hlt = hlt, llt = llt), datasets = data, diff --git a/R/tm_t_events_by_grade.R b/R/tm_t_events_by_grade.R index f29c4e30ed..49d4944aa9 100644 --- a/R/tm_t_events_by_grade.R +++ b/R/tm_t_events_by_grade.R @@ -1021,7 +1021,7 @@ srv_t_events_by_grade <- function(id, checkmate::assert_class(shiny::isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - track_shiny_input_changes(input) + tmc_track_shiny_input_changes() selector_list <- teal.transform::data_extract_multiple_srv( data_extract = list(arm_var = arm_var, hlt = hlt, llt = llt, grade = grade), datasets = data, diff --git a/R/tm_t_events_patyear.R b/R/tm_t_events_patyear.R index 170ab7763b..d744ff3460 100644 --- a/R/tm_t_events_patyear.R +++ b/R/tm_t_events_patyear.R @@ -401,7 +401,7 @@ srv_events_patyear <- function(id, checkmate::assert_class(shiny::isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - track_shiny_input_changes(input) + tmc_track_shiny_input_changes() observeEvent(anl_q(), { data_anl <- merged$anl_q()[["ANL"]] aval_unit_var <- merged$anl_input_r()$columns_source$avalu_var diff --git a/R/tm_t_events_summary.R b/R/tm_t_events_summary.R index ea9964d712..c18330dab2 100644 --- a/R/tm_t_events_summary.R +++ b/R/tm_t_events_summary.R @@ -809,7 +809,7 @@ srv_t_events_summary <- function(id, checkmate::assert_class(shiny::isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - track_shiny_input_changes(input) + tmc_track_shiny_input_changes() data_extract_vars <- list( arm_var = arm_var, dthfl_var = dthfl_var, dcsreas_var = dcsreas_var, aeseq_var = aeseq_var, llt = llt diff --git a/R/tm_t_exposure.R b/R/tm_t_exposure.R index 39210a0de5..35ebc26cf2 100644 --- a/R/tm_t_exposure.R +++ b/R/tm_t_exposure.R @@ -489,7 +489,7 @@ srv_t_exposure <- function(id, checkmate::assert_class(data, "reactive") checkmate::assert_class(shiny::isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - track_shiny_input_changes(input) + tmc_track_shiny_input_changes() rule_intersection <- function(other) { function(value) { others <- selector_list()[[other]]()$select diff --git a/R/tm_t_logistic.R b/R/tm_t_logistic.R index 1a1f5b44db..eba9e73f9d 100644 --- a/R/tm_t_logistic.R +++ b/R/tm_t_logistic.R @@ -450,7 +450,7 @@ srv_t_logistic <- function(id, checkmate::assert_class(shiny::isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - track_shiny_input_changes(input) + tmc_track_shiny_input_changes() # Observer to update reference and comparison arm input options. iv_arco <- arm_ref_comp_observer( session, diff --git a/R/tm_t_mult_events.R b/R/tm_t_mult_events.R index b986d292c9..474fa52711 100644 --- a/R/tm_t_mult_events.R +++ b/R/tm_t_mult_events.R @@ -479,7 +479,7 @@ srv_t_mult_events_byterm <- function(id, checkmate::assert_class(shiny::isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - track_shiny_input_changes(input) + tmc_track_shiny_input_changes() selector_list <- teal.transform::data_extract_multiple_srv( data_extract = list( arm_var = arm_var, diff --git a/R/tm_t_pp_basic_info.R b/R/tm_t_pp_basic_info.R index 818844e13f..ae0b7e6623 100644 --- a/R/tm_t_pp_basic_info.R +++ b/R/tm_t_pp_basic_info.R @@ -180,7 +180,7 @@ srv_t_basic_info <- function(id, checkmate::assert_class(shiny::isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - track_shiny_input_changes(input) + tmc_track_shiny_input_changes() patient_id <- reactive(input$patient_id) # Init diff --git a/R/tm_t_pp_laboratory.R b/R/tm_t_pp_laboratory.R index af5b9dbf63..6e6acced89 100644 --- a/R/tm_t_pp_laboratory.R +++ b/R/tm_t_pp_laboratory.R @@ -376,7 +376,7 @@ srv_g_laboratory <- function(id, checkmate::assert_class(shiny::isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - track_shiny_input_changes(input) + tmc_track_shiny_input_changes() patient_id <- reactive(input$patient_id) # Init diff --git a/R/tm_t_pp_medical_history.R b/R/tm_t_pp_medical_history.R index 4a1d8ece74..8e52f9defb 100644 --- a/R/tm_t_pp_medical_history.R +++ b/R/tm_t_pp_medical_history.R @@ -244,7 +244,7 @@ srv_t_medical_history <- function(id, checkmate::assert_class(shiny::isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - track_shiny_input_changes(input) + tmc_track_shiny_input_changes() patient_id <- reactive(input$patient_id) # Init diff --git a/R/tm_t_pp_prior_medication.R b/R/tm_t_pp_prior_medication.R index 4fa422b072..90d28ccde0 100644 --- a/R/tm_t_pp_prior_medication.R +++ b/R/tm_t_pp_prior_medication.R @@ -242,7 +242,7 @@ srv_t_prior_medication <- function(id, checkmate::assert_class(shiny::isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - track_shiny_input_changes(input) + tmc_track_shiny_input_changes() patient_id <- reactive(input$patient_id) selector_list <- teal.transform::data_extract_multiple_srv( diff --git a/R/tm_t_shift_by_arm.R b/R/tm_t_shift_by_arm.R index 8901b0344c..f8f66e4e91 100644 --- a/R/tm_t_shift_by_arm.R +++ b/R/tm_t_shift_by_arm.R @@ -436,7 +436,7 @@ srv_shift_by_arm <- function(id, checkmate::assert_class(data, "reactive") checkmate::assert_class(shiny::isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - track_shiny_input_changes(input) + tmc_track_shiny_input_changes() selector_list <- teal.transform::data_extract_multiple_srv( data_extract = list( arm_var = arm_var, diff --git a/R/tm_t_shift_by_arm_by_worst.R b/R/tm_t_shift_by_arm_by_worst.R index d7b46172e5..5d08680a38 100644 --- a/R/tm_t_shift_by_arm_by_worst.R +++ b/R/tm_t_shift_by_arm_by_worst.R @@ -456,7 +456,7 @@ srv_shift_by_arm_by_worst <- function(id, checkmate::assert_class(data, "reactive") checkmate::assert_class(shiny::isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - track_shiny_input_changes(input) + tmc_track_shiny_input_changes() selector_list <- teal.transform::data_extract_multiple_srv( data_extract = list( arm_var = arm_var, diff --git a/R/tm_t_shift_by_grade.R b/R/tm_t_shift_by_grade.R index 0541f24b66..d4ecbe17e8 100644 --- a/R/tm_t_shift_by_grade.R +++ b/R/tm_t_shift_by_grade.R @@ -754,7 +754,7 @@ srv_t_shift_by_grade <- function(id, checkmate::assert_class(shiny::isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - track_shiny_input_changes(input) + tmc_track_shiny_input_changes() selector_list <- teal.transform::data_extract_multiple_srv( data_extract = list( arm_var = arm_var, diff --git a/R/tm_t_smq.R b/R/tm_t_smq.R index 4d1f24e13c..ebba6825d0 100644 --- a/R/tm_t_smq.R +++ b/R/tm_t_smq.R @@ -543,7 +543,7 @@ srv_t_smq <- function(id, checkmate::assert_class(data, "reactive") checkmate::assert_class(shiny::isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - track_shiny_input_changes(input) + tmc_track_shiny_input_changes() selector_list <- teal.transform::data_extract_multiple_srv( data_extract = list( scopes = scopes, diff --git a/R/tm_t_summary.R b/R/tm_t_summary.R index 582bc2d144..2f4faf74ec 100644 --- a/R/tm_t_summary.R +++ b/R/tm_t_summary.R @@ -404,7 +404,7 @@ srv_summary <- function(id, checkmate::assert_class(data, "reactive") checkmate::assert_class(shiny::isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - track_shiny_input_changes(input) + tmc_track_shiny_input_changes() selector_list <- teal.transform::data_extract_multiple_srv( data_extract = list(arm_var = arm_var, summarize_vars = summarize_vars), datasets = data, diff --git a/R/tm_t_summary_by.R b/R/tm_t_summary_by.R index 83375eb25f..18871af833 100644 --- a/R/tm_t_summary_by.R +++ b/R/tm_t_summary_by.R @@ -598,7 +598,7 @@ srv_summary_by <- function(id, checkmate::assert_class(shiny::isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - track_shiny_input_changes(input) + tmc_track_shiny_input_changes() vars <- list(arm_var = arm_var, id_var = id_var, summarize_vars = summarize_vars, by_vars = by_vars) if (!is.null(paramcd)) { diff --git a/R/tm_t_tte.R b/R/tm_t_tte.R index d42a60bf92..955fccb1d1 100644 --- a/R/tm_t_tte.R +++ b/R/tm_t_tte.R @@ -754,7 +754,7 @@ srv_t_tte <- function(id, checkmate::assert_class(data, "reactive") checkmate::assert_class(shiny::isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - track_shiny_input_changes(input) + tmc_track_shiny_input_changes() # Setup arm variable selection, default reference arms, and default # comparison arms for encoding panel iv_arm_ref <- arm_ref_comp_observer( diff --git a/R/utils.R b/R/utils.R index c8eb426360..d90f461f54 100644 --- a/R/utils.R +++ b/R/utils.R @@ -948,19 +948,19 @@ set_default_total_label <- function(total_label) { interactive <- NULL -track_shiny_input_changes <- function(input){ +tmc_track_shiny_input_changes <- function(input){ if (shiny::isRunning()) { plot_nss <- c("mmrm_plot", "myplot", "chart", "patient_timeline_plot", "therapy_plot", "vitals_plot") elements <- c("plot_modal_width", "flex_width", "plot_modal_height", "flex_height") - exclude_inputs <- unlist(lapply(plot_nss, paste, elements, sep = "-")) + excluded_inputs <- unlist(lapply(plot_nss, paste, elements, sep = "-")) logger::log_shiny_input_changes( input, level = logger::TRACE, namespace = "teal.modules.clinical", - exclude = exclude_inputs + excluded_inputs = excluded_inputs ) } } From 8c7abd3c1598599db03e0dbd0809db31e16def4b Mon Sep 17 00:00:00 2001 From: m7pr Date: Thu, 13 Jun 2024 13:15:01 +0200 Subject: [PATCH 13/14] bring back input --- R/tm_a_gee.R | 2 +- R/tm_a_mmrm.R | 2 +- R/tm_g_barchart_simple.R | 2 +- R/tm_g_ci.R | 2 +- R/tm_g_forest_rsp.R | 2 +- R/tm_g_forest_tte.R | 2 +- R/tm_g_ipp.R | 2 +- R/tm_g_km.R | 2 +- R/tm_g_lineplot.R | 2 +- R/tm_g_pp_adverse_events.R | 2 +- R/tm_g_pp_patient_timeline.R | 2 +- R/tm_g_pp_therapy.R | 2 +- R/tm_g_pp_vitals.R | 2 +- R/tm_t_abnormality.R | 2 +- R/tm_t_abnormality_by_worst_grade.R | 2 +- R/tm_t_ancova.R | 2 +- R/tm_t_binary_outcome.R | 2 +- R/tm_t_coxreg.R | 2 +- R/tm_t_events.R | 2 +- R/tm_t_events_by_grade.R | 2 +- R/tm_t_events_patyear.R | 2 +- R/tm_t_events_summary.R | 2 +- R/tm_t_exposure.R | 2 +- R/tm_t_logistic.R | 2 +- R/tm_t_mult_events.R | 2 +- R/tm_t_pp_basic_info.R | 2 +- R/tm_t_pp_laboratory.R | 2 +- R/tm_t_pp_medical_history.R | 2 +- R/tm_t_pp_prior_medication.R | 2 +- R/tm_t_shift_by_arm.R | 2 +- R/tm_t_shift_by_arm_by_worst.R | 2 +- R/tm_t_shift_by_grade.R | 2 +- R/tm_t_smq.R | 2 +- R/tm_t_summary.R | 2 +- R/tm_t_summary_by.R | 2 +- R/tm_t_tte.R | 2 +- 36 files changed, 36 insertions(+), 36 deletions(-) diff --git a/R/tm_a_gee.R b/R/tm_a_gee.R index 69db5a35f3..422bc63ac5 100644 --- a/R/tm_a_gee.R +++ b/R/tm_a_gee.R @@ -389,7 +389,7 @@ srv_gee <- function(id, checkmate::assert_class(isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - tmc_track_shiny_input_changes() + tmc_track_shiny_input_changes(input) ## split_covariates ---- observeEvent(input[[extract_input("cov_var", dataname)]], ignoreNULL = FALSE, diff --git a/R/tm_a_mmrm.R b/R/tm_a_mmrm.R index f7be704128..d0eb997e08 100644 --- a/R/tm_a_mmrm.R +++ b/R/tm_a_mmrm.R @@ -845,7 +845,7 @@ srv_mmrm <- function(id, checkmate::assert_class(isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - tmc_track_shiny_input_changes() + tmc_track_shiny_input_changes(input) # Reactive responsible for sending a disable/enable signal # to show R code and debug info buttons disable_r_code <- reactiveVal(FALSE) diff --git a/R/tm_g_barchart_simple.R b/R/tm_g_barchart_simple.R index df1c4fa137..2870cf14d3 100644 --- a/R/tm_g_barchart_simple.R +++ b/R/tm_g_barchart_simple.R @@ -340,7 +340,7 @@ srv_g_barchart_simple <- function(id, moduleServer(id, function(input, output, session) { - tmc_track_shiny_input_changes() + tmc_track_shiny_input_changes(input) rule_dupl <- function(others) { function(value) { othervals <- lapply( diff --git a/R/tm_g_ci.R b/R/tm_g_ci.R index a45407a987..ea430eeed1 100644 --- a/R/tm_g_ci.R +++ b/R/tm_g_ci.R @@ -382,7 +382,7 @@ srv_g_ci <- function(id, checkmate::assert_class(isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - tmc_track_shiny_input_changes() + tmc_track_shiny_input_changes(input) selector_list <- teal.transform::data_extract_multiple_srv( data_extract = list(x_var = x_var, y_var = y_var, color = color), datasets = data, diff --git a/R/tm_g_forest_rsp.R b/R/tm_g_forest_rsp.R index 0d2f796a2a..7ad7a04f4e 100644 --- a/R/tm_g_forest_rsp.R +++ b/R/tm_g_forest_rsp.R @@ -508,7 +508,7 @@ srv_g_forest_rsp <- function(id, checkmate::assert_class(isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - tmc_track_shiny_input_changes() + tmc_track_shiny_input_changes(input) # Setup arm variable selection, default reference arms, and default # comparison arms for encoding panel iv_arm_ref <- arm_ref_comp_observer( diff --git a/R/tm_g_forest_tte.R b/R/tm_g_forest_tte.R index 22406112ed..6b2e65ccdf 100644 --- a/R/tm_g_forest_tte.R +++ b/R/tm_g_forest_tte.R @@ -502,7 +502,7 @@ srv_g_forest_tte <- function(id, checkmate::assert_class(isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - tmc_track_shiny_input_changes() + tmc_track_shiny_input_changes(input) # Setup arm variable selection, default reference arms, and default # comparison arms for encoding panel iv_arm_ref <- arm_ref_comp_observer( diff --git a/R/tm_g_ipp.R b/R/tm_g_ipp.R index 7c5183b427..39be3826d1 100644 --- a/R/tm_g_ipp.R +++ b/R/tm_g_ipp.R @@ -482,7 +482,7 @@ srv_g_ipp <- function(id, checkmate::assert_class(isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - tmc_track_shiny_input_changes() + tmc_track_shiny_input_changes(input) selector_list <- teal.transform::data_extract_multiple_srv( datasets = data, data_extract = list( diff --git a/R/tm_g_km.R b/R/tm_g_km.R index 5a9543b1f8..e3de867fe9 100644 --- a/R/tm_g_km.R +++ b/R/tm_g_km.R @@ -637,7 +637,7 @@ srv_g_km <- function(id, checkmate::assert_class(isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - tmc_track_shiny_input_changes() + tmc_track_shiny_input_changes(input) # Setup arm variable selection, default reference arms and default # comparison arms for encoding panel iv_arm_ref <- arm_ref_comp_observer( diff --git a/R/tm_g_lineplot.R b/R/tm_g_lineplot.R index 5f18715ebe..50593b6c2f 100644 --- a/R/tm_g_lineplot.R +++ b/R/tm_g_lineplot.R @@ -516,7 +516,7 @@ srv_g_lineplot <- function(id, checkmate::assert_class(isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - tmc_track_shiny_input_changes() + tmc_track_shiny_input_changes(input) selector_list <- teal.transform::data_extract_multiple_srv( data_extract = list(x = x, y = y, strata = strata, paramcd = paramcd, y_unit = y_unit, param = param), datasets = data, diff --git a/R/tm_g_pp_adverse_events.R b/R/tm_g_pp_adverse_events.R index dc2eff72af..8488a0deea 100644 --- a/R/tm_g_pp_adverse_events.R +++ b/R/tm_g_pp_adverse_events.R @@ -442,7 +442,7 @@ srv_g_adverse_events <- function(id, checkmate::assert_class(isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - tmc_track_shiny_input_changes() + tmc_track_shiny_input_changes(input) patient_id <- reactive(input$patient_id) # Init diff --git a/R/tm_g_pp_patient_timeline.R b/R/tm_g_pp_patient_timeline.R index 2c5e0477d7..5a41714639 100644 --- a/R/tm_g_pp_patient_timeline.R +++ b/R/tm_g_pp_patient_timeline.R @@ -713,7 +713,7 @@ srv_g_patient_timeline <- function(id, checkmate::assert_class(isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - tmc_track_shiny_input_changes() + tmc_track_shiny_input_changes(input) patient_id <- reactive(input$patient_id) # Init diff --git a/R/tm_g_pp_therapy.R b/R/tm_g_pp_therapy.R index cfad0a0475..738f9b313e 100644 --- a/R/tm_g_pp_therapy.R +++ b/R/tm_g_pp_therapy.R @@ -557,7 +557,7 @@ srv_g_therapy <- function(id, checkmate::assert_class(isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - tmc_track_shiny_input_changes() + tmc_track_shiny_input_changes(input) patient_id <- reactive(input$patient_id) # Init diff --git a/R/tm_g_pp_vitals.R b/R/tm_g_pp_vitals.R index 0d42899538..a523e1b24e 100644 --- a/R/tm_g_pp_vitals.R +++ b/R/tm_g_pp_vitals.R @@ -411,7 +411,7 @@ srv_g_vitals <- function(id, checkmate::assert_class(isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - tmc_track_shiny_input_changes() + tmc_track_shiny_input_changes(input) patient_id <- reactive(input$patient_id) # Init diff --git a/R/tm_t_abnormality.R b/R/tm_t_abnormality.R index 6f7521d173..45f7711b86 100644 --- a/R/tm_t_abnormality.R +++ b/R/tm_t_abnormality.R @@ -505,7 +505,7 @@ srv_t_abnormality <- function(id, checkmate::assert_class(isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - tmc_track_shiny_input_changes() + tmc_track_shiny_input_changes(input) selector_list <- teal.transform::data_extract_multiple_srv( data_extract = list( arm_var = arm_var, diff --git a/R/tm_t_abnormality_by_worst_grade.R b/R/tm_t_abnormality_by_worst_grade.R index 9e6c8d698c..447c6b5dea 100644 --- a/R/tm_t_abnormality_by_worst_grade.R +++ b/R/tm_t_abnormality_by_worst_grade.R @@ -503,7 +503,7 @@ srv_t_abnormality_by_worst_grade <- function(id, # nolint: object_length. checkmate::assert_class(shiny::isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - tmc_track_shiny_input_changes() + tmc_track_shiny_input_changes(input) isolate({ resolved <- teal.transform::resolve_delayed(worst_flag_indicator, as.list(data()@env)) teal.widgets::updateOptionalSelectInput( diff --git a/R/tm_t_ancova.R b/R/tm_t_ancova.R index d054a4fa96..1e183c6c24 100644 --- a/R/tm_t_ancova.R +++ b/R/tm_t_ancova.R @@ -696,7 +696,7 @@ srv_ancova <- function(id, checkmate::assert_class(shiny::isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - tmc_track_shiny_input_changes() + tmc_track_shiny_input_changes(input) # Setup arm variable selection, default reference arms, and default # comparison arms for encoding panel. iv_arco <- arm_ref_comp_observer( diff --git a/R/tm_t_binary_outcome.R b/R/tm_t_binary_outcome.R index 5c1ea35928..6c60cec7a9 100644 --- a/R/tm_t_binary_outcome.R +++ b/R/tm_t_binary_outcome.R @@ -752,7 +752,7 @@ srv_t_binary_outcome <- function(id, checkmate::assert_class(shiny::isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - tmc_track_shiny_input_changes() + tmc_track_shiny_input_changes(input) # Setup arm variable selection, default reference arms, and default # comparison arms for encoding panel iv_arm_ref <- arm_ref_comp_observer( diff --git a/R/tm_t_coxreg.R b/R/tm_t_coxreg.R index 29efd6dba5..ab54002f14 100644 --- a/R/tm_t_coxreg.R +++ b/R/tm_t_coxreg.R @@ -716,7 +716,7 @@ srv_t_coxreg <- function(id, checkmate::assert_class(shiny::isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - tmc_track_shiny_input_changes() + tmc_track_shiny_input_changes(input) # Observer to update reference and comparison arm input options. iv_arm_ref <- arm_ref_comp_observer( session, diff --git a/R/tm_t_events.R b/R/tm_t_events.R index cd35e0eacf..e72d81bd62 100644 --- a/R/tm_t_events.R +++ b/R/tm_t_events.R @@ -677,7 +677,7 @@ srv_t_events_byterm <- function(id, checkmate::assert_class(shiny::isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - tmc_track_shiny_input_changes() + tmc_track_shiny_input_changes(input) selector_list <- teal.transform::data_extract_multiple_srv( data_extract = list(arm_var = arm_var, hlt = hlt, llt = llt), datasets = data, diff --git a/R/tm_t_events_by_grade.R b/R/tm_t_events_by_grade.R index 49d4944aa9..1f745d0c1f 100644 --- a/R/tm_t_events_by_grade.R +++ b/R/tm_t_events_by_grade.R @@ -1021,7 +1021,7 @@ srv_t_events_by_grade <- function(id, checkmate::assert_class(shiny::isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - tmc_track_shiny_input_changes() + tmc_track_shiny_input_changes(input) selector_list <- teal.transform::data_extract_multiple_srv( data_extract = list(arm_var = arm_var, hlt = hlt, llt = llt, grade = grade), datasets = data, diff --git a/R/tm_t_events_patyear.R b/R/tm_t_events_patyear.R index d744ff3460..8444cf5056 100644 --- a/R/tm_t_events_patyear.R +++ b/R/tm_t_events_patyear.R @@ -401,7 +401,7 @@ srv_events_patyear <- function(id, checkmate::assert_class(shiny::isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - tmc_track_shiny_input_changes() + tmc_track_shiny_input_changes(input) observeEvent(anl_q(), { data_anl <- merged$anl_q()[["ANL"]] aval_unit_var <- merged$anl_input_r()$columns_source$avalu_var diff --git a/R/tm_t_events_summary.R b/R/tm_t_events_summary.R index c18330dab2..a71d9cbbe9 100644 --- a/R/tm_t_events_summary.R +++ b/R/tm_t_events_summary.R @@ -809,7 +809,7 @@ srv_t_events_summary <- function(id, checkmate::assert_class(shiny::isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - tmc_track_shiny_input_changes() + tmc_track_shiny_input_changes(input) data_extract_vars <- list( arm_var = arm_var, dthfl_var = dthfl_var, dcsreas_var = dcsreas_var, aeseq_var = aeseq_var, llt = llt diff --git a/R/tm_t_exposure.R b/R/tm_t_exposure.R index 35ebc26cf2..86ecc7f675 100644 --- a/R/tm_t_exposure.R +++ b/R/tm_t_exposure.R @@ -489,7 +489,7 @@ srv_t_exposure <- function(id, checkmate::assert_class(data, "reactive") checkmate::assert_class(shiny::isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - tmc_track_shiny_input_changes() + tmc_track_shiny_input_changes(input) rule_intersection <- function(other) { function(value) { others <- selector_list()[[other]]()$select diff --git a/R/tm_t_logistic.R b/R/tm_t_logistic.R index eba9e73f9d..cfb543f68f 100644 --- a/R/tm_t_logistic.R +++ b/R/tm_t_logistic.R @@ -450,7 +450,7 @@ srv_t_logistic <- function(id, checkmate::assert_class(shiny::isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - tmc_track_shiny_input_changes() + tmc_track_shiny_input_changes(input) # Observer to update reference and comparison arm input options. iv_arco <- arm_ref_comp_observer( session, diff --git a/R/tm_t_mult_events.R b/R/tm_t_mult_events.R index 474fa52711..049e7a3e9d 100644 --- a/R/tm_t_mult_events.R +++ b/R/tm_t_mult_events.R @@ -479,7 +479,7 @@ srv_t_mult_events_byterm <- function(id, checkmate::assert_class(shiny::isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - tmc_track_shiny_input_changes() + tmc_track_shiny_input_changes(input) selector_list <- teal.transform::data_extract_multiple_srv( data_extract = list( arm_var = arm_var, diff --git a/R/tm_t_pp_basic_info.R b/R/tm_t_pp_basic_info.R index ae0b7e6623..7958e13c9c 100644 --- a/R/tm_t_pp_basic_info.R +++ b/R/tm_t_pp_basic_info.R @@ -180,7 +180,7 @@ srv_t_basic_info <- function(id, checkmate::assert_class(shiny::isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - tmc_track_shiny_input_changes() + tmc_track_shiny_input_changes(input) patient_id <- reactive(input$patient_id) # Init diff --git a/R/tm_t_pp_laboratory.R b/R/tm_t_pp_laboratory.R index 6e6acced89..6d84240a70 100644 --- a/R/tm_t_pp_laboratory.R +++ b/R/tm_t_pp_laboratory.R @@ -376,7 +376,7 @@ srv_g_laboratory <- function(id, checkmate::assert_class(shiny::isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - tmc_track_shiny_input_changes() + tmc_track_shiny_input_changes(input) patient_id <- reactive(input$patient_id) # Init diff --git a/R/tm_t_pp_medical_history.R b/R/tm_t_pp_medical_history.R index 8e52f9defb..b254f6f85a 100644 --- a/R/tm_t_pp_medical_history.R +++ b/R/tm_t_pp_medical_history.R @@ -244,7 +244,7 @@ srv_t_medical_history <- function(id, checkmate::assert_class(shiny::isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - tmc_track_shiny_input_changes() + tmc_track_shiny_input_changes(input) patient_id <- reactive(input$patient_id) # Init diff --git a/R/tm_t_pp_prior_medication.R b/R/tm_t_pp_prior_medication.R index 90d28ccde0..5bb061a0e5 100644 --- a/R/tm_t_pp_prior_medication.R +++ b/R/tm_t_pp_prior_medication.R @@ -242,7 +242,7 @@ srv_t_prior_medication <- function(id, checkmate::assert_class(shiny::isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - tmc_track_shiny_input_changes() + tmc_track_shiny_input_changes(input) patient_id <- reactive(input$patient_id) selector_list <- teal.transform::data_extract_multiple_srv( diff --git a/R/tm_t_shift_by_arm.R b/R/tm_t_shift_by_arm.R index f8f66e4e91..e6043b716d 100644 --- a/R/tm_t_shift_by_arm.R +++ b/R/tm_t_shift_by_arm.R @@ -436,7 +436,7 @@ srv_shift_by_arm <- function(id, checkmate::assert_class(data, "reactive") checkmate::assert_class(shiny::isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - tmc_track_shiny_input_changes() + tmc_track_shiny_input_changes(input) selector_list <- teal.transform::data_extract_multiple_srv( data_extract = list( arm_var = arm_var, diff --git a/R/tm_t_shift_by_arm_by_worst.R b/R/tm_t_shift_by_arm_by_worst.R index 5d08680a38..c3240de4a9 100644 --- a/R/tm_t_shift_by_arm_by_worst.R +++ b/R/tm_t_shift_by_arm_by_worst.R @@ -456,7 +456,7 @@ srv_shift_by_arm_by_worst <- function(id, checkmate::assert_class(data, "reactive") checkmate::assert_class(shiny::isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - tmc_track_shiny_input_changes() + tmc_track_shiny_input_changes(input) selector_list <- teal.transform::data_extract_multiple_srv( data_extract = list( arm_var = arm_var, diff --git a/R/tm_t_shift_by_grade.R b/R/tm_t_shift_by_grade.R index d4ecbe17e8..cac393db67 100644 --- a/R/tm_t_shift_by_grade.R +++ b/R/tm_t_shift_by_grade.R @@ -754,7 +754,7 @@ srv_t_shift_by_grade <- function(id, checkmate::assert_class(shiny::isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - tmc_track_shiny_input_changes() + tmc_track_shiny_input_changes(input) selector_list <- teal.transform::data_extract_multiple_srv( data_extract = list( arm_var = arm_var, diff --git a/R/tm_t_smq.R b/R/tm_t_smq.R index ebba6825d0..2b9c96db7e 100644 --- a/R/tm_t_smq.R +++ b/R/tm_t_smq.R @@ -543,7 +543,7 @@ srv_t_smq <- function(id, checkmate::assert_class(data, "reactive") checkmate::assert_class(shiny::isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - tmc_track_shiny_input_changes() + tmc_track_shiny_input_changes(input) selector_list <- teal.transform::data_extract_multiple_srv( data_extract = list( scopes = scopes, diff --git a/R/tm_t_summary.R b/R/tm_t_summary.R index 2f4faf74ec..21264d2276 100644 --- a/R/tm_t_summary.R +++ b/R/tm_t_summary.R @@ -404,7 +404,7 @@ srv_summary <- function(id, checkmate::assert_class(data, "reactive") checkmate::assert_class(shiny::isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - tmc_track_shiny_input_changes() + tmc_track_shiny_input_changes(input) selector_list <- teal.transform::data_extract_multiple_srv( data_extract = list(arm_var = arm_var, summarize_vars = summarize_vars), datasets = data, diff --git a/R/tm_t_summary_by.R b/R/tm_t_summary_by.R index 18871af833..c40a47d8d8 100644 --- a/R/tm_t_summary_by.R +++ b/R/tm_t_summary_by.R @@ -598,7 +598,7 @@ srv_summary_by <- function(id, checkmate::assert_class(shiny::isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - tmc_track_shiny_input_changes() + tmc_track_shiny_input_changes(input) vars <- list(arm_var = arm_var, id_var = id_var, summarize_vars = summarize_vars, by_vars = by_vars) if (!is.null(paramcd)) { diff --git a/R/tm_t_tte.R b/R/tm_t_tte.R index 955fccb1d1..cc7723abcf 100644 --- a/R/tm_t_tte.R +++ b/R/tm_t_tte.R @@ -754,7 +754,7 @@ srv_t_tte <- function(id, checkmate::assert_class(data, "reactive") checkmate::assert_class(shiny::isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - tmc_track_shiny_input_changes() + tmc_track_shiny_input_changes(input) # Setup arm variable selection, default reference arms, and default # comparison arms for encoding panel iv_arm_ref <- arm_ref_comp_observer( From db1ba71fc57e2443d11b5e10213d9c979f01748b Mon Sep 17 00:00:00 2001 From: m7pr Date: Thu, 13 Jun 2024 13:21:07 +0200 Subject: [PATCH 14/14] sprlintr --- R/utils.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/utils.R b/R/utils.R index d90f461f54..4a304e5d26 100644 --- a/R/utils.R +++ b/R/utils.R @@ -948,7 +948,7 @@ set_default_total_label <- function(total_label) { interactive <- NULL -tmc_track_shiny_input_changes <- function(input){ +tmc_track_shiny_input_changes <- function(input) { if (shiny::isRunning()) { plot_nss <- c("mmrm_plot", "myplot", "chart", "patient_timeline_plot", "therapy_plot", "vitals_plot")