Open kbrueckner opened 1 year ago
https://github.com/awaitility/awaitility/wiki/Usage is a quite nice library in Java for synchronizing operations in tests. I quite like its fluent API
I wonder if it could be combined with Questions
?
DBAdmin
.waits()
.atMost(5, SECONDS)
.until(Entity.hasAttribute(entity, { attr: ‘some change’ }))
This actually should be implemented in the screenplay core package
Imagine the following scenario: A user triggers some interaction in a UI. In the background some data is put on a data stream is processed by a backend service and ends up updating an existing entry in a database. For that scenario a test could look like follow:
The challenge could be, that the whole flow takes some time so that the changes are not immediately found in the DB but require some time. A Retry routine would help to overcome that. An idea how that could look like is:
In case the actions inside a retry are split among different users