You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by sarangan12 <gi...@git.apache.org> on 2016/03/31 03:27:41 UTC

[GitHub] cordova-plugin-contacts pull request: Fix for the specs 26&27 to u...

GitHub user sarangan12 opened a pull request:

    https://github.com/apache/cordova-plugin-contacts/pull/112

    Fix for the specs 26&27 to use the newly created contacts for removal test

    The newly created contact is not used for deletion. The removal logic still holds the reference to the older value and uses it. So, changed the logic to use the passed in parameter. 
    
    Both specs 26&27 were consistently failing before this changes. Now they are passing.
    
    @riknoll  @omefire @nikhilkh @rakatyal  Can you please review and merge this PR?

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/sarangan12/cordova-plugin-contacts flakytests

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cordova-plugin-contacts/pull/112.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #112
    
----
commit 8e6849cd1807be903e47491bdb21ea813174869d
Author: Sarangan Rajamanickam <sa...@microsoft.com>
Date:   2016-03-31T01:23:46Z

    Fix for the specs 26&27 to use the newly created contacts for removal test

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] cordova-plugin-contacts pull request: Fix for the specs 26&27 to u...

Posted by omefire <gi...@git.apache.org>.
Github user omefire commented on a diff in the pull request:

    https://github.com/apache/cordova-plugin-contacts/pull/112#discussion_r58093735
  
    --- Diff: tests/tests.js ---
    @@ -589,10 +589,8 @@ exports.defineAutoTests = function() {
                     removeContactsByFields(["note"], "DeleteMe", function() {
                         contact.save(function(c_obj) {
                             var findWin = function(cs) {
    -                            // update to have proper saved id
    -                            contact = cs[0];
                                 expect(cs.length).toBe(1);
    -                            done();
    +                            done(cs[0]);
    --- End diff --
    
    never mind. I realized ```done``` here is bound to a different function. can we rename this function to ```callback``` or something else ? It's confusing.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] cordova-plugin-contacts pull request: Fix for the specs 26&27 to u...

Posted by omefire <gi...@git.apache.org>.
Github user omefire commented on a diff in the pull request:

    https://github.com/apache/cordova-plugin-contacts/pull/112#discussion_r58091126
  
    --- Diff: tests/tests.js ---
    @@ -589,10 +589,8 @@ exports.defineAutoTests = function() {
                     removeContactsByFields(["note"], "DeleteMe", function() {
                         contact.save(function(c_obj) {
                             var findWin = function(cs) {
    -                            // update to have proper saved id
    -                            contact = cs[0];
                                 expect(cs.length).toBe(1);
    -                            done();
    +                            done(cs[0]);
    --- End diff --
    
    does 'done' in jasmine 2.2.0 take a parameter ?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] cordova-plugin-contacts pull request: Fix for the specs 26&27 to u...

Posted by omefire <gi...@git.apache.org>.
Github user omefire commented on the pull request:

    https://github.com/apache/cordova-plugin-contacts/pull/112#issuecomment-204052400
  
    LGTM!


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] cordova-plugin-contacts pull request: Fix for the specs 26&27 to u...

Posted by riknoll <gi...@git.apache.org>.
Github user riknoll commented on a diff in the pull request:

    https://github.com/apache/cordova-plugin-contacts/pull/112#discussion_r58091953
  
    --- Diff: tests/tests.js ---
    @@ -589,10 +589,8 @@ exports.defineAutoTests = function() {
                     removeContactsByFields(["note"], "DeleteMe", function() {
                         contact.save(function(c_obj) {
                             var findWin = function(cs) {
    -                            // update to have proper saved id
    -                            contact = cs[0];
                                 expect(cs.length).toBe(1);
    -                            done();
    +                            done(cs[0]);
    --- End diff --
    
    The docs don't say anything about it (but the Jasmine docs are also pretty lackluster). My guess is that the parameter would just get ignored.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] cordova-plugin-contacts pull request: Fix for the specs 26&27 to u...

Posted by riknoll <gi...@git.apache.org>.
Github user riknoll commented on the pull request:

    https://github.com/apache/cordova-plugin-contacts/pull/112#issuecomment-203714929
  
    LGTM. I'll merge this tomorrow morning


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] cordova-plugin-contacts pull request: Fix for the specs 26&27 to u...

Posted by omefire <gi...@git.apache.org>.
Github user omefire commented on the pull request:

    https://github.com/apache/cordova-plugin-contacts/pull/112#issuecomment-204081620
  
    Weird thing is that these tests still fail locally for me. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] cordova-plugin-contacts pull request: Fix for the specs 26&27 to u...

Posted by sarangan12 <gi...@git.apache.org>.
Github user sarangan12 commented on a diff in the pull request:

    https://github.com/apache/cordova-plugin-contacts/pull/112#discussion_r58097905
  
    --- Diff: tests/tests.js ---
    @@ -589,10 +589,8 @@ exports.defineAutoTests = function() {
                     removeContactsByFields(["note"], "DeleteMe", function() {
                         contact.save(function(c_obj) {
                             var findWin = function(cs) {
    -                            // update to have proper saved id
    -                            contact = cs[0];
                                 expect(cs.length).toBe(1);
    -                            done();
    +                            done(cs[0]);
    --- End diff --
    
    @omefire @riknoll In case of specs 26 &27 - they are bound to different functions. But for specs 25, 28, 29 - they are bound to actual done functions (in which case the passed in parameter will just be ignored) 
    
    But, the name need not be done. I agree. I changed it to callbacl and updated the PR. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] cordova-plugin-contacts pull request: Fix for the specs 26&27 to u...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/cordova-plugin-contacts/pull/112


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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