Sha256: 3a5efb53bcff79d14c973e688683d0b28137793fd1d38d41af1013355517f9f8

Contents?: true

Size: 1.23 KB

Versions: 296

Compression:

Stored size: 1.23 KB

Contents

Waits
---

All Capybara Node Finders utilize a waiting mechanism.

Per the [Capybara API](https://www.rubydoc.info/github/jnicklas/capybara/Capybara/Node/Finders:find) -

> If the driver is capable of executing JavaScript, `find` will wait for a set amount of time and continuously retry finding the element until either the element is found or the time expires. The length of time find will wait is controlled through `Capybara.default_max_wait_time` and defaults to `2` seconds. `find` takes the same options as all.

Ideally the [GitLab QA Framework](https://gitlab.com/gitlab-org/gitlab-ce/tree/master/qa) should implement its own explicit waiting to avoid hard sleeps but currently that is [not the case](https://gitlab.com/gitlab-org/gitlab-qa/issues/280).

## Hard Sleeps

**[qa/qa/page/base.rb](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/qa/qa/page/base.rb#L16)**

```
def wait(max: 60, time: 0.1, reload: true)
  ...
end
```

- `max`    : Specifies the max amount of *seconds* to wait until the block given is satisfied
- `time`   : The interval/poll time to sleep *in seconds*. If this time reaches `max`, the wait returns `false`
- `reload` : If the wait is not satiated, the test will sleep then reload the page if `:reload` is set to `true`

Version data entries

296 entries across 296 versions & 1 rubygems

Version Path
gitlab-qa-14.0.1 docs/waits.md
gitlab-qa-14.0.0 docs/waits.md
gitlab-qa-13.2.1 docs/waits.md
gitlab-qa-13.2.0 docs/waits.md
gitlab-qa-13.1.0 docs/waits.md
gitlab-qa-13.0.0 docs/waits.md
gitlab-qa-12.5.1 docs/waits.md
gitlab-qa-12.5.0 docs/waits.md
gitlab-qa-12.4.1 docs/waits.md
gitlab-qa-12.4.0 docs/waits.md
gitlab-qa-12.3.0 docs/waits.md
gitlab-qa-10.3.0.1 docs/waits.md
gitlab-qa-12.2.1 docs/waits.md
gitlab-qa-12.2.0 docs/waits.md
gitlab-qa-12.1.0 docs/waits.md
gitlab-qa-12.0.0 docs/waits.md
gitlab-qa-11.3.0 docs/waits.md
gitlab-qa-11.2.0 docs/waits.md
gitlab-qa-11.1.0 docs/waits.md
gitlab-qa-11.0.0 docs/waits.md