MOBILE-3833 swipe: Change swipe to directive
parent
23a63fdb45
commit
5b6baee1ae
|
@ -734,8 +734,8 @@
|
||||||
* @param {string} className Constructor class name
|
* @param {string} className Constructor class name
|
||||||
* @return {object} Component instance
|
* @return {object} Component instance
|
||||||
*/
|
*/
|
||||||
const behatGetComponentInstance = function(selector, className) {
|
const behatGetAngularInstance = function(selector, className) {
|
||||||
log('Action - Get component instance ' + selector + ', ' + className);
|
log('Action - Get Angular instance ' + selector + ', ' + className);
|
||||||
|
|
||||||
const activeElement = Array.from(document.querySelectorAll(`.ion-page:not(.ion-page-hidden) ${selector}`)).pop();
|
const activeElement = Array.from(document.querySelectorAll(`.ion-page:not(.ion-page-hidden) ${selector}`)).pop();
|
||||||
|
|
||||||
|
@ -757,6 +757,6 @@
|
||||||
press : behatPress,
|
press : behatPress,
|
||||||
setField : behatSetField,
|
setField : behatSetField,
|
||||||
getHeader : behatGetHeader,
|
getHeader : behatGetHeader,
|
||||||
getComponentInstance: behatGetComponentInstance,
|
getAngularInstance: behatGetAngularInstance,
|
||||||
};
|
};
|
||||||
})();
|
})();
|
||||||
|
|
|
@ -237,7 +237,7 @@ class behat_app extends behat_base {
|
||||||
public function i_swipe_in_the_app(string $direction) {
|
public function i_swipe_in_the_app(string $direction) {
|
||||||
$method = 'swipe' . ucwords($direction);
|
$method = 'swipe' . ucwords($direction);
|
||||||
|
|
||||||
$this->evaluate_script("behat.getComponentInstance('core-swipe-navigation', 'CoreSwipeNavigationComponent').$method()");
|
$this->evaluate_script("behat.getAngularInstance('ion-content', 'CoreSwipeNavigationDirective').$method()");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue