From 5ce37602b361f4ed79d4354b998f0ae1d99a18bf Mon Sep 17 00:00:00 2001 From: Isaac Murchie Date: Thu, 7 Aug 2014 09:27:14 -0700 Subject: [PATCH] Add stability test for iOS keyboard --- test/functional/ios/testapp/keyboard-specs.js | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 test/functional/ios/testapp/keyboard-specs.js diff --git a/test/functional/ios/testapp/keyboard-specs.js b/test/functional/ios/testapp/keyboard-specs.js new file mode 100644 index 000000000..63a6f7159 --- /dev/null +++ b/test/functional/ios/testapp/keyboard-specs.js @@ -0,0 +1,30 @@ +"use strict"; + +var setup = require("../../common/setup-base") + , desired = require('./desired') + , _ = require('underscore'); + + +describe("testapp - keyboard stability @skip-ci", function () { + var runs = 10 + , text = 'Delhi is New @@@ QA-BREAKFAST-FOOD-0001'; + + var driver; + setup(this, _.defaults({ + deviceName: 'iPad Simulator', + }, desired)).then(function (d) { driver = d; }); + + var test = function () { + it("should send keys to a text field", function (done) { + driver + .elementByClassName('UIATextField') + .sendKeys(text) + .text().should.become(text) + .nodeify(done); + }); + }; + + for (var n = 0; n < runs; n++) { + describe('sendKeys test ' + (n + 1), test); + } +});