We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6ca747d commit 7096402Copy full SHA for 7096402
tests/testthat/test-facet-axis.R
@@ -5,7 +5,11 @@ test_that("ggplotly does not break discrete x-axis with facet_yyyy in panels > 1
5
facet_wrap(~pan)
6
L <- plotly_build(ggplotly(gp))
7
# tickvals, ticktext and categoryarray have class 'AsIs'
8
- expect_equal(class(L$x$layout$xaxis2$tickvals), "AsIs")
9
- expect_equal(class(L$x$layout$xaxis2$ticktext), "AsIs")
10
- expect_equal(class(L$x$layout$xaxis2$categoryarray), "AsIs")
+ lapply(L$x$layout[c("xaxis", "xaxis2")], function(axis) {
+ expect_s3_class(axis$tickvals, "AsIs")
+ expect_s3_class(axis$ticktext, "AsIs")
11
+ expect_true(axis$ticktext == "A")
12
+ expect_s3_class(axis$categoryarray, "AsIs")
13
+ expect_true(axis$categoryarray == "A")
14
+ })
15
})
0 commit comments