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 2015/06/17 02:15:06 UTC

cordova-plugin-statusbar git commit: add auto-tests for basic api

Repository: cordova-plugin-statusbar
Updated Branches:
  refs/heads/master 8e1e88a30 -> a345f376b


add auto-tests for basic api


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/a345f376
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-statusbar/tree/a345f376
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-statusbar/diff/a345f376

Branch: refs/heads/master
Commit: a345f376b97a449a930826999e7cc2234a268390
Parents: 8e1e88a
Author: Jesse MacFadyen <pu...@gmail.com>
Authored: Tue Jun 16 17:15:00 2015 -0700
Committer: Jesse MacFadyen <pu...@gmail.com>
Committed: Tue Jun 16 17:15:00 2015 -0700

----------------------------------------------------------------------
 tests/tests.js | 41 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 41 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-statusbar/blob/a345f376/tests/tests.js
----------------------------------------------------------------------
diff --git a/tests/tests.js b/tests/tests.js
index 8b409ec..b66c5cc 100644
--- a/tests/tests.js
+++ b/tests/tests.js
@@ -19,6 +19,47 @@
  *
 */
 
+exports.defineAutoTests = function () {
+    describe("StatusBar", function () {
+        it("statusbar.spec.1 should exist", function() {
+            expect(window.StatusBar).toBeDefined();
+        });
+
+        it("statusbar.spec.2 should have show|hide methods", function() {
+            expect(window.StatusBar.show).toBeDefined();
+            expect(typeof window.StatusBar.show).toBe("function");
+
+            expect(window.StatusBar.hide).toBeDefined();
+            expect(typeof window.StatusBar.hide).toBe("function");
+        });
+
+        it("statusbar.spec.3 should have set backgroundColor methods", function() {
+            expect(window.StatusBar.backgroundColorByName).toBeDefined();
+            expect(typeof window.StatusBar.backgroundColorByName).toBe("function");
+
+            expect(window.StatusBar.backgroundColorByHexString).toBeDefined();
+            expect(typeof window.StatusBar.backgroundColorByHexString).toBe("function");
+        });
+
+        it("statusbar.spec.4 should have set style methods", function() {
+            expect(window.StatusBar.styleBlackTranslucent).toBeDefined();
+            expect(typeof window.StatusBar.styleBlackTranslucent).toBe("function");
+
+            expect(window.StatusBar.styleDefault).toBeDefined();
+            expect(typeof window.StatusBar.styleDefault).toBe("function");
+
+            expect(window.StatusBar.styleLightContent).toBeDefined();
+            expect(typeof window.StatusBar.styleLightContent).toBe("function");
+
+            expect(window.StatusBar.styleBlackOpaque).toBeDefined();
+            expect(typeof window.StatusBar.styleBlackOpaque).toBe("function");
+
+            expect(window.StatusBar.overlaysWebView).toBeDefined();
+            expect(typeof window.StatusBar.overlaysWebView).toBe("function");
+        });
+    });
+};
+
 exports.defineManualTests = function (contentEl, createActionButton) {
     function log(msg) {
         var el = document.getElementById("info");


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