cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alsoro...@apache.org
Subject cordova-plugin-contacts git commit: CB-11033 Appium tests: Increased the timeout for updating the contact
Date Thu, 07 Apr 2016 09:35:03 GMT
Repository: cordova-plugin-contacts
Updated Branches:
  refs/heads/master c184b4e48 -> 0d33af8e4


CB-11033 Appium tests: Increased the timeout for updating the contact


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-contacts/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-contacts/commit/0d33af8e
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-contacts/tree/0d33af8e
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-contacts/diff/0d33af8e

Branch: refs/heads/master
Commit: 0d33af8e4e197fc9204566b165cb5983ab442db8
Parents: c184b4e
Author: Alexander Sorokin <alexander.sorokin@akvelon.com>
Authored: Thu Apr 7 12:17:55 2016 +0300
Committer: Alexander Sorokin <alexander.sorokin@akvelon.com>
Committed: Thu Apr 7 12:17:55 2016 +0300

----------------------------------------------------------------------
 appium-tests/common/common.spec.js | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-contacts/blob/0d33af8e/appium-tests/common/common.spec.js
----------------------------------------------------------------------
diff --git a/appium-tests/common/common.spec.js b/appium-tests/common/common.spec.js
index 9086eee..f986815 100644
--- a/appium-tests/common/common.spec.js
+++ b/appium-tests/common/common.spec.js
@@ -133,7 +133,7 @@ describe('Contacts Android', function () {
     function renameContact(oldName, newGivenName, newFamilyName) {
         return driver
             .context(webviewContext)
-            .setAsyncScriptTimeout(MINUTE)
+            .setAsyncScriptTimeout(5 * MINUTE)
             .executeAsync(function (oldname, newgivenname, newfamilyname, callback) {
                 var obj = new ContactFindOptions();
                 obj.filter = oldname;
@@ -141,6 +141,7 @@ describe('Contacts Android', function () {
 
                 navigator.contacts.find(['displayName', 'name'], function(contacts) {
                     if (contacts.length === 0) {
+                        callback({ 'code': -35142 });
                         return;
                     }
                     var contact = contacts[0];
@@ -154,6 +155,9 @@ describe('Contacts Android', function () {
             }, [oldName, newGivenName, newFamilyName])
             .then(function(result) {
                 if (result && result.hasOwnProperty('code')) {
+                    if (result.code === -35142) {
+                        throw 'Couldn\'t find the contact "' + oldName + '"';
+                    }
                     throw result;
                 }
                 return result;


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


Mime
View raw message