Skip to content

Commit 4d83031

Browse files
committed
Merge branch 'master' of github.com:ropensci/plotly
2 parents a3a1941 + f9b623e commit 4d83031

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/testthat/test-plotly-color.R

+2-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ test_that("Custom RColorBrewer pallette works for factor variable", {
2929
l <- expect_traces(p, 3, "scatterplot-color-factor-custom")
3030
markers <- lapply(l$data, "[[", "marker")
3131
colz <- unlist(lapply(markers, "[[", "color"))
32-
expect_identical(sort(colsToCompare[c(1, 5, 9)]), sort(colz))
32+
idx <- if (packageVersion("scales") > '1.0.0') c(1, 2, 3) else c(1, 5, 9)
33+
expect_identical(sort(colsToCompare[idx]), sort(colz))
3334
# providing vector of RGB codes should also work
3435
p <- plot_ly(iris, x = ~Sepal.Length, y = ~Petal.Length, color = ~Species,
3536
colors = cols[1:3])

0 commit comments

Comments
 (0)