cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From purplecabb...@apache.org
Subject [2/2] git commit: Merge renamed tests dir
Date Tue, 19 Aug 2014 01:50:55 GMT
Merge renamed tests dir


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

Branch: refs/heads/master
Commit: e364377d4f456f196b85b61ab68bb203867ebaee
Parents: f833c39 395302e
Author: Edna Morales <ednamorales@ednas-mbp-2.raleigh.ibm.com>
Authored: Wed Aug 13 13:24:50 2014 -0400
Committer: Edna Morales <ednamorales@ednas-mbp-2.raleigh.ibm.com>
Committed: Wed Aug 13 13:24:50 2014 -0400

----------------------------------------------------------------------
 RELEASENOTES.md  |  6 +++++
 plugin.xml       |  2 +-
 test/tests.js    | 62 ---------------------------------------------------
 tests/plugin.xml | 29 ++++++++++++++++++++++++
 tests/tests.js   | 62 +++++++++++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 98 insertions(+), 63 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/blob/e364377d/tests/tests.js
----------------------------------------------------------------------
diff --cc tests/tests.js
index 0000000,3f785ec..8c4d22b
mode 000000,100644..100644
--- a/tests/tests.js
+++ b/tests/tests.js
@@@ -1,0 -1,55 +1,62 @@@
+ /*
+  *
+  * Licensed to the Apache Software Foundation (ASF) under one
+  * or more contributor license agreements.  See the NOTICE file
+  * distributed with this work for additional information
+  * regarding copyright ownership.  The ASF licenses this file
+  * to you under the Apache License, Version 2.0 (the
+  * "License"); you may not use this file except in compliance
+  * with the License.  You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing,
+  * software distributed under the License is distributed on an
+  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  * KIND, either express or implied.  See the License for the
+  * specific language governing permissions and limitations
+  * under the License.
+  *
+ */
+ 
+ exports.defineAutoTest = function () {
+     describe('Splashscreen (cordova)', function () {
+         it("splashscreen.spec.1 should exist", function () {
+             expect(navigator.splashscreen).toBeDefined();
+         });
+ 
+         it("splashscreen.spec.2 exec method should exist", function () {
+             expect(navigator.splashscreen.show).toBeDefined();
+             expect(typeof navigator.splashscreen.show).toBe('function');
+         });
+ 
+         it("splashscreen.spec.3 exec method should exist", function () {
+             expect(navigator.splashscreen.hide).toBeDefined();
+             expect(typeof navigator.splashscreen.hide).toBe('function');
+         });
+     });
+ };
+ 
+ exports.defineManualTests = function (contentEl, createActionButton) {
+     function showFor(duration) {
+         navigator.splashscreen.show();
+         window.setTimeout(function () {
+             navigator.splashscreen.hide();
+         }, 1000 * duration);
+     }
+ 
++    contentEl.innerHTML = '<h1>Splashscreen Tests</h1>' +
++        '<h3>Note for WP: AutoHideSplashScreen must be set to false in config.xml</h3>'
+
++        '<div id="show1"></div>' +
++        'Expected result: Will show the Cordova splashscreen for 1 second' +
++        '</p> <div id="show5"></div>' +
++        'Expected result: Will show the Cordova splashscreen for 5 seconds';
++
+     createActionButton('Show for 1 second', function () {
+         showFor(1);
 -    });
++    }, 'show1');
+ 
+     createActionButton('Show for 5 seconds', function () {
+         showFor(5);
 -    });
++    }, 'show5');
+ };


Mime
View raw message