add shinytest2 for testing run example and draft yaml for deploy #118
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview of changes
Prepared
run_example()
so we can deploy it on our shinyapps.io account.Updated the run_example test to use shinytest2, which opens up the potential for more UI testing of components.
Fixed a bug in
run_example()
(found by the shinytest2 tests spitting out a warning) where we had two IDs with the same name:While I was there I used styler on the
R/run_example.R
file, I think that accounts for most of the changes - just code formatting rather than substantive.PR Checklist
devtools::check()
Reviewer instructions
Mostly just check the changes in
run_example()
app. If that's fine then I think this is good to in.Once I've got the deployment working I'll update the docs to point to it, waiting until it's working to do that though.
I've prepared a draft yaml file for the deployment GitHub action, expecting I may need to do some trial and error on the master branch once this is merged to get it working, I've never deployed an app returned by a function in this way before (alternative could be to make an app folder within the inst/ directory and then make run_example() call shiny::runApp("inst/showcase_app") (or something to that effect. I'll try to make this way work first, and then if I need to make bigger changes to move code around I'll do it in a new PR.