insightsengineering / insightsengineering/teal.transform
[Feature Request]: Make sure `validate_input` works with all shiny inputs
- Dominant language
- R
- Stars
- 2
- Forks
- 3
- PR merge metrics
- No merged PRs in 30d
Description
### Feature description
See `test-shinytest2-validate_input.R` in `teal` and make sure that following tests are covered. Objective of the tests is making sure that js function `validateInput` is able to find the container with the input value.
```r
var selector1 = '.shiny-input-container#' + inputId;
var selector2 = '.shiny-input-container:has(#' + inputId + ')';
```
If any input is wrapped in other container, then validation message will not find relevant place for it to show the message. (i don't expect such scenario but we need to make sure)
```r
testthat::test_that("e2e: validate_input validates sliderInput")
testthat::test_that("e2e: validate_input validates selectInput")
testthat::test_that("e2e: validate_input validates selectizeInput")
testthat::test_that("e2e: validate_input validates radioButtons")
testthat::test_that("e2e: validate_input validates checkboxGroupInput")
testthat::test_that("e2e: validate_input validates checkboxInput")
testthat::test_that("e2e: validate_input validates dateInput")
testthat::test_that("e2e: validate_input validates dateRangeInput")
testthat::test_that("e2e: validate_input validates pickerInput")
```
### Code of Conduct
- [x] I agree to follow this project's Code of Conduct.
### Contribution Guidelines
- [x] I agree to follow this project's Contribution Guidelines.
### Security Policy
- [x] I agree to follow this project's Security Policy.
Contributor guide
Assessment
This issue has not been assessed yet.