expectUpdate: 'testthat' expectation for a Shiny update

Description Usage Arguments Examples

View source: R/expect.R

Description

testthat expectation for a Shiny update

Usage

1
2
expectUpdate(app, output, ..., timeout = 3000, iotype = c("auto",
  "input", "output"))

Arguments

app

A ShinyDriver object.

output

Character vector, the name(s) of the output widgets that are required to update for the test to succeed.

...

Named arguments specifying updates for Shiny input widgets.

timeout

Timeout for the update to happen, in milliseconds.

iotype

Type of the widget(s) to change. These are normally input widgets.

Examples

1
2
3
4
5
6
7
8
## Not run: 
## https://github.com/rstudio/shiny-examples/tree/master/050-kmeans-example
app <- ShinyDriver$new("050-kmeans-example")
expectUpdate(app, xcol = "Sepal.Width", output = "plot1")
expectUpdate(app, ycol = "Petal.Width", output = "plot1")
expectUpdate(app, clusters = 4, output = "plot1")

## End(Not run)

rstudio/shinytest documentation built on Nov. 2, 2018, 8:59 a.m.