Fix timeout capping

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
This commit is contained in:
Daniel Calviño Sánchez 2020-03-20 17:43:12 +01:00
parent 43e18e96e2
commit 887e740434
1 changed files with 1 additions and 1 deletions

View File

@ -87,7 +87,7 @@ class NotificationsContext implements Context, ActorAwareInterface {
// As the waiting is long enough already the find timeout multiplier is
// capped at 2 when finding notifications.
$findTimeoutMultiplier = $this->actor->getFindTimeoutMultiplier();
$this->actor->setFindTimeoutMultiplier(max(2, $findTimeoutMultiplier));
$this->actor->setFindTimeoutMultiplier(min(2, $findTimeoutMultiplier));
$this->actor->find(self::acceptButtonInIncomingShareNotificationForFile($fileName), 35)->click();
$this->actor->setFindTimeoutMultiplier($findTimeoutMultiplier);