Skip to content

Commit

Permalink
fix: replace the remote pdf file with a png file that we manage
Browse files Browse the repository at this point in the history
  • Loading branch information
vedhav committed May 10, 2024
1 parent df33240 commit a1f43de
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tests/testthat/test-shinytest2-tm_file_viewer.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
nest_logo_url <- "https://raw.githubusercontent.com/insightsengineering/hex-stickers/main/PNG/nest.png"

app_driver_tm_file_viewer <- function() {
init_teal_app_driver(
data = simple_teal_data(),
Expand All @@ -7,7 +9,7 @@ app_driver_tm_file_viewer <- function() {
folder = system.file("sample_files", package = "teal.modules.general"),
png = system.file("sample_files/sample_file.png", package = "teal.modules.general"),
txt = system.file("sample_files/sample_file.txt", package = "teal.modules.general"),
url = "https://fda.gov/files/drugs/published/Portable-Document-Format-Specifications.pdf"
url = nest_logo_url
)
),
timeout = 3000
Expand Down Expand Up @@ -84,9 +86,9 @@ test_that("e2e - tm_file_viewer: Shows selected url", {
app_driver$click(selector = "[id= '6_anchor']")
testthat::expect_true(app_driver$is_visible(selector = app_driver$active_module_element("output")))

testthat::expect_match(
testthat::expect_equal(
attr(app_driver$get_active_module_input("tree")$url, "ancestry"),
"pdf$"
nest_logo_url
)

app_driver$stop()
Expand Down

0 comments on commit a1f43de

Please sign in to comment.