Skip to content

Commit b25624d

Browse files
committed
Try sleeping in shinytest test for relayout size stability
1 parent bfa1053 commit b25624d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

inst/examples/shiny/event_data/tests/testthat/test-shinytest2.R

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ test_that("Plotly input values in Shiny", {
2121
app$set_inputs(`plotly_brushed-A` = "{\"x\":[23.95978500551268,25.98332414553473],\"y\":[3.0020072289156627,3.5073743975903615]}", allow_no_input_binding_ = TRUE)
2222
app$set_inputs(`plotly_hover-A` = "[{\"curveNumber\":0,\"pointNumber\":7,\"x\":24.4,\"y\":3.19,\"customdata\":\"Merc 240D\"}]", allow_no_input_binding_ = TRUE)
2323
app$set_inputs(`plotly_hover-A` = character(0), allow_no_input_binding_ = TRUE)
24+
Sys.sleep(1)
2425
app$expect_values()
2526
app$set_inputs(`plotly_selected-A` = character(0), allow_no_input_binding_ = TRUE)
2627
app$set_inputs(`plotly_brushed-A` = character(0), allow_no_input_binding_ = TRUE)
@@ -30,5 +31,6 @@ test_that("Plotly input values in Shiny", {
3031
app$set_inputs(`plotly_brushing-A` = character(0), allow_no_input_binding_ = TRUE)
3132
app$set_inputs(`plotly_click-A` = character(0), allow_no_input_binding_ = TRUE)
3233
app$set_inputs(`plotly_deselect-A` = "\"plot\"", allow_no_input_binding_ = TRUE)
34+
Sys.sleep(1)
3335
app$expect_values()
3436
})

0 commit comments

Comments
 (0)