File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -120,11 +120,13 @@ test_that("geom_sf() handles alpha properly", {
120
120
g <- get_layer_grob(p )[[1 ]]
121
121
122
122
# alpha affects the colour of points and lines
123
- expect_equal(g [[1 ]]$ gp $ col , alpha(red , 0.5 ))
124
- expect_equal(g [[2 ]]$ gp $ col , alpha(red , 0.5 ))
123
+ # geom_sf() will use `gList()` which is not a grob
124
+ # and will be wrapped into a `gTree()`.
125
+ expect_equal(g $ children [[1 ]]$ gp $ col , alpha(red , 0.5 ))
126
+ expect_equal(g $ children [[2 ]]$ gp $ col , alpha(red , 0.5 ))
125
127
# alpha doesn't affect the colour of polygons, but the fill
126
- expect_equal(g [[3 ]]$ gp $ col , alpha(red , 1.0 ))
127
- expect_equal(g [[3 ]]$ gp $ fill , alpha(red , 0.5 ))
128
+ expect_equal(g $ children [[3 ]]$ gp $ col , alpha(red , 1.0 ))
129
+ expect_equal(g $ children [[3 ]]$ gp $ fill , alpha(red , 0.5 ))
128
130
})
129
131
130
132
test_that(" errors are correctly triggered" , {
You can’t perform that action at this time.
0 commit comments