-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #412 from Appsilon/esra-update_multiple_checkbox-n…
…ot-supporting-choices-with-single-quote Fix json conversation of strings with single quote
- Loading branch information
Showing
4 changed files
with
65 additions
and
3 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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
Type: Package | ||
Package: shiny.semantic | ||
Title: Semantic UI Support for Shiny | ||
Version: 0.5.0.9000 | ||
Version: 0.5.0.9001 | ||
Authors@R: c(person("Filip", "Stachura", email = "[email protected]", role = "aut"), | ||
person("Dominik", "Krzeminski", role = "aut"), | ||
person("Krystian", "Igras", role = "aut"), | ||
|
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
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,60 @@ | ||
context("multiple checkbox") | ||
|
||
test_that("test multiple_checkbox input values", { | ||
# type | ||
expect_is(multiple_checkbox( | ||
input_id = "checkboxes", | ||
label = NULL, | ||
choices = "" | ||
), | ||
"shiny.tag") | ||
# empty input | ||
si_str <- | ||
as.character(multiple_checkbox( | ||
input_id = "checkboxes", | ||
label = NULL, | ||
choices = "" | ||
)) | ||
expect_true(any( | ||
grepl( | ||
"<div id=\"checkboxes\" class=\"grouped fields ss-checkbox-input\">", | ||
si_str, | ||
fixed = TRUE | ||
) | ||
)) | ||
# label | ||
si_str <- | ||
as.character(multiple_checkbox( | ||
input_id = "checkboxes", | ||
label = "My Label", | ||
choices = "" | ||
)) | ||
expect_true(any( | ||
grepl("<label for=\"checkboxes\">My Label</label>", | ||
si_str, fixed = TRUE) | ||
)) | ||
# selected choices | ||
si_str <- | ||
as.character( | ||
multiple_checkbox( | ||
input_id = "checkboxes", | ||
label = "My Label", | ||
choices = c("A's", "B"), | ||
selected = c("A's", "B") | ||
) | ||
) | ||
expect_true(any( | ||
grepl( | ||
"<input type=\"checkbox\" name=\"checkboxes\" tabindex=\"0\" value=\"A's\" checked/>", | ||
si_str, | ||
fixed = TRUE | ||
) | ||
)) | ||
expect_true(any( | ||
grepl( | ||
"<input type=\"checkbox\" name=\"checkboxes\" tabindex=\"0\" value=\"B\" checked/>", | ||
si_str, | ||
fixed = TRUE | ||
) | ||
)) | ||
}) |