cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject [1/2] cordova-plugin-geolocation git commit: CB-8094 Pended auto tests for Windows Store since they require user interaction
Date Tue, 02 Dec 2014 01:09:33 GMT
Repository: cordova-plugin-geolocation
Updated Branches:
  refs/heads/master e3f968599 -> 41233f66f


CB-8094 Pended auto tests for Windows Store since they require user interaction


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation/commit/67bd0fcc
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation/tree/67bd0fcc
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation/diff/67bd0fcc

Branch: refs/heads/master
Commit: 67bd0fcc47aa49cdc0db610f7a0db2aeefd42c31
Parents: 7dc4400
Author: maria.bukharina <maria.bukharina@akvelon.com>
Authored: Fri Nov 28 13:53:56 2014 +0300
Committer: maria.bukharina <maria.bukharina@akvelon.com>
Committed: Mon Dec 1 17:53:14 2014 +0300

----------------------------------------------------------------------
 tests/tests.js | 24 ++++++++++++++++++++++--
 1 file changed, 22 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation/blob/67bd0fcc/tests/tests.js
----------------------------------------------------------------------
diff --git a/tests/tests.js b/tests/tests.js
index cb187ae..4a99991 100644
--- a/tests/tests.js
+++ b/tests/tests.js
@@ -1,4 +1,4 @@
-/*
+/*
  *
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -27,6 +27,7 @@ exports.defineAutoTests = function () {
         expect(true).toBe(true);
         done();
     };
+    var isWindowsStore = (cordova.platformId == "windows8") || (cordova.platformId == "windows"
&& !WinJS.Utilities.isPhone);
 
     describe('Geolocation (navigator.geolocation)', function () {
 
@@ -56,6 +57,11 @@ exports.defineAutoTests = function () {
         describe('error callback', function () {
 
             it("geolocation.spec.5 should be called if we set timeout to 0 and maximumAge
to a very small number", function (done) {
+                // this test asks for using geolocation and interrupts autotests running.
+                // That's why we have to pending that for Windows Store 8.0/8.1 apps
+                if (isWindowsStore) {
+                    pending();
+                }
                 navigator.geolocation.getCurrentPosition(
                     fail.bind(null, done),
                     succeed.bind(null, done),
@@ -70,6 +76,11 @@ exports.defineAutoTests = function () {
         describe('success callback', function () {
 
             it("geolocation.spec.6 should be called with a Position object", function (done)
{
+                // this test asks for using geolocation and interrupts autotests running.
+                // That's why we have to pending that for Windows Store 8.0/8.1 apps
+                if (isWindowsStore) {
+                    pending();
+                }
                 navigator.geolocation.getCurrentPosition(function (p) {
                     expect(p.coords).toBeDefined();
                     expect(p.timestamp).toBeDefined();
@@ -95,6 +106,11 @@ exports.defineAutoTests = function () {
             });
 
             it("geolocation.spec.7 should be called if we set timeout to 0 and maximumAge
to a very small number", function (done) {
+                // this test asks for using geolocation and interrupts autotests running.
+                // That's why we have to pending that for Windows Store 8.0/8.1 apps
+                if (isWindowsStore) {
+                    pending();
+                }
                 errorWatch = navigator.geolocation.watchPosition(
                     fail.bind(null, done),
                     succeed.bind(null, done),
@@ -114,7 +130,11 @@ exports.defineAutoTests = function () {
             });
 
             it("geolocation.spec.8 should be called with a Position object", function (done)
{
-
+                // this test asks for using geolocation and interrupts autotests running.
+                // That's why we have to pending that for Windows Store 8.0/8.1 apps
+                if (isWindowsStore) {
+                    pending();
+                }
                 successWatch = navigator.geolocation.watchPosition(
                     function (p) {
                         expect(p.coords).toBeDefined();


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


Mime
View raw message