inst/explorer/tests/shinytest/date_test.R

library(corporaexplorer)
library(shinytest)

context("Explorer: Date test")

test_that("Explorer: Dates work", {
    app <- shinytest::ShinyDriver$new("../..")
    app$snapshotInit("date_test")
    app$snapshot()
    app$setInputs(search_text_1 = "october")
    app$setInputs(search_button = "click")

    output <- app$getValue(name = "date_slider")

    expect_equal(output[1], 2011)
    expect_equal(output[2], 2020)
})

Try the corporaexplorer package in your browser

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

corporaexplorer documentation built on June 20, 2022, 5:20 p.m.