Skip to content

Improve `wait`/`retry` helper modules

Description

wait helper that we have defined it becoming more complex, and keeping it as a single method is reaching its limitations.

We can consider making it a class, and implement a little more more flexible interface.


Update: We've since added these two modules:

They've replaced the old wait method (in fact, wait just uses Waiter)

However, there's some overlap between Waiter.wait and Retrier.retry_until, and could combine the two modules and remove some redundancy.

One important thing to keep in mind is that Capybara itself handles waiting and retrying if there are exceptions. So we should ask ourselves "Does Capybara already do this?" before we add functionality to our framework.


Tasks:

Edited by Martin Wortschack