-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e0a5c71
commit 7571948
Showing
25 changed files
with
135 additions
and
168 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,11 +4,12 @@ Title: Mobile Ready 'shiny' Apps with Standalone Capabilities | |
Version: 1.0.1 | ||
Authors@R: c( | ||
person("David", "Granjon", email = "[email protected]", role = c("aut", "cre")), | ||
person("Veerle", "van Leemput", email = "[email protected]", role = "aut"), | ||
person("AthlyticZ", role = "fnd"), | ||
person("Victor", "Perrier", email = "[email protected]", role = "aut"), | ||
person("John", "Coene", email = "[email protected]", role = "ctb"), | ||
person("Isabelle", "Rudolf", email = "", role = "aut"), | ||
person("Dieter", "Menne", email = "[email protected]", role = "ctb"), | ||
person("Veerle", "van Leemput", email = "[email protected]", role = "ctb"), | ||
person(family = "Marvelapp", role = c("ctb", "cph"), comment = "device.css wrappers"), | ||
person("Vladimir", "Kharlampidi", email = "[email protected]", role = c("ctb", "cph"), comment = "Framework7 HTML template")) | ||
Maintainer: David Granjon <[email protected]> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
library(shiny) | ||
library(shinyMobile) | ||
|
||
app <- shinyApp( | ||
ui = f7Page( | ||
title = "f7Select", | ||
f7SingleLayout( | ||
navbar = f7Navbar(title = "updateF7Select"), | ||
f7Card( | ||
f7Button(inputId = "update", label = "Update select"), | ||
br(), | ||
f7Select( | ||
inputId = "select", | ||
label = "Choose a variable:", | ||
choices = colnames(mtcars)[-1], | ||
selected = "hp" | ||
), | ||
verbatimTextOutput("test") | ||
) | ||
) | ||
), | ||
server = function(input, output, session) { | ||
output$test <- renderPrint(input$select) | ||
|
||
observeEvent(input$update, { | ||
updateF7Select( | ||
inputId = "select", | ||
selected = "gear" | ||
) | ||
}) | ||
} | ||
) | ||
|
||
if (interactive() || identical(Sys.getenv("TESTTHAT"), "true")) app |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Binary file modified
BIN
-2.02 KB
(94%)
tests/testthat/_snaps/mac-4.3/f7ActionSheet/actionsheet-app-004_.new.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-28 Bytes
(100%)
tests/testthat/_snaps/mac-4.3/f7Checkbox/checkbox-app-002_.new.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-8 Bytes
(100%)
tests/testthat/_snaps/mac-4.3/f7Checkbox/checkboxgroup-app-002_.new.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file was deleted.
Oops, something went wrong.
Binary file not shown.
10 changes: 0 additions & 10 deletions
10
tests/testthat/_snaps/mac-4.3/f7Dialog/dialog-app-006.json
This file was deleted.
Oops, something went wrong.
Binary file not shown.
Binary file added
BIN
+636 KB
tests/testthat/_snaps/mac-4.3/f7PhotoBrowser/photobrowser-app-001_.new.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+14.2 KB
tests/testthat/_snaps/mac-4.3/f7PhotoBrowser/photobrowser-app-002_.new.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"input": { | ||
"select": "hp" | ||
}, | ||
"output": { | ||
"test": "[1] \"hp\"" | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"input": { | ||
"select": "gear" | ||
}, | ||
"output": { | ||
"test": "[1] \"gear\"" | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+850 Bytes
(110%)
tests/testthat/_snaps/mac-4.3/f7Swiper/swiper-app-001_.new.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+661 Bytes
(100%)
tests/testthat/_snaps/mac-4.3/f7Swiper/swiper-app-002_.new.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-3 Bytes
(100%)
tests/testthat/_snaps/mac-4.3/f7Treeview/treeview-app-001_.new.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+4 Bytes
(100%)
tests/testthat/_snaps/mac-4.3/f7Treeview/treeview-app-002_.new.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
library(shinytest2) | ||
test_that("select works", { | ||
skip_on_cran() | ||
shiny_app_path <- | ||
system.file("examples/select/app.R", package = "shinyMobile") | ||
app <- AppDriver$new( | ||
shiny_app_path, | ||
name = "select-app", | ||
variant = platform_variant() | ||
) | ||
|
||
# Open | ||
app$expect_values(input = "select", output = "test") | ||
app$click(select = "#update") | ||
app$wait_for_idle(1000) | ||
app$expect_values(input = "select", output = "test") | ||
}) | ||
|
||
test_that("select R tag work", { | ||
select_tag <- f7Select("select", "Select", colnames(mtcars)) | ||
expect_s3_class(select_tag, "shiny.tag") | ||
input <- htmltools::tagQuery(select_tag)$ | ||
find("select")$ | ||
selectedTags() | ||
expect_identical(input[[1]]$attribs$class, "input-select") | ||
expect_identical(input[[1]]$attribs$id, "select") | ||
opts <- input[[1]]$children | ||
expect_length(opts, length(colnames(mtcars))) | ||
}) |