@@ -20,19 +20,19 @@ test_that("Can expand limits", {
20
20
p <- plot_ly(mtcars , x = ~ wt , y = ~ cyl , color = ~ cyl )
21
21
p <- colorbar(p , limits = c(0 , 20 ))
22
22
l <- expect_traces(p , 2 , " colorbar-expand" )
23
- expect_equivalent (l $ data [[1 ]]$ marker $ cmin , 0 )
24
- expect_equivalent (l $ data [[2 ]]$ marker $ cmin , 0 )
25
- expect_equivalent (l $ data [[1 ]]$ marker $ cmax , 20 )
26
- expect_equivalent (l $ data [[2 ]]$ marker $ cmax , 20 )
23
+ expect_true (l $ data [[1 ]]$ marker $ cmin == 0 )
24
+ expect_true (l $ data [[2 ]]$ marker $ cmin == 0 )
25
+ expect_true (l $ data [[1 ]]$ marker $ cmax == 20 )
26
+ expect_true (l $ data [[2 ]]$ marker $ cmax == 20 )
27
27
})
28
28
29
29
test_that(" Can restrict limits" , {
30
30
p <- plot_ly(mtcars , x = ~ wt , y = ~ cyl , color = ~ cyl )
31
31
p <- colorbar(p , limits = c(5 , 7 ))
32
32
l <- expect_traces(p , 2 , " colorbar-restrict" )
33
33
expect_equivalent(unique(l $ data [[1 ]]$ marker $ color ), c(6 , NA ))
34
- expect_equivalent (l $ data [[2 ]]$ marker $ cmin , 5 )
35
- expect_equivalent (l $ data [[2 ]]$ marker $ cmax , 7 )
34
+ expect_true (l $ data [[2 ]]$ marker $ cmin == 5 )
35
+ expect_true (l $ data [[2 ]]$ marker $ cmax == 7 )
36
36
})
37
37
38
38
test_that(" Can expand z limits" , {
0 commit comments