Skip to content

Commit

Permalink
Update test-tab_options.R
Browse files Browse the repository at this point in the history
  • Loading branch information
rich-iannone committed Jun 11, 2021
1 parent fcf061a commit be68e4e
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions tests/testthat/test-tab_options.R
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,15 @@ test_that("the internal `opts_df` table can be correctly modified", {
# ) %>%
# expect_equal(c("normal", "bolder"))

# Modify the `heading.padding`
tbl_html <- data %>% tab_options(heading.padding = px(10))

# Compare before and after values
c(dt_options_get_value(data = data, option = "heading_padding"),
dt_options_get_value(data = tbl_html, option = "heading_padding")
) %>%
expect_equal(c("4px", "10px"))

# Modify the `heading.border.bottom.style`
tbl_html <- data %>% tab_options(heading.border.bottom.style = "dashed")

Expand Down Expand Up @@ -439,6 +448,15 @@ test_that("the internal `opts_df` table can be correctly modified", {
) %>%
expect_equal(c("inherit", "uppercase"))

# Modify the `column_labels.padding`
tbl_html <- data %>% tab_options(column_labels.padding = px(10))

# Compare before and after values
c(dt_options_get_value(data = data, option = "column_labels_padding"),
dt_options_get_value(data = tbl_html, option = "column_labels_padding")
) %>%
expect_equal(c("5px", "10px"))

# Modify the `column_labels.border.top.style`
tbl_html <- data %>% tab_options(column_labels.border.top.style = "dashed")

Expand Down

0 comments on commit be68e4e

Please sign in to comment.