From 8971140c8e5e6002813a3ca6dd2305493c52e29f Mon Sep 17 00:00:00 2001 From: Veerle van Leemput Date: Wed, 20 Mar 2024 17:49:39 +0100 Subject: [PATCH] remove deprecated args and add `f7Toolbar` test --- R/f7-tabs.R | 2 -- R/f7Panel.R | 2 -- tests/testthat/test-f7Toolbar.R | 5 +++++ 3 files changed, 5 insertions(+), 4 deletions(-) create mode 100644 tests/testthat/test-f7Toolbar.R diff --git a/R/f7-tabs.R b/R/f7-tabs.R index d1109fa7..f12ca1a1 100644 --- a/R/f7-tabs.R +++ b/R/f7-tabs.R @@ -260,8 +260,6 @@ f7Tabs <- function(..., .items = NULL, id = NULL, swipeable = FALSE, animated = } else if (style == "toolbar") { f7Toolbar( position = "bottom", - hairline = TRUE, - shadow = TRUE, icons = TRUE, scrollable = FALSE, tabItems, diff --git a/R/f7Panel.R b/R/f7Panel.R index 2961c04c..89f98843 100644 --- a/R/f7Panel.R +++ b/R/f7Panel.R @@ -39,8 +39,6 @@ #' toolbar = f7Toolbar( #' position = "bottom", #' icons = TRUE, -#' hairline = FALSE, -#' shadow = FALSE, #' f7Link(label = "Link 1", href = "https://www.google.com"), #' f7Link(label = "Link 2", href = "https://www.google.com") #' ), diff --git a/tests/testthat/test-f7Toolbar.R b/tests/testthat/test-f7Toolbar.R new file mode 100644 index 00000000..f1aaa717 --- /dev/null +++ b/tests/testthat/test-f7Toolbar.R @@ -0,0 +1,5 @@ +test_that("toolbar works", { + expect_s3_class(f7Toolbar(position = "top"), "shiny.tag") + expect_identical(f7Toolbar(position = "top")$attribs$class, "toolbar toolbar-top") + expect_identical(f7Toolbar(icons = TRUE, position = "top")$attribs$class, "toolbar tabbar tabbar-icons toolbar-top") +})