ripple-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Julian Horn (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (RIPPLE-94) Some errors in emulation of Contacts and Console APIs
Date Thu, 03 Sep 2015 19:29:45 GMT

     [ https://issues.apache.org/jira/browse/RIPPLE-94?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Julian Horn resolved RIPPLE-94.
-------------------------------
    Resolution: Fixed

This issue was fixed in PR that was folded in as commit id
39a027625248734496de46d46339533356a7a29a.

> Some errors in emulation of Contacts and Console APIs
> -----------------------------------------------------
>
>                 Key: RIPPLE-94
>                 URL: https://issues.apache.org/jira/browse/RIPPLE-94
>             Project: Apache Ripple
>          Issue Type: Bug
>            Reporter: Julian Horn
>            Assignee: Julian Horn
>            Priority: Minor
>
> The Cordova Mobile Spec test app provides a framework for running tests against plugins.
 At Intel we ran this framework against the emulator and discovered several defects in the
Ripple emulation for various APIs.
> This JIRA reports two specific errors in the emulation of the Contacts plugin.  I have
not supplied a specific test case; to see the issue you really have to run the Mobile spec
test.
> 1) Deleting an email from a contact
> A contact is associated with an array of email addresses.  If you assign one of these
email addresses to a null string, then saving the contact should reduce the size of the array.
 Ripple wasn't doing this.
> 2) Wrong error "code" when deleting a non-existent contact
> When you attempt to delete a non-existent contact, Ripple was invoking the "error" callback
passed to exec as follows:
> {code}error({code: 3, message: "could not find contact with id (" + id + ")"}); // PENDING_OPERATION_ERROR{code}
> This is wrong for two reasons.  First, the caller (the JavaScript layer) has passed in
an error callback that expects to receive just the integer error code, not this object.  Second,
the correct error code is not 3 (PENDING_OPERATION_ERROR) but 0 (UNKNOWN_ERROR), at least
according to the test in the plugin.
> In addition, there is a problem with the emulation of the Console native service.  Here
again there are two errors.  One is that the Console plugin invokes a native service named
"Console", not "Debug Console".  So there's a missing entry in the Emulator array in bridge.js.
 Second, the object invoked from exec needs a function called logLevel.
> The Mobile Spec test invokes console.logLevel in the deviceready event handler, so you
always get that annoying "missing API" dialog.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message