Adds validate_input() -- previously named as "picks"#1642
Conversation
- teal_transform_module to not use badge_dropdown
Code Coverage SummaryDiff against mainResults for commit: c6e6ee1 Minimum allowed coverage is ♻️ This comment has been updated with latest results |
Unit Tests Summary 1 files 36 suites 2m 43s ⏱️ Results for commit c6e6ee1. ♻️ This comment has been updated with latest results. |
Unit Test Performance Difference
Additional test case details
Results for commit c4632e4 ♻️ This comment has been updated with latest results. |
|
8 failed tests in R CMD CHECK Error in `testthat::test_that("e2e: validate_input validates dateRangeInput")`: argument "code" is missing, with no defaultdoes |
|
Ah ok, those are those 8 tests that do not have any body yet |
Yup, this is for the first volunteer |
averissimo
left a comment
There was a problem hiding this comment.
Looks good! I've added missing tests with shinytest2
Pending CI run, but this feature has been heavily tested with tmg and tmc development
| ) | ||
| }) | ||
|
|
||
| testthat::describe("e2e: validate_input validates", { |
validate_input() -- previously named as "picks"
| app_driver <- TealAppDriver$new(init(data = simple_teal_data(), modules = all_inputs_mod)) | ||
| withr::defer(app_driver$stop()) | ||
|
|
||
| it("selectInput", { |
There was a problem hiding this comment.
Each it() assumes the previous steps left the app in a good state. That matches the “one journey” goal, but it means you cannot reorder it() blocks or run a single it() in isolation for a focused failure. If a middle step flakes, everything after it is harder to interpret. For that case, the “traditional” pattern (one test_that + one driver per widget type) is easier to debug
There was a problem hiding this comment.
Good point, I made a change in the new branch that gets out of this dependency on the test.
I kept the same 1 App as the errors are now fully independent (removed the only one that checks for no errors overall which is redundant)
There was a problem hiding this comment.
I made the changes in the new branch as it uses the new API natively
Closes insightsengineering/NEST-roadmap#36
Check also with:
Introduces
validate_inputas an alternative toshinyvalidatepackage. Function is easier to handle thanshinyvalidate, as one can usevalidate_input()inreactiveand display-validation-error on the input and throw shiny-validate-error in the same time. See tmg PR to see how it works