test fixes

This commit is contained in:
sebv
2014-06-21 16:07:28 +08:00
parent 7daa0bfe7f
commit 2a9ad6ea70
2 changed files with 17 additions and 2 deletions

View File

@@ -12,23 +12,35 @@ describe('uicatalog - clear @skip-ios6', function () {
it('should be able to hide keyboard with the default strategy', function (done) {
driver
.elementByXPath("//UIAStaticText[contains(@name, 'Web View')]").moveTo(10, 10).click()
.elementByXPath("//UIATextField").click()
.elementByAccessibilityIdOrNull("Go").should.eventually.exist
.hideKeyboard()
.elementByAccessibilityIdOrNull("Go").should.not.eventually.exist
.back()
.nodeify(done);
});
it('should be able to hide keyboard with the tapOutside strategy', function (done) {
driver
.elementByXPath("//UIAStaticText[contains(@name, 'Web View')]").moveTo(10, 10).click()
.elementByXPath("//UIATextField").click()
.elementByAccessibilityIdOrNull("Go").should.eventually.exist
.hideKeyboard({strategy: 'tapOutside'})
.elementByAccessibilityIdOrNull("Go").should.not.eventually.exist
.back()
.nodeify(done);
});
it('should be able to hide keyboard with the tapOut strategy', function (done) {
driver
.elementByXPath("//UIAStaticText[contains(@name, 'Web View')]").moveTo(10, 10).click()
.elementByXPath("//UIATextField").click()
.elementByAccessibilityIdOrNull("Go").should.eventually.exist
.hideKeyboard({strategy: 'tapOut'})
.elementByAccessibilityIdOrNull("Go").should.not.eventually.exist
.back()
.nodeify(done);
});
});
});

View File

@@ -47,6 +47,7 @@ describe('webview - basics', function () {
it('setting context to \'WEBVIEW_1\' should work', function (done) {
driver.contexts().should.eventually.have.length.above(0)
.context("WEBVIEW_1")
.sleep(500)
.get(env.GUINEA_TEST_END_POINT)
.sleep(500)
.title()
@@ -56,6 +57,7 @@ describe('webview - basics', function () {
it('setting context to \'WEBVIEW_1\' should work without first getting contexts', function (done) {
driver
.context("WEBVIEW_1")
.sleep(500)
.get(env.GUINEA_TEST_END_POINT)
.sleep(500)
.title()
@@ -65,6 +67,7 @@ describe('webview - basics', function () {
it('setting context to \'WEBVIEW\' should work', function (done) {
driver
.context("WEBVIEW")
.sleep(500)
.get(env.GUINEA_TEST_END_POINT)
.sleep(500)
.title()