From 321e6eebbfa6baa1302db30a62c94d5f3fca3061 Mon Sep 17 00:00:00 2001 From: Ricardo Rodrigo Basa Date: Fri, 12 Jan 2024 12:35:04 +0800 Subject: [PATCH] update rhino app template unit test (#539) * update rhino app template unit test * update e2etest app files * remove what looks like stylr styling --- .../unit_tests/tests/testthat/test-main.R | 4 ++-- tests/e2e/app-files/hello.R | 18 +++++++++--------- tests/e2e/app-files/main.R | 4 ++-- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/inst/templates/unit_tests/tests/testthat/test-main.R b/inst/templates/unit_tests/tests/testthat/test-main.R index f9d795b7..003ae7e8 100644 --- a/inst/templates/unit_tests/tests/testthat/test-main.R +++ b/inst/templates/unit_tests/tests/testthat/test-main.R @@ -1,9 +1,9 @@ box::use( shiny[testServer], - testthat[...], + testthat[expect_true, test_that], ) box::use( - app/main[...], + app/main[server, ui], ) test_that("main server works", { diff --git a/tests/e2e/app-files/hello.R b/tests/e2e/app-files/hello.R index 58bfbef1..19023488 100644 --- a/tests/e2e/app-files/hello.R +++ b/tests/e2e/app-files/hello.R @@ -1,20 +1,20 @@ box::use( shiny[ - bootstrapPage, - NS, - tags, - textInput, actionButton, - observeEvent, - textOutput, + bootstrapPage, + isolate, moduleServer, + NS, observe, + observeEvent, renderText, - isolate - ] + tags, + textInput, + textOutput + ], ) -box::use(app / logic / say_hello[say_hello]) +box::use(app/logic/say_hello[say_hello]) #' @export ui <- function(id) { diff --git a/tests/e2e/app-files/main.R b/tests/e2e/app-files/main.R index c789ebc0..f18ba6ab 100644 --- a/tests/e2e/app-files/main.R +++ b/tests/e2e/app-files/main.R @@ -1,9 +1,9 @@ box::use( + rhino[log, react_component], shiny, - rhino[log, react_component] ) -box::use(app / view / hello) +box::use(app/view/hello) Box <- react_component("Box") # nolint object_name_linter