Merge pull request #9 from NoelDeMartin/MOBILE-3401

MOBILE-3401: Remove javascript return evaluation when unnecessary
main
Juan Leyva 2020-06-22 19:38:51 +02:00 committed by GitHub
commit 56df53c7b3
1 changed files with 3 additions and 3 deletions

View File

@ -48,7 +48,7 @@ class behat_local_moodlemobileapp extends behat_base {
// Force cron tasks execution and wait until they are completed. // Force cron tasks execution and wait until they are completed.
$operationid = random_string(); $operationid = random_string();
$session->evaluateScript( $session->executeScript(
"cronProvider.forceSyncExecution().then(() => { window['behat_{$operationid}_completed'] = true; });" "cronProvider.forceSyncExecution().then(() => { window['behat_{$operationid}_completed'] = true; });"
); );
$this->spin( $this->spin(
@ -63,7 +63,7 @@ class behat_local_moodlemobileapp extends behat_base {
// Trigger Angular digest cycle multiple times in case some changes have // Trigger Angular digest cycle multiple times in case some changes have
// side-effects that result in further pending operations. // side-effects that result in further pending operations.
for ($ticks = 5; $ticks > 0; $ticks--) { for ($ticks = 5; $ticks > 0; $ticks--) {
$session->evaluateScript('appRef.tick();'); $session->executeScript('appRef.tick();');
} }
} }
@ -77,7 +77,7 @@ class behat_local_moodlemobileapp extends behat_base {
$this->spin( $this->spin(
function() use ($session) { function() use ($session) {
$session->evaluateScript('appRef.tick();'); $session->executeScript('appRef.tick();');
$nodes = $this->find_all('css', 'core-loading ion-spinner'); $nodes = $this->find_all('css', 'core-loading ion-spinner');