context("ui slider") test_that("test slider_input", { # type expect_is(slider_input("slider_input", 10, 0, 20), "shiny.tag") # empty input expect_error(slider_input()) # number input si_str <- as.character(slider_input("slider_input", 10, 0, 20)) expect_true(grepl( paste("
"), si_str )) }) test_that("test sliderInput", { expect_error(sliderInput("slider_input"), "\"value\" is missing") si_str <- as.character(sliderInput("slider_input", "Label", 10, 0, 20)) expect_true(grepl( "
\n \n", si_str )) expect_true(grepl( "data-max=\"0\" data-step=\"1\" data-start=\"20\">
", si_str )) }) test_that("test range_input", { # type expect_is(range_input("range_input", 10, 15, 0, 20), "shiny.tag") # empty input expect_error(range_input()) # number input si_str <- as.character(range_input("range_input", 10, 15, 0, 20)) expect_true(grepl(paste( "
" ), si_str)) })