Skip to content

Commit

Permalink
fix tests 2 ...
Browse files Browse the repository at this point in the history
  • Loading branch information
DivadNojnarg committed May 6, 2024
1 parent 937c548 commit 6975d03
Show file tree
Hide file tree
Showing 37 changed files with 83 additions and 1 deletion.
13 changes: 13 additions & 0 deletions tests/testthat/_snaps/deprecated.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,19 @@
Output
<div class="menu-dropdown-divider"></div>

---

Code
session <- as.environment(list(ns = identity, sendInputMessage = function(
inputId, message) {
session$lastInputMessage <- list(inputId = inputId, message = message)
}))
updateF7MenuDropdown("id", session)
Condition
Warning:
`updateF7MenuDropdown()` was deprecated in shinyMobile 2.0.0.
i updateF7MenuDropdown has been removed from Framework7 and there is no replacement in shinyMobile.

---

Code
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-deprecated.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ test_that("deprecated messages work", {
expect_snapshot(f7MenuDropdown(label = "label"))
expect_snapshot(f7MenuDropdownDivider())

expect_error({
expect_snapshot({
session <- as.environment(list(
ns = identity,
sendInputMessage = function(inputId, message) {
Expand Down
2 changes: 2 additions & 0 deletions tests/testthat/test-f7ActionSheet.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
library(shinytest2)

test_that("send custom message", {
session <- as.environment(list(
ns = identity,
Expand Down
2 changes: 2 additions & 0 deletions tests/testthat/test-f7AutoComplete.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
library(shinytest2)

test_that("autocomplete works", {
# Don't run these tests on the CRAN build servers
skip_on_cran()
Expand Down
2 changes: 2 additions & 0 deletions tests/testthat/test-f7Button.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
library(shinytest2)

test_that("button works as expected", {
# Don't run these tests on the CRAN build servers
skip_on_cran()
Expand Down
2 changes: 2 additions & 0 deletions tests/testthat/test-f7Card.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
library(shinytest2)

test_that("card works", {
expect_s3_class(f7Card(), "shiny.tag")
expect_identical(f7Card()$attribs$class, "card")
Expand Down
2 changes: 2 additions & 0 deletions tests/testthat/test-f7Checkbox.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
library(shinytest2)

test_that("checkbox tag", {
checkbox <- f7Checkbox("check", "Checkbox")
expect_s3_class(checkbox, "shiny.tag.list")
Expand Down
2 changes: 2 additions & 0 deletions tests/testthat/test-f7ColorPicker.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
library(shinytest2)

test_that("color picker works", {
skip_on_cran()
shiny_app_path <-
Expand Down
2 changes: 2 additions & 0 deletions tests/testthat/test-f7DatePicker.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
library(shinytest2)

test_that("date picker works", {
skip_on_cran()
shiny_app_path <-
Expand Down
2 changes: 2 additions & 0 deletions tests/testthat/test-f7Fabs.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
library(shinytest2)

test_that("fabs works as expected", {
# Don't run these tests on the CRAN build servers
skip_on_cran()
Expand Down
2 changes: 2 additions & 0 deletions tests/testthat/test-f7Form.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
library(shinytest2)

test_that("form works", {
skip_on_cran()
shiny_app_path <-
Expand Down
2 changes: 2 additions & 0 deletions tests/testthat/test-f7Gauge.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
library(shinytest2)

test_that("gauge tags works", {
gauge <- f7Gauge(id = "test", value = 10)
expect_s3_class(gauge, "shiny.tag")
Expand Down
2 changes: 2 additions & 0 deletions tests/testthat/test-f7Login.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
library(shinytest2)

test_that("login works", {
skip_on_cran()
shiny_app_path <-
Expand Down
2 changes: 2 additions & 0 deletions tests/testthat/test-f7Message.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
library(shinytest2)

test_that("messages work as expected", {
# Don't run these tests on the CRAN build servers
skip_on_cran()
Expand Down
2 changes: 2 additions & 0 deletions tests/testthat/test-f7Navbar.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
library(shinytest2)

test_that("navbar works", {
expect_s3_class(f7Navbar(), "shiny.tag")
expect_identical(f7Navbar()$attribs$class, "navbar")
Expand Down
2 changes: 2 additions & 0 deletions tests/testthat/test-f7Panel.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
library(shinytest2)

test_that("panel works", {
skip_on_cran()
shiny_app_path <-
Expand Down
2 changes: 2 additions & 0 deletions tests/testthat/test-f7PhotoBrowser.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
library(shinytest2)

test_that("photobrowser works", {
skip_on_cran()
shiny_app_path <-
Expand Down
2 changes: 2 additions & 0 deletions tests/testthat/test-f7Picker.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
library(shinytest2)

test_that("picker works", {
skip_on_cran()
shiny_app_path <-
Expand Down
2 changes: 2 additions & 0 deletions tests/testthat/test-f7Popover.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
library(shinytest2)

test_that("popover works", {
skip_on_cran()
shiny_app_path <-
Expand Down
2 changes: 2 additions & 0 deletions tests/testthat/test-f7Popup.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
library(shinytest2)

test_that("popup works", {
skip_on_cran()
shiny_app_path <-
Expand Down
2 changes: 2 additions & 0 deletions tests/testthat/test-f7Progress.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
library(shinytest2)

test_that("progress works", {
skip_on_cran()
shiny_app_path <-
Expand Down
2 changes: 2 additions & 0 deletions tests/testthat/test-f7Radio.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
library(shinytest2)

test_that("radio works as expected", {
# Don't run these tests on the CRAN build servers
skip_on_cran()
Expand Down
2 changes: 2 additions & 0 deletions tests/testthat/test-f7Searchbar.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
library(shinytest2)

test_that("searchbar tag works", {
searchbar <- f7Searchbar(
id = "test",
Expand Down
2 changes: 2 additions & 0 deletions tests/testthat/test-f7Select.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
library(shinytest2)

test_that("select works", {
skip_on_cran()
shiny_app_path <-
Expand Down
2 changes: 2 additions & 0 deletions tests/testthat/test-f7Sheet.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
library(shinytest2)

test_that("sheet works", {
skip_on_cran()
shiny_app_path <-
Expand Down
2 changes: 2 additions & 0 deletions tests/testthat/test-f7Slider.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
library(shinytest2)

test_that("slider works", {
skip_on_cran()
shiny_app_path <-
Expand Down
2 changes: 2 additions & 0 deletions tests/testthat/test-f7SmartSelect.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
library(shinytest2)

test_that("smartselect works", {
skip_on_cran()
shiny_app_path <-
Expand Down
2 changes: 2 additions & 0 deletions tests/testthat/test-f7SplitLayout.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
library(shinytest2)

test_that("Split layout works as expected", {
# Don't run these tests on the CRAN build servers
skip_on_cran()
Expand Down
2 changes: 2 additions & 0 deletions tests/testthat/test-f7Stepper.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
library(shinytest2)

test_that("stepper works", {
skip_on_cran()
shiny_app_path <-
Expand Down
2 changes: 2 additions & 0 deletions tests/testthat/test-f7Swiper.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
library(shinytest2)

test_that("swiper slide works", {
slide <- f7Slide()
expect_s3_class(slide, "shiny.tag")
Expand Down
2 changes: 2 additions & 0 deletions tests/testthat/test-f7Table.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
library(shinytest2)

test_that("table works", {
expect_true(inherits(f7Table(mtcars), "shiny.tag"))

Expand Down
2 changes: 2 additions & 0 deletions tests/testthat/test-f7Tabs.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
library(shinytest2)

test_that("tabs works", {
skip_on_cran()
shiny_app_path <-
Expand Down
1 change: 1 addition & 0 deletions tests/testthat/test-f7Text.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
library(htmltools)
library(shinytest2)

test_that("f7Text tag works", {
text_input <- f7Text("ee", "label", value = "text")
Expand Down
2 changes: 2 additions & 0 deletions tests/testthat/test-f7Toggle.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
library(shinytest2)

test_that("toggle works", {
skip_on_cran()
shiny_app_path <-
Expand Down
2 changes: 2 additions & 0 deletions tests/testthat/test-f7Tooltip.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
library(shinytest2)

test_that("tooltips work as expected", {
# Don't run these tests on the CRAN build servers
skip_on_cran()
Expand Down
2 changes: 2 additions & 0 deletions tests/testthat/test-f7Treeview.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
library(shinytest2)

test_that("Treeview works as expected", {
# Don't run these tests on the CRAN build servers
skip_on_cran()
Expand Down
2 changes: 2 additions & 0 deletions tests/testthat/test-f7VirtualList.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
library(shinytest2)

test_that("virtualList works as expected", {
# Don't run these tests on the CRAN build servers
skip_on_cran()
Expand Down

0 comments on commit 6975d03

Please sign in to comment.