Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-8808

Battery.spec.3.2 fails on windows phone 8.1

    XMLWordPrintableJSON

    Details

      Description

      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:

      navigator.battery._status({
          level : 5,
          isPlugged : false
      });
      
      window.addEventListener("batterylow", onEvent, false);
      
      navigator.battery._status({
          level: 20,
          isPlugged: false
      });
      

      Event listener should be added before first mock so that windows wouldn't have the time to change the battery status in between mocks.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              alsorokin Alexander Sorokin
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: