test_that("wa_comparison requires input_id", {
expect_error(
shiny.webawesome:::wa_comparison(),
'argument "input_id" is missing',
fixed = TRUE
)
})
test_that("wa_comparison defaults render the minimal semantic wrapper", {
expect_exact_html(
render_html(shiny.webawesome:::wa_comparison(input_id = "comparison")),
c('')
)
})
test_that("wa_comparison override render includes attrs and slots", {
expect_exact_html(
render_html(
shiny.webawesome:::wa_comparison(
input_id = "comparison",
dir = "rtl",
lang = "en",
position = 75,
after = "After",
before = "Before",
handle = "Handle"
)
),
c(
'',
' After',
' Before',
' Handle',
""
)
)
})