From ccb070915f8dbe5ebf78ef48248bc6c9bab46af8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Ver=C3=ADssimo?= <211358+averissimo@users.noreply.github.com> Date: Thu, 11 Apr 2024 12:56:13 +0200 Subject: [PATCH 1/2] feat: wait for idle by default after setting module input --- R/TealAppDriver.R | 2 ++ 1 file changed, 2 insertions(+) diff --git a/R/TealAppDriver.R b/R/TealAppDriver.R index 835be00b2d..86204b5bf2 100644 --- a/R/TealAppDriver.R +++ b/R/TealAppDriver.R @@ -232,6 +232,8 @@ TealAppDriver <- R6::R6Class( # nolint: object_name. value, ... ) + dots <- rlang::list2(...) + if (!isFALSE(dots[[wait]])) self$wait_for_idle() # Default behavior is to wait invisible(self) }, #' @description From ae35674de04aae204108209821d415fc3d55c726 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Ver=C3=ADssimo?= <211358+averissimo@users.noreply.github.com> Date: Thu, 11 Apr 2024 14:54:35 +0200 Subject: [PATCH 2/2] fix: remove duration from wait_for_idle(5000) it will reduce execution time --- R/TealAppDriver.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/TealAppDriver.R b/R/TealAppDriver.R index 86204b5bf2..3a45ba12c8 100644 --- a/R/TealAppDriver.R +++ b/R/TealAppDriver.R @@ -73,7 +73,7 @@ TealAppDriver <- R6::R6Class( # nolint: object_name. #' @param ... arguments passed to parent [`shinytest2::AppDriver`] `click()` method. click = function(...) { super$click(...) - self$wait_for_idle(5000) + self$wait_for_idle() }, #' @description #' Check if the app has shiny errors. This checks for global shiny errors.