mirror of
https://github.com/appium/appium.git
synced 2026-04-30 23:41:58 -05:00
@@ -0,0 +1,29 @@
|
||||
/*global it:true */
|
||||
"use strict";
|
||||
|
||||
var assert = require("assert")
|
||||
, describeWd = require("../../helpers/driverblock.js").describeForApp('TestApp')
|
||||
, should = require("should");
|
||||
|
||||
describeWd('pinchOpen and pinchClose gesture', function(h) {
|
||||
return it('should pinchOpen and pinchClose map after tapping Test Gesture', function(done) {
|
||||
var driver = h.driver;
|
||||
driver.elementsByTagName('button', function(err, buttons) {
|
||||
buttons[3].click(function(err) {
|
||||
should.not.exist(err);
|
||||
driver.elementByXPath('//window[1]/UIAMapView[1]', function(err) {
|
||||
should.not.exist(err);
|
||||
driver.execute("mobile: pinchOpen", [{startX: 114.0, startY: 198.0, endX: 257.0, endY: 256.0, duration: 5.0}], function(err) {
|
||||
driver.elementByXPath('//window[1]/UIAMapView[1]', function(err) {
|
||||
should.not.exist(err);
|
||||
driver.execute("mobile: pinchClose", [{startX: 114.0, startY: 198.0, endX: 257.0, endY: 256.0, duration: 5.0}], function(err) {
|
||||
should.not.exist(err);
|
||||
done();
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,23 @@
|
||||
/*global it:true */
|
||||
"use strict";
|
||||
|
||||
var assert = require("assert")
|
||||
, describeWd = require("../../helpers/driverblock.js").describeForApp('TestApp')
|
||||
, should = require("should");
|
||||
|
||||
describeWd('rotation gesture', function(h) {
|
||||
return it('should rotate map after tapping Test Gesture', function(done) {
|
||||
var driver = h.driver;
|
||||
driver.elementsByTagName('button', function(err, buttons) {
|
||||
buttons[3].click();
|
||||
should.not.exist(err);
|
||||
});
|
||||
driver.elementsByTagName('Map', function(err) {
|
||||
should.not.exist(err);
|
||||
driver.execute("mobile: rotate", [{x: 114, y: 198, duration: 5, radius: 3, rotation: 220, touchCount: 2}], function(err) {
|
||||
should.not.exist(err);
|
||||
done();
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user