From bb206a4ffce4f966ddd27cd17cc666dfa19bc20d Mon Sep 17 00:00:00 2001 From: Noel De Martin Date: Mon, 22 Jun 2020 14:47:26 +0200 Subject: [PATCH] MOBILE-3401: Remove javascript return evaluation when unnecessary --- tests/behat/behat_local_moodlemobileapp.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/behat/behat_local_moodlemobileapp.php b/tests/behat/behat_local_moodlemobileapp.php index 63e04ee2a..37ff72ea9 100644 --- a/tests/behat/behat_local_moodlemobileapp.php +++ b/tests/behat/behat_local_moodlemobileapp.php @@ -48,7 +48,7 @@ class behat_local_moodlemobileapp extends behat_base { // Force cron tasks execution and wait until they are completed. $operationid = random_string(); - $session->evaluateScript( + $session->executeScript( "cronProvider.forceSyncExecution().then(() => { window['behat_{$operationid}_completed'] = true; });" ); $this->spin( @@ -63,7 +63,7 @@ class behat_local_moodlemobileapp extends behat_base { // Trigger Angular digest cycle multiple times in case some changes have // side-effects that result in further pending operations. 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( function() use ($session) { - $session->evaluateScript('appRef.tick();'); + $session->executeScript('appRef.tick();'); $nodes = $this->find_all('css', 'core-loading ion-spinner');