[ 
https://issues.apache.org/jira/browse/CB-8808?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14488285#comment-14488285
 ] 

ASF GitHub Bot commented on CB-8808:
------------------------------------

Github user asfgit closed the pull request at:

    https://github.com/apache/cordova-plugin-battery-status/pull/22


> 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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to