Skip to content

Commit 4180b88

Browse files
committed
fix tests
1 parent 1d9f795 commit 4180b88

File tree

7 files changed

+7
-416
lines changed

7 files changed

+7
-416
lines changed

tests/testthat/helper-functions.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ expect_color <- function(computed, expected){
192192
}
193193
if(grepl("rgb", computed[1])){
194194
## On firefox, grey50 is "rgb(127, 127, 127)"
195-
computed.vec <- gsub("[rgb() ]", "", computed)
195+
computed.vec <- gsub("[ )]", "", sub("rgb[(]", "", computed))
196196
expected.mat <- col2rgb(expected)
197197
expected.vec <- apply(expected.mat, 2, paste, collapse=",")
198198
}else{

tests/testthat/test-renderer1-geom-text-color.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ test_that("geom_text color rendered as fill style", {
1717
expect_identical(opacity, c("1","1","1","1"))
1818
})
1919

20-
clickID("plot_text_y_variable_foo_svg")#or foo_label?
20+
clickID("plot_text_y_variable_foo_label")#not _svg.
2121
after.html <- getHTML()
2222
test_that("geom_text color rendered as fill style", {
2323
fill <- getStyleValue(after.html, '//text[@class="geom"]', "fill")

tests/testthat/test-renderer2-colour.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ test_that("default clicking line only changes opacity", {
3535
"opacity")
3636
opacity.tab <- sort(table(opacity.str))
3737
expect_equal(as.numeric(opacity.tab), c(1, 4))
38-
expect_equal(names(opacity.tab), c("0.5","1"))
38+
expect_equal(names(opacity.tab), c("1","0.5"))
3939
stroke.str <- getStyleValue(
4040
info$html,
4141
'//svg[@id="plot_default"]//path[@class="geom"]',
@@ -50,7 +50,7 @@ test_that("setting colour_off makes stroke and opacity change", {
5050
"opacity")
5151
opacity.tab <- sort(table(opacity.str))
5252
expect_equal(as.numeric(opacity.tab), c(1, 4))
53-
expect_equal(names(opacity.tab), c("0.5","1"))
53+
expect_equal(names(opacity.tab), c("1","0.5"))
5454
stroke.str <- getStyleValue(
5555
info$html,
5656
'//svg[@id="plot_coff"]//path[@class="geom"]',

tests/testthat/test-renderer2-fill.R

Lines changed: 0 additions & 144 deletions
This file was deleted.

0 commit comments

Comments
 (0)