Skip to content

Commit

Permalink
Fixed failed pipeline (#258)
Browse files Browse the repository at this point in the history
Fixes #257
  • Loading branch information
donyunardi authored Aug 27, 2024
1 parent cc8faa9 commit c452ad0
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 2 deletions.
3 changes: 2 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ Suggests:
testthat (>= 3.1.5),
withr (>= 2.1.0)
VignetteBuilder:
knitr
knitr,
rmarkdown
Config/Needs/verdepcheck: rstudio/bslib, mllg/checkmate,
tidyverse/ggplot2, rstudio/htmltools, r-lib/lifecycle,
insightsengineering/rtables, rstudio/shiny, daattali/shinyjs,
Expand Down
2 changes: 1 addition & 1 deletion R/get_dt_rows.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#'
#' @return (`shiny::tagList`) A `shiny tagList`.
#'
#' @examples
#' @examplesIf require("DT")
#' library(shiny)
#' library(DT)
#'
Expand Down
2 changes: 2 additions & 0 deletions man/get_dt_rows.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions tests/testthat/test-plot_with_settings.R
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,8 @@ testthat::test_that("type_download_srv download all types of files and change th
})

testthat::test_that("type_download_srv downloads a png file with different dimensions", {
testthat::skip_if_not_installed("png")

shiny::testServer(
teal.widgets:::type_download_srv,
args = download_srv_args,
Expand All @@ -248,6 +250,8 @@ testthat::test_that("type_download_srv downloads a png file with different dimen
})

testthat::test_that("type_download_srv downloads a png file using default dimensions input dimensions are NULL", {
testthat::skip_if_not_installed("png")

shiny::testServer(
teal.widgets:::type_download_srv,
args = list(
Expand Down Expand Up @@ -309,6 +313,8 @@ plot_with_settings_args <- list(
)

testthat::test_that("plot_with_settings_srv set dimensions and download a png file - base", {
testthat::skip_if_not_installed("png")

plot_with_settings_args$plot_r <- function() plot(1)
shiny::testServer(
teal.widgets:::plot_with_settings_srv,
Expand All @@ -331,6 +337,8 @@ testthat::test_that("plot_with_settings_srv set dimensions and download a png fi
})

testthat::test_that("plot_with_settings_srv set dimensions and download a png file - ggplot2", {
testthat::skip_if_not_installed("png")

plot_with_settings_args$plot_r <- function() {
ggplot2::ggplot(mtcars, ggplot2::aes(mpg, wt)) +
ggplot2::geom_line()
Expand All @@ -356,6 +364,8 @@ testthat::test_that("plot_with_settings_srv set dimensions and download a png fi
})

testthat::test_that("plot_with_settings_srv set dimensions and download a png file - grob", {
testthat::skip_if_not_installed("png")

plot_with_settings_args$plot_r <- function() {
ggplot2::ggplotGrob(
ggplot2::ggplot(mtcars, ggplot2::aes(mpg, wt)) +
Expand Down Expand Up @@ -383,6 +393,8 @@ testthat::test_that("plot_with_settings_srv set dimensions and download a png fi
})

testthat::test_that("plot_with_settings_srv set dimensions and download a png file - trellis", {
testthat::skip_if_not_installed("png")

plot_with_settings_args$plot_r <- function() {
lattice::densityplot(1)
}
Expand All @@ -407,6 +419,8 @@ testthat::test_that("plot_with_settings_srv set dimensions and download a png fi
})

testthat::test_that("plot_with_settings_srv set dimensions and download a png file - WRONG type", {
testthat::skip_if_not_installed("png")

plot_with_settings_args$plot_r <- function() 2

shiny::testServer(
Expand Down Expand Up @@ -442,6 +456,8 @@ testthat::test_that("plot_with_settings_srv expand no error", {
})

testthat::test_that("plot_with_settings_srv set dimensions and download a png file from modal", {
testthat::skip_if_not_installed("png")

plot_with_settings_args[["plot_r"]] <- function() plot(1)
shiny::testServer(
teal.widgets:::plot_with_settings_srv,
Expand Down

0 comments on commit c452ad0

Please sign in to comment.