cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexander Sorokin (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (CB-8808) Battery.spec.3.2 fails on windows phone 8.1
Date Mon, 13 Apr 2015 09:31:20 GMT

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

Alexander Sorokin resolved CB-8808.
-----------------------------------
    Resolution: Fixed

> 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


Mime
View raw message