cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From purplecabb...@apache.org
Subject [1/5] git commit: CB-6965. Port notification tests to test-framework
Date Thu, 07 Aug 2014 20:04:14 GMT
Repository: cordova-plugin-dialogs
Updated Branches:
  refs/heads/master eecde889d -> 423ee171f


CB-6965. Port notification tests to test-framework

Ported notification test from mobilespec to the new test-framework in
jasmine 2.0
Added test folder.
Added tests.js file inside the test folder.


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

Branch: refs/heads/master
Commit: d00470f79a926ab11801cfec12eb38db28ea9ba7
Parents: fd874c4
Author: javierbb31 <javier.becerra.ber@gmail.com>
Authored: Mon Jun 30 15:56:43 2014 -0500
Committer: javierbb31 <javier.becerra.ber@gmail.com>
Committed: Mon Jun 30 15:56:43 2014 -0500

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


http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/blob/d00470f7/test/tests.js
----------------------------------------------------------------------
diff --git a/test/tests.js b/test/tests.js
new file mode 100644
index 0000000..a3df525
--- /dev/null
+++ b/test/tests.js
@@ -0,0 +1,48 @@
+/*
+ *
+ * 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.defineAutoTests = function() {
+    describe('Notification (navigator.notification)', function () {
+        it("should exist", function() {
+                    expect(navigator.notification).toBeDefined();
+        });
+
+        it("should contain a beep function", function() {
+            expect(typeof navigator.notification.beep).toBeDefined();
+            expect(typeof navigator.notification.beep).toBe("function");
+        });
+
+        it("should contain an alert function", function() {
+            expect(typeof navigator.notification.alert).toBeDefined();
+            expect(typeof navigator.notification.alert).toBe("function");
+        });
+
+        it("should contain a confirm function", function() {
+            expect(typeof navigator.notification.confirm).toBeDefined();
+            expect(typeof navigator.notification.confirm).toBe("function");
+        });
+        
+        it("should contain a prompt function", function() {
+            expect(typeof navigator.notification.prompt).toBeDefined();
+            expect(typeof navigator.notification.prompt).toBe("function");
+        });
+    });
+};


Mime
View raw message