You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by sg...@apache.org on 2015/02/11 12:31:58 UTC

cordova-plugin-contacts git commit: CB-8395 marked unsupported tests pending on wp8

Repository: cordova-plugin-contacts
Updated Branches:
  refs/heads/master ddcf92391 -> c60f50e7f


CB-8395 marked unsupported tests pending on wp8

github close #55


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/c60f50e7
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-contacts/tree/c60f50e7
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-contacts/diff/c60f50e7

Branch: refs/heads/master
Commit: c60f50e7f99d8fa555d44b1ed425aad2b3d4dba7
Parents: ddcf923
Author: alsorokin <al...@akvelon.com>
Authored: Mon Feb 2 13:47:48 2015 +0300
Committer: sgrebnov <v-...@microsoft.com>
Committed: Wed Feb 11 14:31:21 2015 +0300

----------------------------------------------------------------------
 tests/tests.js | 31 +++++++------------------------
 1 file changed, 7 insertions(+), 24 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-contacts/blob/c60f50e7/tests/tests.js
----------------------------------------------------------------------
diff --git a/tests/tests.js b/tests/tests.js
index be0ac32..5be01b3 100644
--- a/tests/tests.js
+++ b/tests/tests.js
@@ -112,15 +112,10 @@ exports.defineAutoTests = function () {
               it("contacts.spec.6 should be able to find a contact by name", function (done) {
                   // Find method is not supported on Windows Store apps.
                   // also this test will be skipped for Windows Phone 8.1 because function "save" not supported on WP8.1
-                  if (isWindows) {
+                  if (isWindows || isWindowsPhone8) {
                       pending();
-                      return;
                   }
 
-                  if (isWindowsPhone8) {
-                      done();
-                      return;
-                  }
                   var foundName = function(result) {
                           var bFound = false;
                           try {
@@ -294,14 +289,10 @@ exports.defineAutoTests = function () {
       describe('save method', function () {
           it("contacts.spec.20 should be able to save a contact", function (done) {
               // Save method is not supported on Windows platform
-              if (isWindows) {
+              if (isWindows || isWindowsPhone8) {
                   pending();
-                  return;
-              }
-              if (isWindowsPhone8) {
-                  done();
-                  return;
               }
+
               var bDay = new Date(1976, 6,4);
               gContactObj = navigator.contacts.create({"gender": "male", "note": "my note", "name": {"familyName": "Delete", "givenName": "Test"}, "emails": [{"value": "here@there.com"}, {"value": "there@here.com"}], "birthday": bDay});
 
@@ -326,14 +317,10 @@ exports.defineAutoTests = function () {
           // HACK: there is a reliance between the previous and next test. This is bad form.
           it("contacts.spec.21 update a contact", function (done) {
               // Save method is not supported on Windows platform
-              if (isWindows) {
+              if (isWindows || isWindowsPhone8) {
                   pending();
-                  return;
-              }
-              if (isWindowsPhone8) {
-                  done();
-                  return;
               }
+
               expect(gContactObj).toBeDefined();
 
               var bDay = new Date(1975, 5,4);
@@ -390,14 +377,10 @@ exports.defineAutoTests = function () {
 
           it("contacts.spec.24 Creating, saving, finding a contact should work, removing it should work, after which we should not be able to find it, and we should not be able to delete it again.", function (done) {
               // Save method is not supported on Windows platform
-              if (isWindows) {
+              if (isWindows || isWindowsPhone8) {
                   pending();
-                  return;
-              }
-              if (isWindowsPhone8) {
-                  done();
-                  return;
               }
+
               gContactObj = new Contact();
               gContactObj.name = new ContactName();
               gContactObj.name.familyName = "DeleteMe";


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