You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi @gladkia, thanks for posting this issue and for following up with a PR!
As you may have noticed while looking at the source code, $set_inputs() uses rlang::list2(...) to process the input values. This function supports !!!, the splicing operator, so you can construct a list outside of set_inputs() and use it to set the input values.
Thanks for the quick answer. Awesome. Now I see how powerful the solution with rlang::list2(...) is :)!
It would be great to add some info to the vignette and maybe sth in the tests to let the users know that such a great and simple solution is possible :). I mean sth similar to the updated version of the PR.
Thanks @gladkia, I agree it would be helpful to mention this in the documentation and think your updated PR is a good start! Barret will likely review your PR when we pick up work in shinytest2 again (please don't be alarmed if it takes a little while for us to get to it).
Summary
It seems that in the current version of
set_inputs
one has to hard-code the input components.App and evaluation
Please find a simple app with example uses of
set_input
below:Output from
testthat
And here is the output of
testthat::test_file("code_above.R")
The text was updated successfully, but these errors were encountered: