Skip to content

Commit

Permalink
Updates for rstudio/shiny#3998 (#264)
Browse files Browse the repository at this point in the history
* Updates for rstudio/shiny#3998

* Just use legacy for both

* Set the option in the app itself
  • Loading branch information
cpsievert authored Mar 20, 2024
1 parent 37ef56f commit 346d56f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
9 changes: 8 additions & 1 deletion inst/apps/122-async-outputs/tests/testthat/test-mytest.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
library(shinytest2)

test_that("Migrated shinytest test: mytest.R", {
app <- AppDriver$new(load_timeout = 15000, seed = 100, shiny_args = list(display.mode = "normal"))
app <- AppDriver$new(
load_timeout = 15000, seed = 100,
shiny_args = list(display.mode = "normal"),
# Use legacy datatable implementation just for the
# info$datatable$colnames test below. We could, of course,
# update that test, but it's also good to test the legacy.
options = list(shiny.legacy.datatable = TRUE)
)

# Wait until an async value is available
app$wait_for_value(output = "printa", timeout = 10 * 1000)
Expand Down
3 changes: 3 additions & 0 deletions inst/apps/126-async-ticks/app.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ library(promises)
library(future)
plan(multisession)

opts <- options(shiny.legacy.datatable = TRUE)
onStop(function() options(opts))

testForMissingRenderFunctions <- function() {
# If we add any render functions, they should be added to this test app. This test
# will make it obvious if we forget.
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 346d56f

Please sign in to comment.