ggplot2 is removing the labels component we are testing against. https://github.com/tidyverse/ggplot2/issues/6290 Solution could be to use the new `get_labs()` https://github.com/tidyverse/ggplot2/pull/6078 eg ```r p <- ggplot(mpg, aes(displ, hwy)) + geom_point(aes(colour = drv, shape = drv)) get_labs(p) ```