tests/testthat/test-shinytest2-snapshot_manager.R

testthat::test_that("e2e: wunder_bar_srv clicking snapshot icon opens snapshot-manager modal", {
  skip_if_too_deep(5)
  app <- TealAppDriver$new(
    data = simple_teal_data(),
    modules = example_module(label = "Example Module")
  )

  testthat::expect_null(app$get_text(".snapshot_manager_modal"))
  app$click("teal-snapshot_manager_panel-show_snapshot_manager")
  testthat::expect_match(app$get_text(".snapshot_manager_modal"), "Snapshot manager")
})

Try the teal package in your browser

Any scripts or data that you put into this service are public.

teal documentation built on Aug. 21, 2025, 5:58 p.m.