You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by pu...@apache.org on 2014/08/19 03:52:09 UTC

[1/2] git commit: added documentation for manual tests, moved background color test below overlay test

Repository: cordova-plugin-statusbar
Updated Branches:
  refs/heads/master d109b7ade -> 03fbd9ded


added documentation for manual tests, moved background color test below overlay test


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

Branch: refs/heads/master
Commit: 0d52e1bf10101e6625bddc49579c7d0159fc4a73
Parents: 83697e5
Author: Edna Morales <ed...@ednas-mbp-2.raleigh.ibm.com>
Authored: Tue Jul 29 11:53:53 2014 -0400
Committer: Edna Morales <ed...@ednas-mbp-2.raleigh.ibm.com>
Committed: Tue Jul 29 11:53:53 2014 -0400

----------------------------------------------------------------------
 test/tests.js | 18 ++++++++++++------
 1 file changed, 12 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-statusbar/blob/0d52e1bf/test/tests.js
----------------------------------------------------------------------
diff --git a/test/tests.js b/test/tests.js
index e49ddb9..8b409ec 100644
--- a/test/tests.js
+++ b/test/tests.js
@@ -64,11 +64,17 @@ exports.defineManualTests = function (contentEl, createActionButton) {
     contentEl.innerHTML = '<div id="info"></div>' +
         'Also: tapping bar on iOS should emit a log.' +
         '<div id="action-show"></div>' +
-        '<div id="action-hide"></div>' +
-        '<div id="action-color1"></div>' +
-        '<div id="action-color2"></div>' +
-        '<div id="action-color3"></div>' +
-        '<div id="action-overlays"></div>';
+        'Expected result: Status bar will be visible' +
+        '</p> <div id="action-hide"></div>' +
+        'Expected result: Status bar will be hidden' +
+        '</p> <div id="action-color2"></div>' +
+        'Expected result: Status bar text will be a light (white) color' +
+        '</p> <div id="action-color3"></div>' +
+        'Expected result: Status bar text will be a dark (black) color' +
+        '</p> <div id="action-overlays"></div>' +
+        'Expected result:<br>Overlay true = status bar will lay on top of web view content<br>Overlay false = status bar will be separate from web view and will not cover content' +
+        '</p> <div id="action-color1"></div>' +
+        'Expected result: If overlay false, background color for status bar will be red';
 
     log('StatusBar.isVisible=' + StatusBar.isVisible);
     window.addEventListener('statusTap', function () {
@@ -83,7 +89,7 @@ exports.defineManualTests = function (contentEl, createActionButton) {
         doHide();
     }, 'action-hide');
 
-    createActionButton("Style=red", function () {
+    createActionButton("Style=red (background)", function () {
         doColor1();
     }, 'action-color1');
 


[2/2] git commit: Merge renamed tests dir

Posted by pu...@apache.org.
Merge renamed tests dir


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

Branch: refs/heads/master
Commit: 03fbd9dedfc3d7560b991ed56a30c6eb9bc99a4d
Parents: 0d52e1b d109b7a
Author: Edna Morales <ed...@ednas-mbp-2.raleigh.ibm.com>
Authored: Wed Aug 13 13:27:10 2014 -0400
Committer: Edna Morales <ed...@ednas-mbp-2.raleigh.ibm.com>
Committed: Wed Aug 13 13:27:10 2014 -0400

----------------------------------------------------------------------
 LICENSE          | 202 ++++++++++++++++++++++++++++++++++++++++++
 NOTICE           |   5 ++
 RELEASENOTES.md  |  10 +++
 doc/pl/index.md  | 238 ++++++++++++++++++++++++++++++++++++++++++++++++++
 doc/ru/index.md  |  10 +--
 plugin.xml       |   2 +-
 test/tests.js    | 107 -----------------------
 tests/plugin.xml |  31 +++++++
 tests/tests.js   | 107 +++++++++++++++++++++++
 9 files changed, 599 insertions(+), 113 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-statusbar/blob/03fbd9de/tests/tests.js
----------------------------------------------------------------------
diff --cc tests/tests.js
index 0000000,e49ddb9..8b409ec
mode 000000,100644..100644
--- a/tests/tests.js
+++ b/tests/tests.js
@@@ -1,0 -1,101 +1,107 @@@
+ /*
+  *
+  * 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.defineManualTests = function (contentEl, createActionButton) {
+     function log(msg) {
+         var el = document.getElementById("info");
+         var logLine = document.createElement('div');
+         logLine.innerHTML = msg;
+         el.appendChild(logLine);
+     }
+ 
+     function doShow() {
+         StatusBar.show();
+         log('StatusBar.isVisible=' + StatusBar.isVisible);
+     }
+ 
+     function doHide() {
+         StatusBar.hide();
+         log('StatusBar.isVisible=' + StatusBar.isVisible);
+     }
+ 
+     function doColor1() {
+         log('set color=red');
+         StatusBar.backgroundColorByName('red');
+     }
+ 
+     function doColor2() {
+         log('set style=translucent black');
+         StatusBar.styleBlackTranslucent();
+     }
+ 
+     function doColor3() {
+         log('set style=default');
+         StatusBar.styleDefault();
+     }
+ 
+     var showOverlay = true;
+     function doOverlay() {
+         showOverlay = !showOverlay;
+         StatusBar.overlaysWebView(showOverlay);
+         log('Set overlay=' + showOverlay);
+     }
+ 
+     /******************************************************************************/
+ 
+     contentEl.innerHTML = '<div id="info"></div>' +
+         'Also: tapping bar on iOS should emit a log.' +
+         '<div id="action-show"></div>' +
 -        '<div id="action-hide"></div>' +
 -        '<div id="action-color1"></div>' +
 -        '<div id="action-color2"></div>' +
 -        '<div id="action-color3"></div>' +
 -        '<div id="action-overlays"></div>';
++        'Expected result: Status bar will be visible' +
++        '</p> <div id="action-hide"></div>' +
++        'Expected result: Status bar will be hidden' +
++        '</p> <div id="action-color2"></div>' +
++        'Expected result: Status bar text will be a light (white) color' +
++        '</p> <div id="action-color3"></div>' +
++        'Expected result: Status bar text will be a dark (black) color' +
++        '</p> <div id="action-overlays"></div>' +
++        'Expected result:<br>Overlay true = status bar will lay on top of web view content<br>Overlay false = status bar will be separate from web view and will not cover content' +
++        '</p> <div id="action-color1"></div>' +
++        'Expected result: If overlay false, background color for status bar will be red';
+ 
+     log('StatusBar.isVisible=' + StatusBar.isVisible);
+     window.addEventListener('statusTap', function () {
+         log('tap!');
+     }, false);
+ 
+     createActionButton("Show", function () {
+         doShow();
+     }, 'action-show');
+ 
+     createActionButton("Hide", function () {
+         doHide();
+     }, 'action-hide');
+ 
 -    createActionButton("Style=red", function () {
++    createActionButton("Style=red (background)", function () {
+         doColor1();
+     }, 'action-color1');
+ 
+     createActionButton("Style=translucent black", function () {
+         doColor2();
+     }, 'action-color2');
+ 
+     createActionButton("Style=default", function () {
+         doColor3();
+     }, 'action-color3');
+ 
+     createActionButton("Toggle Overlays", function () {
+         doOverlay();
+     }, 'action-overlays');
+ };