You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2015/04/09 10:59:12 UTC
[jira] [Commented] (CB-8808) Battery.spec.3.2 fails on windows
phone 8.1
[ https://issues.apache.org/jira/browse/CB-8808?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14486997#comment-14486997 ]
ASF GitHub Bot commented on CB-8808:
------------------------------------
GitHub user alsorokin opened a pull request:
https://github.com/apache/cordova-plugin-battery-status/pull/22
CB-8808 Fixed tests to pass on Windows Phone 8.1
https://issues.apache.org/jira/browse/CB-8808
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/MSOpenTech/cordova-plugin-battery-status CB-8808
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/cordova-plugin-battery-status/pull/22.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 #22
----
commit af08f66c77107bf747a5a6b47168df8f5beb99e4
Author: alsorokin <al...@akvelon.com>
Date: 2015-04-07T14:45:56Z
CB-8808 Fixed tests to pass on Windows Phone 8.1
----
> Battery.spec.3.2 fails on windows phone 8.1
> -------------------------------------------
>
> Key: CB-8808
> URL: https://issues.apache.org/jira/browse/CB-8808
> Project: Apache Cordova
> Issue Type: Bug
> Components: Plugin Battery Status, Windows
> Reporter: Alexander Sorokin
>
> This failure is happening because the tests assume that battery status wouldn't change between mocks, when event listener is added, but it actually changes back to 100% on windows phone 8.1:
> {code}
> navigator.battery._status({
> level : 5,
> isPlugged : false
> });
> window.addEventListener("batterylow", onEvent, false);
> navigator.battery._status({
> level: 20,
> isPlugged: false
> });
> {code}
> Event listener should be added before first mock so that windows wouldn't have the time to change the battery status in between mocks.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org