diff --git a/tests/behat/app_behat_runtime.js b/tests/behat/app_behat_runtime.js index a9c3df3cf..1567ac68a 100644 --- a/tests/behat/app_behat_runtime.js +++ b/tests/behat/app_behat_runtime.js @@ -734,8 +734,8 @@ * @param {string} className Constructor class name * @return {object} Component instance */ - const behatGetComponentInstance = function(selector, className) { - log('Action - Get component instance ' + selector + ', ' + className); + const behatGetAngularInstance = function(selector, className) { + log('Action - Get Angular instance ' + selector + ', ' + className); const activeElement = Array.from(document.querySelectorAll(`.ion-page:not(.ion-page-hidden) ${selector}`)).pop(); @@ -757,6 +757,6 @@ press : behatPress, setField : behatSetField, getHeader : behatGetHeader, - getComponentInstance: behatGetComponentInstance, + getAngularInstance: behatGetAngularInstance, }; })(); diff --git a/tests/behat/behat_app.php b/tests/behat/behat_app.php index 051e8560b..d36f1f405 100644 --- a/tests/behat/behat_app.php +++ b/tests/behat/behat_app.php @@ -237,7 +237,7 @@ class behat_app extends behat_base { public function i_swipe_in_the_app(string $direction) { $method = 'swipe' . ucwords($direction); - $this->evaluate_script("behat.getComponentInstance('core-swipe-navigation', 'CoreSwipeNavigationComponent').$method()"); + $this->evaluate_script("behat.getAngularInstance('ion-content', 'CoreSwipeNavigationDirective').$method()"); } /**