inst/app_template/tests/testthat/test-shinytest2.R

library(shinytest2)

test_that("Initial snapshot values are consistent", {
  app <- AppDriver$new(name = "init")
  app$expect_values()
}){{
if (isTRUE(module)) {
HTML('


test_that("Module values are consistent", {
  app <- AppDriver$new(name = "mod")
  app$click("examplemodule1-button")
  app$click("examplemodule1-button")
  app$expect_values()
})')
}
}}
rstudio/shiny documentation built on June 14, 2024, 4:25 p.m.