You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by "Shazron Abdullah (JIRA)" <ji...@apache.org> on 2012/05/01 01:09:47 UTC

[jira] [Created] (CB-609) Contact update test fails when it should pass

Shazron Abdullah created CB-609:
-----------------------------------

             Summary: Contact update test fails when it should pass
                 Key: CB-609
                 URL: https://issues.apache.org/jira/browse/CB-609
             Project: Apache Callback
          Issue Type: Bug
          Components: iOS, mobile-spec
    Affects Versions: 1.7.0
            Reporter: Shazron Abdullah
            Assignee: Shazron Abdullah


This test fails on iOS when it should pass: https://github.com/apache/incubator-cordova-mobile-spec/blob/master/autotest/tests/contacts.tests.js#L313

I have verified that the method does return to the save callback (in Obj-C), and also created a new project and:
1. created and saved a contact
2. From the contact returned from the save callback of (1), I updated the contact and saved again
3. The save callback from the save in (2) was ok

Perhaps this is a timing issue, not sure.

{code}
    var myContact = null;
	function onDeviceReady()
	{
        // create a new contact object
        myContact = navigator.contacts.create();
        myContact.displayName = "Plumber";
        myContact.nickname = "Plumber";       //specify both to support all devices
        
        // populate some fields
        var name = new ContactName();
        name.givenName = "Jane";
        name.familyName = "Doe";
        myContact.name = name;
        
        // save to device
        myContact.save(onSuccess,onError);        
	}
        
    function onSuccess(contact) {
        alert("Save Success");
        myContact = contact;
        
        
        myContact.note = "an UPDATED note";
        myContact.save(onSuccess2,onError2);        
    };
    
    function onError(contactError) {
        alert("Error = " + contactError.code);
    };
    
    function onSuccess2(contact) {
        alert("Update Save Success");
    };
    
    function onError2(contactError) {
        alert("Error2 = " + contactError.code);
    };

{code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Assigned] (CB-609) Contact update test fails when it should pass

Posted by "Shazron Abdullah (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CB-609?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Shazron Abdullah reassigned CB-609:
-----------------------------------

    Assignee: Filip Maj  (was: Shazron Abdullah)

hey Fil, can you take a look? I looked at the test it looks fine but I don't know why its failing.
                
> Contact update test fails when it should pass
> ---------------------------------------------
>
>                 Key: CB-609
>                 URL: https://issues.apache.org/jira/browse/CB-609
>             Project: Apache Callback
>          Issue Type: Bug
>          Components: iOS, mobile-spec
>    Affects Versions: 1.7.0
>            Reporter: Shazron Abdullah
>            Assignee: Filip Maj
>
> This test fails on iOS when it should pass: https://github.com/apache/incubator-cordova-mobile-spec/blob/master/autotest/tests/contacts.tests.js#L313
> I have verified that the method does return to the save callback (in Obj-C), and also created a new project and:
> 1. created and saved a contact
> 2. From the contact returned from the save callback of (1), I updated the contact and saved again
> 3. The save callback from the save in (2) was ok
> Perhaps this is a timing issue, not sure.
> {code}
>     var myContact = null;
> 	function onDeviceReady()
> 	{
>         // create a new contact object
>         myContact = navigator.contacts.create();
>         myContact.displayName = "Plumber";
>         myContact.nickname = "Plumber";       //specify both to support all devices
>         
>         // populate some fields
>         var name = new ContactName();
>         name.givenName = "Jane";
>         name.familyName = "Doe";
>         myContact.name = name;
>         
>         // save to device
>         myContact.save(onSuccess,onError);        
> 	}
>         
>     function onSuccess(contact) {
>         alert("Save Success");
>         myContact = contact;
>         
>         
>         myContact.note = "an UPDATED note";
>         myContact.save(onSuccess2,onError2);        
>     };
>     
>     function onError(contactError) {
>         alert("Error = " + contactError.code);
>     };
>     
>     function onSuccess2(contact) {
>         alert("Update Save Success");
>     };
>     
>     function onError2(contactError) {
>         alert("Error2 = " + contactError.code);
>     };
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Closed] (CB-609) Contact update test fails when it should pass

Posted by "Becky Gibson (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CB-609?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Becky Gibson closed CB-609.
---------------------------

       Resolution: Cannot Reproduce
    Fix Version/s: 1.8.0
         Assignee: Becky Gibson  (was: Filip Maj)

now passing with rewritten tests
                
> Contact update test fails when it should pass
> ---------------------------------------------
>
>                 Key: CB-609
>                 URL: https://issues.apache.org/jira/browse/CB-609
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS, mobile-spec
>    Affects Versions: 1.7.0
>            Reporter: Shazron Abdullah
>            Assignee: Becky Gibson
>             Fix For: 1.8.0
>
>
> This test fails on iOS when it should pass: https://github.com/apache/incubator-cordova-mobile-spec/blob/master/autotest/tests/contacts.tests.js#L313
> I have verified that the method does return to the save callback (in Obj-C), and also created a new project and:
> 1. created and saved a contact
> 2. From the contact returned from the save callback of (1), I updated the contact and saved again
> 3. The save callback from the save in (2) was ok
> Perhaps this is a timing issue, not sure.
> {code}
>     var myContact = null;
> 	function onDeviceReady()
> 	{
>         // create a new contact object
>         myContact = navigator.contacts.create();
>         myContact.displayName = "Plumber";
>         myContact.nickname = "Plumber";       //specify both to support all devices
>         
>         // populate some fields
>         var name = new ContactName();
>         name.givenName = "Jane";
>         name.familyName = "Doe";
>         myContact.name = name;
>         
>         // save to device
>         myContact.save(onSuccess,onError);        
> 	}
>         
>     function onSuccess(contact) {
>         alert("Save Success");
>         myContact = contact;
>         
>         
>         myContact.note = "an UPDATED note";
>         myContact.save(onSuccess2,onError2);        
>     };
>     
>     function onError(contactError) {
>         alert("Error = " + contactError.code);
>     };
>     
>     function onSuccess2(contact) {
>         alert("Update Save Success");
>     };
>     
>     function onError2(contactError) {
>         alert("Error2 = " + contactError.code);
>     };
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CB-609) Contact update test fails when it should pass

Posted by "Becky Gibson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-609?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13281784#comment-13281784 ] 

Becky Gibson commented on CB-609:
---------------------------------

tests have been rewritten to use Jasmine.  All contacts tests in mobile-spec are passing on iphone 4S with 5.1.1 and in the simulator.  Closing.
                
> Contact update test fails when it should pass
> ---------------------------------------------
>
>                 Key: CB-609
>                 URL: https://issues.apache.org/jira/browse/CB-609
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS, mobile-spec
>    Affects Versions: 1.7.0
>            Reporter: Shazron Abdullah
>            Assignee: Filip Maj
>             Fix For: 1.8.0
>
>
> This test fails on iOS when it should pass: https://github.com/apache/incubator-cordova-mobile-spec/blob/master/autotest/tests/contacts.tests.js#L313
> I have verified that the method does return to the save callback (in Obj-C), and also created a new project and:
> 1. created and saved a contact
> 2. From the contact returned from the save callback of (1), I updated the contact and saved again
> 3. The save callback from the save in (2) was ok
> Perhaps this is a timing issue, not sure.
> {code}
>     var myContact = null;
> 	function onDeviceReady()
> 	{
>         // create a new contact object
>         myContact = navigator.contacts.create();
>         myContact.displayName = "Plumber";
>         myContact.nickname = "Plumber";       //specify both to support all devices
>         
>         // populate some fields
>         var name = new ContactName();
>         name.givenName = "Jane";
>         name.familyName = "Doe";
>         myContact.name = name;
>         
>         // save to device
>         myContact.save(onSuccess,onError);        
> 	}
>         
>     function onSuccess(contact) {
>         alert("Save Success");
>         myContact = contact;
>         
>         
>         myContact.note = "an UPDATED note";
>         myContact.save(onSuccess2,onError2);        
>     };
>     
>     function onError(contactError) {
>         alert("Error = " + contactError.code);
>     };
>     
>     function onSuccess2(contact) {
>         alert("Update Save Success");
>     };
>     
>     function onError2(contactError) {
>         alert("Error2 = " + contactError.code);
>     };
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira