Merge pull request #915 from bootstraponline/fix_rotate

iOS Rotate
This commit is contained in:
Jonathan Lipps
2013-07-23 11:51:43 -07:00
14 changed files with 588 additions and 66 deletions
+29
View File
@@ -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();
});
});
});
});