Skip to content

Commit

Permalink
Fix the integration tests by alternative (#1237)
Browse files Browse the repository at this point in the history
Changes:

1. The container in the integration test does not seem to evaluate the
JS code to check visibility when `app_driver$is_visible` is called with
`visibility_property = TRUE`
2. Increasing the timeout threshold for `wait_for_page_stability`. For
an unknown reason this timeout does not work in certain containers.
Initial timeout (500ms) was set as a 2x of what was needed in my local
machine. But looks like we need at least 800 ms to work in some loaded
conditions. So, setting it to 2000 ms now.
  • Loading branch information
vedhav authored May 30, 2024
1 parent 5c3e3fd commit 36c3b22
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/TealAppDriver.R
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ TealAppDriver <- R6::R6Class( # nolint: object_name.
strict = FALSE
)

required_version <- "105"
required_version <- "121"

testthat::skip_if(
is.na(chrome_version),
Expand Down Expand Up @@ -654,7 +654,7 @@ TealAppDriver <- R6::R6Class( # nolint: object_name.
# @param stability_period (`numeric(1)`) The time in milliseconds to wait till the page to be stable.
# @param check_interval (`numeric(1)`) The time in milliseconds to check for changes in the page.
# The stability check is reset when a change is detected in the page after sleeping for check_interval.
wait_for_page_stability = function(stability_period = 500, check_interval = 50) {
wait_for_page_stability = function(stability_period = 2000, check_interval = 200) {
previous_content <- self$get_html("body")
end_time <- Sys.time() + (stability_period / 1000)

Expand Down

0 comments on commit 36c3b22

Please sign in to comment.