Skip to content

Commit

Permalink
Merge branch 'feature-add-tests' of https://github.com/Sage-Bionetwor…
Browse files Browse the repository at this point in the history
…ks/dcamodules into feature-add-tests
  • Loading branch information
rrchai committed May 14, 2022
2 parents b1cb318 + cc4005a commit 6458c8f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 10 deletions.
10 changes: 4 additions & 6 deletions tests/testthat/test-dca_buttons.R
@@ -1,5 +1,4 @@
test_that("shinyButton works", {

btn <- shinyButton(
"test-id", "test-button",
style = "color: red;"
Expand All @@ -12,21 +11,21 @@ test_that("shinyButton works", {
})

test_that("arrowButton works", {

btn <- arrowButton(
"test-id",
style = "color: red;"
)
expect_identical(btn[[1]]$attribs$id, "test-id")
expect_identical(purrr::map_chr(btn[[1]]$children[[1]][[1]], ~.x$attribs$class),
rep("fa fa-angle-left", 3))
expect_identical(
purrr::map_chr(btn[[1]]$children[[1]][[1]], ~ .x$attribs$class),
rep("fa fa-angle-left", 3)
)
expect_identical(btn[[1]]$attribs$class, "btn btn-default action-button dca-left-btn")
expect_identical(btn[[1]]$attribs$style, "color: red;")
expect_identical(btn[[2]]$stylesheet, "main.min.css")
})

test_that("mediaButton works", {

btn <- mediaButton(
"google",
style = "color: red;"
Expand All @@ -40,7 +39,6 @@ test_that("mediaButton works", {
})

test_that("paletteButton works", {

btn <- paletteButton(
"test-id", "red",
style = "color: red;"
Expand Down
2 changes: 0 additions & 2 deletions tests/testthat/test-dca_waiters.R
Expand Up @@ -5,7 +5,6 @@ test_that("use_dca_waiter works", {
})

test_that("waiter works", {

library(shiny)
library(shinydashboard)
library(dcamodules)
Expand All @@ -21,7 +20,6 @@ test_that("waiter works", {
)

server <- function(input, output, session) {

observeEvent(input$waiter, {
t <- 0
# not certified
Expand Down
2 changes: 0 additions & 2 deletions tests/testthat/test-utils.R
Expand Up @@ -40,5 +40,3 @@ test_that("drop_empty with drop = 'all' works", {
expect_identical(res_null, c("real", NA, " "))
expect_identical(res_blank, c("real", "null", NA))
})


0 comments on commit 6458c8f

Please sign in to comment.