Skip to content

Commit 661ba99

Browse files
committed
update snapshot tests
1 parent a43b296 commit 661ba99

8 files changed

+498
-309
lines changed

tests/testthat/Rplots.pdf

0 Bytes
Binary file not shown.

tests/testthat/_snaps/ggstackplot/hstack-w-axis-defs-and-labs-in-template.svg

Lines changed: 74 additions & 69 deletions
Loading

tests/testthat/_snaps/ggstackplot/hstack-w-axis-defs-in-template.svg

Lines changed: 74 additions & 69 deletions
Loading

tests/testthat/_snaps/ggstackplot/plot-with-custom-template.svg

Lines changed: 3 additions & 3 deletions
Loading

tests/testthat/_snaps/ggstackplot/plot-with-template-sec-axis-labs.svg

Lines changed: 163 additions & 0 deletions
Loading

tests/testthat/_snaps/ggstackplot/vstack-w-axis-defs-and-labs-in-template.svg

Lines changed: 85 additions & 80 deletions
Loading

tests/testthat/_snaps/ggstackplot/vstack-w-axis-defs-in-template.svg

Lines changed: 85 additions & 80 deletions
Loading

tests/testthat/test-ggstackplot.R

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,12 @@ test_that("test ggstackplot() functionality", {
160160
vdiffr::expect_doppelganger(
161161
"plot with custom template",
162162
ggstackplot(mtcars, x = mpg, y = c(qsec, drat),
163+
template = ggplot() + geom_line())
164+
)
165+
vdiffr::expect_doppelganger(
166+
"plot with template sec axis labs",
167+
ggstackplot(mtcars, x = mpg, y = c(qsec, drat),
168+
alternate_axes = FALSE, both_axes = TRUE,
163169
template = ggplot() + geom_line() + labs(x = "x", y = "y"))
164170
)
165171
vdiffr::expect_doppelganger(
@@ -168,8 +174,8 @@ test_that("test ggstackplot() functionality", {
168174
mtcars, x = mpg, y = c(qsec, drat),
169175
template =
170176
ggplot() + geom_line() +
171-
scale_x_continuous(limits = c(0, 100)) +
172-
scale_y_continuous(limits = c(0, 100))
177+
scale_x_continuous() +
178+
scale_y_continuous()
173179
)
174180
)
175181
vdiffr::expect_doppelganger(
@@ -178,8 +184,8 @@ test_that("test ggstackplot() functionality", {
178184
mtcars, x = mpg, y = c(qsec, drat),
179185
template =
180186
ggplot() + geom_line() +
181-
scale_x_continuous(limits = c(0, 100)) +
182-
scale_y_continuous(limits = c(0, 100)) +
187+
scale_x_continuous() +
188+
scale_y_continuous() +
183189
labs(x = "x", y = "y")
184190
)
185191
)
@@ -189,8 +195,8 @@ test_that("test ggstackplot() functionality", {
189195
mtcars, y = mpg, x = c(qsec, drat),
190196
template =
191197
ggplot() + geom_line() +
192-
scale_x_continuous(limits = c(0, 100)) +
193-
scale_y_continuous(limits = c(0, 100))
198+
scale_x_continuous() +
199+
scale_y_continuous()
194200
)
195201
)
196202
vdiffr::expect_doppelganger(
@@ -199,8 +205,8 @@ test_that("test ggstackplot() functionality", {
199205
mtcars, y = mpg, x = c(qsec, drat),
200206
template =
201207
ggplot() + geom_line() +
202-
scale_x_continuous(limits = c(0, 100)) +
203-
scale_y_continuous(limits = c(0, 100)) +
208+
scale_x_continuous() +
209+
scale_y_continuous() +
204210
labs(x = "x", y = "y")
205211
)
206212
)

0 commit comments

Comments
 (0)