context("input") test_that("test uiinput", { # type expect_is(uiinput(), "shiny.tag") # text input si_str <- as.character(uiinput()) expect_true(any(grepl("
", si_str, fixed = TRUE))) }) test_that("test text_input", { # type expect_is(text_input("text_input", "Text Input"), "shiny.tag") # empty input expect_error(text_input()) # text input si_str <- as.character(text_input("text_input", "Text Input")) expect_true(any(grepl("
\n \n ", si_str, fixed = TRUE))) # text value si_str <- as.character(text_input("text_input", "Text Input", value ="x")) expect_true(any(grepl("value=\"x\"", si_str, fixed = TRUE))) }) test_that("test textInput", { # type expect_is(textInput("text_input", "Text Input"), "shiny.tag") # empty input expect_error(textInput()) # text input si_str <- as.character(textInput("text_input", "Text Input")) expect_true(any(grepl("
\n
", si_str, fixed = TRUE))) }) test_that("test textAreaInput", { # type expect_is(textAreaInput("ta_input", "Text Area Input"), "shiny.tag") # empty input expect_error(textAreaInput()) # text input si_str <- as.character(textAreaInput("ta_input", "Text Area Input")) expect_true(any(grepl("