MOBILE-3833 swipe: Change swipe to directive

main
Pau Ferrer Ocaña 2022-01-10 14:18:10 +01:00
parent 23a63fdb45
commit 5b6baee1ae
2 changed files with 4 additions and 4 deletions

View File

@ -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,
};
})();

View File

@ -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()");
}
/**