-
Notifications
You must be signed in to change notification settings - Fork 625
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes for the development version of ggplot2 (> v3.5.2); migrate to s…
…hinytest2 (#2359) * Use new complete_theme() function to get the complete set of theme elements * Refactor and reuse logic in tests * Fix kaleido install * Accept good snapshot changes * Disable windows oldrel * Close #2357. In some cases, decor has min/max instead of value. In that case, treat max like value * Accept new historgram binning changes * Make sure layout-specific shapes go underneath traces * Accept new snapshots; migrate to shinytest2 * Check-in snapshots
- Loading branch information
Showing
87 changed files
with
167 additions
and
134 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file removed
BIN
-53.4 KB
inst/examples/shiny/event_data/tests/shinytest/mytest-expected/001.png
Binary file not shown.
Binary file removed
BIN
-55 KB
inst/examples/shiny/event_data/tests/shinytest/mytest-expected/002.png
Binary file not shown.
Binary file removed
BIN
-60.8 KB
inst/examples/shiny/event_data/tests/shinytest/mytest-expected/003.png
Binary file not shown.
Binary file removed
BIN
-53.4 KB
inst/examples/shiny/event_data/tests/shinytest/mytest-expected/004.png
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
shinytest2::test_app() |
17 changes: 16 additions & 1 deletion
17
.../tests/shinytest/mytest-expected/001.json → ...tests/testthat/_snaps/shinytest2/001.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+229 KB
inst/examples/shiny/event_data/tests/testthat/_snaps/shinytest2/001_.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+228 KB
inst/examples/shiny/event_data/tests/testthat/_snaps/shinytest2/002_.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+235 KB
inst/examples/shiny/event_data/tests/testthat/_snaps/shinytest2/003_.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+228 KB
inst/examples/shiny/event_data/tests/testthat/_snaps/shinytest2/004_.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions
2
inst/examples/shiny/event_data/tests/testthat/setup-shinytest2.R
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Load application support files into testing environment | ||
shinytest2::load_app_env() |
34 changes: 34 additions & 0 deletions
34
inst/examples/shiny/event_data/tests/testthat/test-shinytest2.R
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
library(shinytest2) | ||
app <- AppDriver$new( | ||
"../../", view = interactive(), | ||
options = list(display.mode = "normal") | ||
) | ||
|
||
test_that("Plotly input values in Shiny", { | ||
app$expect_values() | ||
app$set_inputs(`plotly_hover-A` = "[{\"curveNumber\":0,\"pointNumber\":7,\"x\":24.4,\"y\":3.19,\"customdata\":\"Merc 240D\"}]", allow_no_input_binding_ = TRUE) | ||
app$set_inputs(`plotly_click-A` = "[{\"curveNumber\":0,\"pointNumber\":7,\"x\":24.4,\"y\":3.19,\"customdata\":\"Merc 240D\"}]", allow_no_input_binding_ = TRUE) | ||
app$set_inputs(`plotly_hover-A` = character(0), allow_no_input_binding_ = TRUE) | ||
Sys.sleep(1) | ||
app$expect_values() | ||
app$set_inputs(`plotly_brushing-A` = "{\"x\":[25.726819184123485,25.98332414553473],\"y\":[1.3174499999999998,5.61955]}", allow_no_input_binding_ = TRUE) | ||
app$set_inputs(`plotly_selecting-A` = "[]", allow_no_input_binding_ = TRUE) | ||
app$set_inputs(`plotly_brushing-A` = "{\"x\":[24.64379823594267,25.98332414553473],\"y\":[3.2093373493975905,3.5073743975903615]}", allow_no_input_binding_ = TRUE) | ||
app$set_inputs(`plotly_brushing-A` = "{\"x\":[24.045286659316428,25.98332414553473],\"y\":[3.040881626506024,3.5073743975903615]}", allow_no_input_binding_ = TRUE) | ||
app$set_inputs(`plotly_selecting-A` = "[{\"curveNumber\":0,\"pointNumber\":7,\"x\":24.4,\"y\":3.19,\"customdata\":\"Merc 240D\"}]", allow_no_input_binding_ = TRUE) | ||
app$set_inputs(`plotly_brushing-A` = "{\"x\":[23.95978500551268,25.98332414553473],\"y\":[3.0020072289156627,3.5073743975903615]}", allow_no_input_binding_ = TRUE) | ||
app$set_inputs(`plotly_selected-A` = "[{\"curveNumber\":0,\"pointNumber\":7,\"x\":24.4,\"y\":3.19,\"customdata\":\"Merc 240D\"}]", allow_no_input_binding_ = TRUE) | ||
app$set_inputs(`plotly_brushed-A` = "{\"x\":[23.95978500551268,25.98332414553473],\"y\":[3.0020072289156627,3.5073743975903615]}", allow_no_input_binding_ = TRUE) | ||
app$set_inputs(`plotly_hover-A` = "[{\"curveNumber\":0,\"pointNumber\":7,\"x\":24.4,\"y\":3.19,\"customdata\":\"Merc 240D\"}]", allow_no_input_binding_ = TRUE) | ||
app$set_inputs(`plotly_hover-A` = character(0), allow_no_input_binding_ = TRUE) | ||
app$expect_values() | ||
app$set_inputs(`plotly_selected-A` = character(0), allow_no_input_binding_ = TRUE) | ||
app$set_inputs(`plotly_brushed-A` = character(0), allow_no_input_binding_ = TRUE) | ||
#app$set_inputs(`plotly_selected-A` = character(0), allow_no_input_binding_ = TRUE) | ||
app$set_inputs(`plotly_selecting-A` = character(0), allow_no_input_binding_ = TRUE) | ||
#app$set_inputs(`plotly_brushed-A` = character(0), allow_no_input_binding_ = TRUE) | ||
app$set_inputs(`plotly_brushing-A` = character(0), allow_no_input_binding_ = TRUE) | ||
app$set_inputs(`plotly_click-A` = character(0), allow_no_input_binding_ = TRUE) | ||
app$set_inputs(`plotly_deselect-A` = "\"plot\"", allow_no_input_binding_ = TRUE) | ||
app$expect_values() | ||
}) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.