Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion R/app-driver.R
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ check_cran_deprecated <- function(
#'
#' Reactive values from within your Shiny application can be exported using the
#' method:
#' [`shiny::exportTestValues()`](https://shiny.rstudio.com/reference/shiny/latest/exportTestValues.html).
#' [`shiny::exportTestValues()`](https://shiny.posit.co/r/reference/shiny/latest/exporttestvalues.html).
#' This underutilized method exposes internal values of your app
#' without needing to create a corresponding input value or output value.
#'
Expand Down
2 changes: 1 addition & 1 deletion R/compare-screenshot-threshold.R
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
#' [`AppDriver`]`$expect_screenshot(threshold=, kernel_size=)` to make
#' expectations on screenshots given particular `threshold` and `kernel_size`
#' values.
#' @examples
#' @examplesIf requireNamespace("showimage", quietly = TRUE)
#' img_folder <- system.file("example/imgs/", package = "shinytest2")
#' slider_old <- fs::path(img_folder, "slider-old.png")
#' slider_new <- fs::path(img_folder, "slider-new.png")
Expand Down
2 changes: 1 addition & 1 deletion man/AppDriver.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions man/compare_screenshot_threshold.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions vignettes/robust.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ If you use a dynamic UI and want to reassert the names are still unique, it is p

- `input` corresponds to the `input` values provided by the Shiny application.
- `output` corresponds to the `output` values provided by the Shiny application.
- `export` corresponds to value that have been \_export_ed by the Shiny application. These values are exported by [`shiny::exportTestValues()`](https://shiny.rstudio.com/reference/shiny/latest/exportTestValues.html) from within your `server` function.
- `export` corresponds to value that have been \_export_ed by the Shiny application. These values are exported by [`shiny::exportTestValues()`](https://shiny.posit.co/r/reference/shiny/latest/exporttestvalues.html) from within your `server` function.

When `AppDriver$expect_values()` is called, each `input`, `output`, and `export` value will be serialized to JSON and saved to a snapshot file (e.g. `001.json`) for followup expectations.

Expand Down Expand Up @@ -279,7 +279,7 @@ When expecting a screenshot, a `AppDriver$new(variant=)` must be supplied. The v

## Exported values

It cannot be recommended enough to use [`shiny::exportTestValues()`](https://shiny.rstudio.com/reference/shiny/latest/exportTestValues.html) to test your Shiny app's reactive values.
It cannot be recommended enough to use [`shiny::exportTestValues()`](https://shiny.posit.co/r/reference/shiny/latest/exporttestvalues.html) to test your Shiny app's reactive values.

If we make the assumption that package authors create consistent render methods, then we can test the values provided to render methods using `shiny::exportTestValues()`. Let's look at an example of a Shiny app that displays a plot of the first `n` rows of data.

Expand Down
Loading