# WARNING - Generated by {fusen} from /dev/flat_figma_ggplot_correspondance.Rmd: do not edit by hand
test_that("extract_ggplot_theme works", {
data(toy_raw_file_content)
result <- toy_raw_file_content %>%
extract_ggplot_theme()
# long dput ----
expect_equal(object = result,
expected = structure(list(element_name = c("panel_background", "legend_text",
"legend_title", "panel_grid", "axis_text", "axis_title", "plot_subtitle",
"plot_title"), element_type = c("rect", "text", "text", "line",
"text", "text", "text", "text"), letter_spacing = c(NA, 0.36,
0.44, NA, 0, 0.44, 0.48, 0.8), lineheight = c(NA, 10.546875,
12.890625, NA, 10.546875, 12.890625, 14.0625, 23.4375), family = c(NA,
"Roboto", "Roboto", NA, "Roboto", "Roboto", "Roboto-Light", "Roboto-Light"
), size = c(5, 9, 11, 1, 9, 11, 12, 20), hjust = c(NA, 1, 1,
NA, 1, 1, 1, 0), color = c("#000000FF", "#000000FF", "#000000FF",
NA, "#B0B0B0FF", "#000000FF", "#000000FF", "#FDA6E3FF"), fill = c("#5FBDDEFF",
NA, NA, NA, NA, NA, NA, NA), linetype = c("dashed", NA, NA, "solid",
NA, NA, NA, NA)), row.names = c(NA, -8L), class = c("tbl_df",
"tbl", "data.frame")))
# end of long dput ----
expect_error(object = toy_raw_file_content %>%
extract_ggplot_theme(),
regexp = NA)
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.