-
Notifications
You must be signed in to change notification settings - Fork 16
Adds MultiTouch Gesture Template and examples using it with zoom in and zoom out #85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think these scripts work as intended with the current percentages used, unless I am misreading this.
mabl snippets/native mobile testing/mobileZoomInAtScreenCenter.js
Outdated
Show resolved
Hide resolved
mabl snippets/native mobile testing/mobileZoomInAtScreenCenter.js
Outdated
Show resolved
Hide resolved
mabl snippets/native mobile testing/mobileZoomInAtScreenCenter.js
Outdated
Show resolved
Hide resolved
mabl snippets/native mobile testing/mobileZoomOutAtScreenCenter.js
Outdated
Show resolved
Hide resolved
mabl snippets/native mobile testing/customMobileGesturesTemplate.js
Outdated
Show resolved
Hide resolved
mabl snippets/native mobile testing/customMobileGesturesTemplate.js
Outdated
Show resolved
Hide resolved
mabl snippets/native mobile testing/customMobileGesturesTemplate.js
Outdated
Show resolved
Hide resolved
mabl snippets/native mobile testing/customMobileGesturesTemplate.js
Outdated
Show resolved
Hide resolved
const x = | ||
(1 - t) * (1 - t) * start.x + | ||
2 * (1 - t) * t * control.x + | ||
t * t * end.x; | ||
const y = | ||
(1 - t) * (1 - t) * start.y + | ||
2 * (1 - t) * t * control.y + | ||
t * t * end.y; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🙃 🤯
mabl snippets/native mobile testing/customMobileGesturesTemplate.js
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just have a few minor things to update.
@@ -55,18 +55,22 @@ function mablJavaScriptStep(mablInputs, callback) { | |||
1. Create a new element object. | |||
`const element = new MobileElement();` //=> Create a new element object | |||
|
|||
2. Find the element or get screen information. | |||
2. Find the element or just get the screen location and be done. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2. Find the element or just get the screen location and be done. | |
2. Find the element or just get the screen location. |
const image = await new MobileElement().findByXpath("//XCUIElementTypeImage"); | ||
await new MultiTouch().zoomIn(image.center).perform(); | ||
await new MultiTouch().zoomOut(image.center).perform(); | ||
## One vertical swipe and one horizontal swipe at the same time |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is a vertical swipe followed by a horizontal swipe right? Was confused about the "at the same time" phrasing here.
* @private | ||
*/ | ||
async waitUntilLoop() { | ||
this.count++; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: I think it would be better to name this loopCount
to be a bit more descriptive.
No description provided.