[
https://issues.apache.org/jira/browse/CB-8808?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14488284#comment-14488284
]
ASF subversion and git services commented on CB-8808:
-----------------------------------------------------
Commit ea6624eb91389b418cfdb7b943cfb182efe968b6 in
cordova-plugin-battery-status's branch refs/heads/master from [~purplecabbage]
[
https://git-wip-us.apache.org/repos/asf?p=cordova-plugin-battery-status.git;h=ea6624e
]
Merge branch 'CB-8808' of
https://github.com/MSOpenTech/cordova-plugin-battery-status
> 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]