Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

wip #1961

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 20 commits into from
Closed

wip #1961

Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
use a similar skipping strategy for shinytest
  • Loading branch information
cpsievert committed Jun 17, 2021
commit 4a1ee0739603b0b3ea8a98a2a327bd734677cd6b
5 changes: 3 additions & 2 deletions 5 .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ jobs:
- {os: windows-latest, r: 'release'}
- {os: windows-latest, r: '3.6', rspm: "https://packagemanager.rstudio.com/cran/latest"}
- {os: ubuntu-18.04, r: 'devel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest", http-user-agent: "R/4.1.0 (ubuntu-18.04) R (4.1.0 x86_64-pc-linux-gnu x86_64 linux-gnu) on GitHub Actions" }
# visual tests are only run on linux r-release since the svg generator (orca) isn't cross-platform
- {os: ubuntu-18.04, r: 'release', vdiffr: true, rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest"}
# vdiffr & shinytest only runs on linux r-release since the results aren't cross-platform
- {os: ubuntu-18.04, r: 'release', vdiffr: true, shinytest: true, rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest"}
- {os: ubuntu-18.04, r: 'oldrel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest"}
- {os: ubuntu-18.04, r: '3.6', rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest"}
- {os: ubuntu-18.04, r: '3.5', rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest"}
Expand All @@ -40,6 +40,7 @@ jobs:
env:
RSPM: ${{ matrix.config.rspm }}
VDIFFR: ${{ matrix.config.vdiffr }}
SHINYTEST: ${{ matrix.config.shinytest }}
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

steps:
Expand Down
8 changes: 8 additions & 0 deletions 8 tests/testthat/helper-skip.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,11 @@ skip_cloud_tests <- function() {
skip("Cloud testing is only run on Windows with the current release of R")
}
}

skip_shinytest_tests <- function() {
skip_on_cran()
skip_if_not_installed("shinytest")
if (!as.logical(Sys.getenv("SHINYTEST", FALSE))) {
skip("shinytest testing requires the SHINYTEST environment variable to be true")
}
}
3 changes: 0 additions & 3 deletions 3 tests/testthat/helper-vdiffr.R
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,6 @@ if (enable_vdiffr) {
writeLines(svg_txt, file)
}

# force the vdiffr shiny app to open in a real browser
# (some svg files seem to not render properly in RStudio)
options(shiny.launch.browser = interactive())
}

expect_doppelganger <- function(p, name, ...) {
Expand Down
9 changes: 2 additions & 7 deletions 9 tests/testthat/test-plotly-shiny.R
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,8 @@ test_that("event_unregister() de-registers an event", {
})

test_that("event_data shiny app works", {
skip_on_cran()
skip_if_not_installed("shinytest")
if (enable_vdiffr) skip("shiny testing not performed during visual testing")
skip_shinytest_tests()

# Use compareImages=FALSE because the expected image screenshots were created
# on a Mac, and they will differ from screenshots taken on the CI platform,
# which runs on Linux.
appdir <- system.file(package = "plotly", "examples", "shiny", "event_data")
shinytest::expect_pass(shinytest::testApp(appdir, compareImages = FALSE))
shinytest::expect_pass(shinytest::testApp(appdir))
})
Morty Proxy This is a proxified and sanitized view of the page, visit original site.