Skip to content

Commit 6784580

Browse files
committed
update test expectations
1 parent c949e42 commit 6784580

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

tests/testthat/test-cookbook-axes.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ no.x.title <- bp +
106106

107107
test_that("coord_fixed(ratio)", {
108108
info <- expect_traces(no.x.title, 1, "no-x-title")
109-
expect_identical(info$layout$xaxis$title, "")
109+
expect_identical(info$layout$xaxis$title$text, "")
110110
})
111111

112112
# Also possible to set the axis label with the scale
@@ -133,8 +133,8 @@ bp.fonts <- bp +
133133
test_that("element_text face, colour, size, angle, vjust, size", {
134134
info <- expect_traces(bp.fonts, 1, "fonts")
135135
expect_equivalent(info$layout$xaxis$tickangle, -90)
136-
expect_match(info$layout$xaxis$title, "<b>", fixed = TRUE)
137-
expect_match(info$layout$xaxis$title, "</b>", fixed = TRUE)
136+
expect_match(info$layout$xaxis$title$text, "<b>", fixed = TRUE)
137+
expect_match(info$layout$xaxis$title$text, "</b>", fixed = TRUE)
138138
})
139139

140140
# Label formatters

tests/testthat/test-ggplot-labels.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ test_that("ylab is translated correctly", {
1313
geom_point(aes(Petal.Width, Sepal.Width)) +
1414
ylab("sepal width")
1515
info <- expect_doppelganger_built(ggiris, "labels-ylab")
16-
labs <- c(info$layout$xaxis$title, info$layout$yaxis$title)
16+
labs <- c(info$layout$xaxis$title$text, info$layout$yaxis$title$text)
1717
expect_identical(labs, c("Petal.Width", "sepal width"))
1818
})
1919

tests/testthat/test-ggplot-point.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,6 @@ test_that("can flip axes", {
6767
coord_flip()
6868

6969
info <- expect_doppelganger_built(p, "point-flip")
70-
expect_equivalent(info$layout$xaxis$title, "price")
71-
expect_equivalent(info$layout$yaxis$title, "carat")
70+
expect_equivalent(info$layout$xaxis$title$text, "price")
71+
expect_equivalent(info$layout$yaxis$title$text, "carat")
7272
})

0 commit comments

Comments
 (0)