-
Notifications
You must be signed in to change notification settings - Fork 0
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 #2 from Boehringer-Ingelheim/fix_lintr
Fix lintr failures
- Loading branch information
Showing
12 changed files
with
94 additions
and
83 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
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
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
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,21 +1,21 @@ | ||
test_that("The data filter module presents a text output, signifying the number of entries selected in the filtered data.", { | ||
test_that("The data filter module presents a text output, signifying the number of entries selected in the filtered data.", { # nolint | ||
adsl <- pharmaverseadam::adsl | ||
N <- nrow(adsl) | ||
n <- nrow(adsl) | ||
|
||
app <- shinytest2::AppDriver$new(app_dir = "shiny/adam/") | ||
app$wait_for_idle(1000) | ||
expect_equal( | ||
app$get_value(output = "data_filter-text"), | ||
paste(N, "of", N, "total entries selected") | ||
paste(n, "of", n, "total entries selected") | ||
) | ||
|
||
app$set_inputs(`data_filter-vars` = "SEX") | ||
app$set_inputs(`data_filter-SEX` = "M") | ||
app$wait_for_idle(1000) | ||
expect_equal( | ||
app$get_value(output = "data_filter-text"), | ||
paste(sum(adsl$SEX == "M"), "of", N, "total entries selected") | ||
paste(sum(adsl$SEX == "M"), "of", n, "total entries selected") | ||
) | ||
|
||
app$stop() | ||
}) |
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,16 +1,16 @@ | ||
test_that("For a chosen numeric filter with missing values, the data filter module includes a checkbox enabling users to either incorporate or omit missing values. By default, all missing values are included.", { | ||
test_that("For a chosen numeric filter with missing values, the data filter module includes a checkbox enabling users to either incorporate or omit missing values. By default, all missing values are included.", { # nolint | ||
adsl <- pharmaverseadam::adsl | ||
expect_true(sum(is.na(adsl$EOSDT)) > 0) | ||
|
||
app <- shinytest2::AppDriver$new(app_dir = "shiny/adam/") | ||
|
||
app$set_inputs(`data_filter-vars` = "EOSDT") | ||
app$wait_for_idle(1000) | ||
expect_true(all(app$get_value(export = "selected") == TRUE)) | ||
|
||
app$set_inputs(`data_filter-EOSDT_na` = FALSE) | ||
app$wait_for_idle(1000) | ||
expect_true(all(app$get_value(export = "selected") == !is.na(adsl$EOSDT))) | ||
|
||
app$stop() | ||
}) |
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,11 +1,11 @@ | ||
test_that("For a chosen numeric filter, the data filter module provides a range slider and displays a histogram of the numeric variable.", { | ||
test_that("For a chosen numeric filter, the data filter module provides a range slider and displays a histogram of the numeric variable.", { # nolint | ||
adsl <- pharmaverseadam::adsl | ||
app <- shinytest2::AppDriver$new(app_dir = "shiny/adam/") | ||
|
||
app$set_inputs(`data_filter-vars` = "AGE") | ||
app$wait_for_idle(1000) | ||
app$wait_for_idle(1000) | ||
expect_equal(app$get_value(input = "data_filter-AGE"), range(adsl$AGE)) | ||
expect_false(is.null(app$get_value(output = "data_filter-AGE_plot"))) | ||
|
||
app$stop() | ||
}) |
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,14 +1,14 @@ | ||
test_that("The data filter module allow users to remove all chosen filters simultaneously.", { | ||
app <- shinytest2::AppDriver$new(app_dir = "shiny/adam/") | ||
|
||
app$set_inputs(`data_filter-vars` = "AGE") | ||
app$set_inputs(`data_filter-vars` = c("AGE", "SEX")) | ||
app$wait_for_idle(1000) | ||
expect_equal(app$get_value(input = "data_filter-vars"), c("AGE", "SEX")) | ||
|
||
app$click("data_filter-clear_filters") | ||
app$wait_for_idle(1000) | ||
expect_null(app$get_value(input = "data_filter-vars")) | ||
|
||
app$stop() | ||
}) |
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