Skip to content

Commit a353b45

Browse files
committed
MOBILE-3320 behat: Trigger change detection once
Doing it multiple times seems to cause some internal race conditions in Angular that result in flaky tests
1 parent 35b64d9 commit a353b45

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

tests/behat/behat_app.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -793,11 +793,8 @@ function() use ($session, $operationid) {
793793
new ExpectationException('Forced cron tasks in the app took too long to complete', $session)
794794
);
795795

796-
// Trigger Angular change detection multiple times in case some changes have
797-
// side-effects that result in further pending operations.
798-
for ($ticks = 5; $ticks > 0; $ticks--) {
799-
$session->executeScript($this->islegacy ? 'appRef.tick();' : 'changeDetector.detectChanges();');
800-
}
796+
// Trigger Angular change detection
797+
$session->executeScript($this->islegacy ? 'appRef.tick();' : 'changeDetector.detectChanges();');
801798
}
802799

803800
/**

0 commit comments

Comments
 (0)