Skip to content

Conversation

schloerke
Copy link
Collaborator

@schloerke schloerke commented Feb 22, 2023

Rearrange test file locations to leverage the standard (not nested) testing file structure.

If we are in a package, then a package test file can point to an app in a different location. The snaps will be captured where ever "here" is (which is in the package).

Now:

  • We are not fighting an uphill battle with the testing infrastructure.
  • We have no extra boiler plate
  • We have no need for APP_DIR/tests/testthat/setup-shinytest2.R. Can use load_app_support(app_dir=) when necessary.

Remaining:

  • load_app_env() is deprecated. Implement/Use local_app_support() / with_app_support() instead.
  • Test check_setup values
  • Requires R file loading (WIP feat: Allow for packages to be dynamically loaded in app #402)
    • Look into using testthat::test_dir(load_package=) and testthat:::test_files_setup_env()
  • Record test should save the recording into the package if within a package.
  • Update use-package.Rmd vignette

schloerke and others added 30 commits February 1, 2023 14:21
* main:
  Update cran-comments.md
  Update cran-comments.md
  Run revdep
  Move crashpad file to setup test file
  Update cran-comments.md
  Remove detritus Crashpad file/directory on CRAN
  Don't use github `{lintr}` or `{decor}` package
  Run revdep on 12 pkgs; ✅
  Remove C++11 from DESCRIPTION (#326)
  News entries for #284 and #288
  Load global vars when saving app objects (#307)
  Better error message when both app.R and server.R are found (#284)
  Don't assume preview overflow is of length 1 (#291)
  Force JS code to be a character for `{glue}` support (#288)
  fix typo: expect_unqiue_names -> expect_unique... (#270)
  Fix typo: use_shinytest -> use_shinytest2 (#269)
  `compare_screenshot_threshold()` should not error from `screenshot_max_difference()` (#276)
  Increment version number to 0.2.1
  Change default screenshot selector to `"scrollable_area"` (from bounding box of `"html"` DOM) (#325)
  actions/test-app; Add multi app `app-dir` support; Default upload-snapshot to `true`  (#322)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant