shiny
shiny copied to clipboard
shinyAppTemplate results in an error, likely from non namespaced `HTML()` call
Using latest shiny v1.8.1.1, calling shinyAppTemplate() results in an error:
> shiny::shinyAppTemplate("foo")
Select which of the following to add at foo/ :
1: All
2: app.R : Main application file
3: R/example.R : Helper file with R code
4: R/example-module.R : Example module
5: tests/testthat/ : Tests using {testthat} and {shinytest2}
Enter one or more numbers (with spaces), or an empty line to exit:
1
Creating foo/
Creating foo/app.R
Creating foo/R/
Creating foo/R/example.R
Creating foo/R/example-module.R
Creating foo/tests/
Creating foo/tests/testthat/
Creating foo/tests/testthat.R
Creating foo/tests/testthat/setup-shinytest2.R
Creating foo/tests/testthat/test-examplemodule.R
Creating foo/tests/testthat/test-server.R
Creating foo/tests/testthat/test-shinytest2.R
Error in HTML("\n\n\ntest_that(\"Module values are consistent\", {\n app <- AppDriver$new(name = \"mod\")\n app$click(\"examplemodule1-button\")\n app$click(\"examplemodule1-button\")\n app$expect_values()\n})") :
could not find function "HTML"
This is likely because this line does not namespace HTML() https://github.com/rstudio/shiny/blob/306c4f847be42aa7dcb54304891efd69f6933747/inst/app_template/tests/testthat/test-shinytest2.R#L8