Skip to content

Commit

Permalink
Merge pull request #45 from Appsilon/fix-shinytest2-setup
Browse files Browse the repository at this point in the history
chore: Resolve CRAN comments.
  • Loading branch information
jakubnowicki authored Aug 10, 2023
2 parents df79a28 + 0363a83 commit 0ff0df6
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 5 deletions.
2 changes: 0 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ Suggests:
spelling,
testthat (>= 3.0.0),
withr
VignetteBuilder:
knitr
Config/testthat/edition: 3
Encoding: UTF-8
Roxygen: list(markdown = TRUE)
Expand Down
1 change: 0 additions & 1 deletion tests/testthat.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,5 @@
library(testthat)
library(shiny.emptystate)
library(shinytest2)
use_shinytest2()

test_check("shiny.emptystate")
2 changes: 0 additions & 2 deletions tests/testthat/setup-shinytest2.R

This file was deleted.

3 changes: 3 additions & 0 deletions tests/testthat/test-empty_state.R
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ describe("EmptyStateManager", {
})

it("checks the empty state component is visible when triggered", {
skip_on_cran()
expected_div <-
"<div class=\"empty-state-content\"><div class=\"myDiv\"></div></div>"
app <- shinytest2::AppDriver$new(test_app(), name = "test")
Expand All @@ -44,12 +45,14 @@ describe("EmptyStateManager", {
})

it("checks the empty state component is hidden when not triggered", {
skip_on_cran()
app <- shinytest2::AppDriver$new(test_app(), name = "test")
expect_null(app$get_html(selector = ".empty-state-content"))
app$stop()
})

it("checks the empty state component is hidden when triggered", {
skip_on_cran()
app <- shinytest2::AppDriver$new(test_app(), name = "test")
app$click("show")
app$click("hide")
Expand Down

0 comments on commit 0ff0df6

Please sign in to comment.