-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- add a test to check if the app starts
- Loading branch information
1 parent
6bad17e
commit 772a592
Showing
2 changed files
with
21 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
test_that("App starts.", { | ||
setwd(dirname(common::file.find(pattern = "req.txt"))) | ||
# make sure settings.csv is not present | ||
if(file.exists("settings.csv")) { | ||
fs::file_delete("settings.csv") | ||
} | ||
|
||
library(shinytest2) | ||
options(shiny.testmode = TRUE) | ||
|
||
app <- AppDriver$new(app_dir = getwd(), | ||
name = "M2ara_bruker load test", | ||
seed = 42, | ||
timeout = 4.5*1e5) | ||
|
||
exp <- app$get_values(export = TRUE) | ||
|
||
expect_equal(exp$export$infoState, "inital") | ||
expect_equal(exp$export$info3, "") | ||
}) |