Nothing
app_driver_osivmm <- function() {
ui <- bslib::page_fluid(
shinyjs::useShinyjs(),
tags$div(
optionalSliderInputValMinMax("a1", "b1", 1)
),
optionalSliderInputValMinMax("a2", "b2", c(3, 1, 5))
)
shiny::shinyApp(ui, function(input, output) {})
}
testthat::test_that(
"e2e: teal.widgets::optionalSliderInputValMinMax: initializes",
{
skip_if_too_deep(5)
app_driver <- shinytest2::AppDriver$new(
app_driver_osivmm(),
name = "osivmm",
variant = "app_driver_osivmm_ui",
wait = FALSE
)
app_driver$wait_for_idle()
expect_hidden("#a1-label", app_driver)
expect_visible("#a2-label", app_driver)
app_driver$stop()
}
)
testthat::test_that("we create label help for optionalSliderInputValMinMax", {
help_text <- "my-help"
text_slider_input_min_max <- as.character(
optionalSliderInputValMinMax("my slider", "my label", 2, label_help = shiny::helpText(help_text))
)
expect_true(grepl(help_text, text_slider_input_min_max))
})
testthat::test_that("snapshot test for optionalSliderInput", {
testthat::skip_if_not_installed("withr")
withr::local_seed(1)
testthat::expect_snapshot(as.character(optionalSliderInput("my slider", "my label", 0, 10, 2)))
})
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.