Skip to content

shinytest2 0.3.0

Compare
Choose a tag to compare
@cpsievert cpsievert released this 15 Aug 15:18
· 14 commits to main since this release
462c090

Breaking changes

  • AppDriver$get_screenshot(selector=), AppDriver$expect_screenshot(selector=)'s default selector value changed from the HTML DOM selector "html" to "scrollable_area". "scrollable_area" is a custom {shinytest2} selector that will take a screenshot of the entire scrollable area. While a breaking change, this new default value is more intuitive and robust to non-standard CSS height and width values that fail with "html". (#325)

New features

  • AppDriver$get_screenshot(selector=), AppDriver$expect_screenshot(selector=), and their corresponding selector values inside screenshot_args=, gained two custom {shinytest2} values: "scrollable_area" and "viewport". "scrollable_area" is the new default value and it takes a screenshot of the entire scrollable area. This is more intuitive than the previous value of the HTML DOM selector "html" which may result in a surprising height and width. "viewport" will take a screenshot of the current browser viewport. This means it will take a screenshot of whatever $view() is currently looking at. (#325)

  • GitHub Action rstudio/shinytest2/actions/test-app added support for multiple directories in app-dir. These can be supplied using multiline string yaml syntax. See use-ci vignette for more details. (#332)

  • GitHub Action rstudio/shinytest2/actions/test-app changed the default value of upload-snapshots from false to true. This is in preparation for automated snapshot handling. (#332)

Bug / Improvements

  • Set the directory to the Shiny App directory before starting the background R process. This allows for local .Rprofile and .Renviron files to be found naturally. (#275)