tests/testthat/test-textInputAddon.R

context("textInputAddon")


test_that("Default", {

  tagad <- textInputAddon(
    inputId = "id",
    label = "Label",
    placeholder = "Username",
    addon = shiny::icon("at")
  )
  expect_length(tagad$children, 2)
  class_addon <- tagad$children[[2]]$children[[1]]$attribs$class
  expect_identical(class_addon, "input-group-addon")
})
dreamRs/shinyWidgets documentation built on June 5, 2019, 4:07 a.m.