From b609be2f80751ad2372d20dcd2a6035470ce6ba7 Mon Sep 17 00:00:00 2001 From: Vedha Viyash <49812166+vedhav@users.noreply.github.com> Date: Tue, 10 Dec 2024 21:24:41 +0530 Subject: [PATCH 1/2] Fix tmc integration test - Wait for shiny app idle after fit is clicked (#1296) Potentially closes #1258 _Potentially_, because I was not able to reproduce this issue in any way to know for sure that fixes the issue. I tested in macOS, linux (docker image our CI uses), and Windows machines after installing all the packages from the GitHub main branch and was unable to reproduce this behavior. We can close the issue after we confirm the daily integration test is resolved. Rationale for the change: Since this module only works after the `Fit Model` button is clicked the shinytest2 logic goes as follows: 1. Initialize the `TealAppDriver` object using the `tm_a_mmrm()` module. 2. Click the `Fit Model` button. 3. Perform the test logic: a. Select the `Output Type` b. Check for errors c. Check if output changed ![image](https://github.com/user-attachments/assets/6523679a-1921-4091-9915-381a093e1447) I think that when we start checking for errors we spot the validation error before the output had time to render because the output type we want to select is in the first selection, which is pre-selected, and since we do not wait for input changes when the input is the same, we quickly start checking for errors and observe the validation error. If, this is the case, this PR will fix it. --- tests/testthat/test-shinytest2-tm_a_mmrm.R | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/testthat/test-shinytest2-tm_a_mmrm.R b/tests/testthat/test-shinytest2-tm_a_mmrm.R index 4c98bd0bc..11f99ef87 100644 --- a/tests/testthat/test-shinytest2-tm_a_mmrm.R +++ b/tests/testthat/test-shinytest2-tm_a_mmrm.R @@ -62,6 +62,7 @@ app_driver_tm_a_mmrm <- function(fit_model = TRUE) { ) if (fit_model) { app_driver$click(selector = app_driver$active_module_element("button_start")) + app_driver$wait_for_idle() } app_driver } From 389eb12a1229feeefee10bb6e36c47da07a0aa51 Mon Sep 17 00:00:00 2001 From: vedhav Date: Tue, 10 Dec 2024 15:55:40 +0000 Subject: [PATCH 2/2] [skip actions] Bump version to 0.9.1.9038 --- DESCRIPTION | 4 ++-- NEWS.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index c4df92134..d60e70082 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: teal.modules.clinical Title: 'teal' Modules for Standard Clinical Outputs -Version: 0.9.1.9037 -Date: 2024-12-05 +Version: 0.9.1.9038 +Date: 2024-12-10 Authors@R: c( person("Joe", "Zhu", , "joe.zhu@roche.com", role = c("aut", "cre")), person("Jana", "Stoilova", , "jana.stoilova@roche.com", role = "aut"), diff --git a/NEWS.md b/NEWS.md index a3767c3d8..91ce5b920 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,4 @@ -# teal.modules.clinical 0.9.1.9037 +# teal.modules.clinical 0.9.1.9038 ### Enhancements * Added `teal.logger` functionality for logging changes in shiny inputs in all modules.