Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Adding wait_for_idle in the constructor of TealAppDriver #1163

Closed
vedhav opened this issue Mar 15, 2024 · 2 comments · Fixed by #1171
Closed

[Feature] Adding wait_for_idle in the constructor of TealAppDriver #1163

vedhav opened this issue Mar 15, 2024 · 2 comments · Fixed by #1171
Assignees
Labels

Comments

@vedhav
Copy link
Contributor

vedhav commented Mar 15, 2024

          How about adding the `wait_for_idle` here instead of using it after `TealAppDriver$new` on each single test?

I also suggest re-implementing wait_for_idle to increase the timeout of the TealAppDriver, wdyt?

      private$set_active_ns()
      self$wait_for_idle()
    },
    wait_for_idle = function(duration = 500, timeout = 20000) {
      super$wait_for_idle(duration = duration, timeout = timeout)
    },

Originally posted by @averissimo in #1127 (comment)

@m7pr
Copy link
Contributor

m7pr commented Mar 18, 2024

This is great and I already need that!
I think the app$click() could also benefit from the extension of $wait_for_idle() as those are the two situations in which I always use $wait_for_idle

@m7pr
Copy link
Contributor

m7pr commented Mar 21, 2024

Hey @averissimo and @vedhav - I created a PR in here for implement this, but left 2 questions for a serious discussion #1171

@m7pr m7pr self-assigned this Mar 21, 2024
averissimo added a commit that referenced this issue Mar 27, 2024
…wait_for_idle()` calls (#1171)

Close #1163 

- removed all `$wait_for_idle()` calls after `TealAppDrvier$new()` as I
extended the method to call `$wait_for_idle()`
- removed all `$wait_for_idle()` calls after `app$click()` as I extended
the method to call `$wait_for_idle()`
- removed all `$wait_for_idle()` calls after `app$navigate_teal_tab()`
as it is called inside the method already

Questions: 
- Should we add `timeout` parameter to initialize that will be passed to
`self$wait_for_idle()` or add `...` in `self$wait_for_idle(...)` at the
end of the call. So that during `TealAppDriver$new()` you can pass
`timeout = `.
- `app$navigate_teal_tab` uses `private$idle_timeout`
(`self$wait_for_idle(timeout = private$idle_timeout)`). Should we use
`private$idle_timeout` in `TealAppDrvier$new` where we call
`$wait_for_idle()`. Also, should we set `private$idle_timeout` in
`TealAppDrvier$new`

---------

Signed-off-by: André Veríssimo <[email protected]>
Co-authored-by: 27856297+dependabot-preview[bot]@users.noreply.github.com <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: André Veríssimo <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants