cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From purplecabb...@apache.org
Subject [4/5] git commit: Renamed test dir, added nested plugin.xml
Date Thu, 07 Aug 2014 20:04:17 GMT
Renamed test dir, added nested plugin.xml


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

Branch: refs/heads/master
Commit: 0527b774af03edfdaa41dea5fa12a39f927f33d1
Parents: 1af76d8
Author: Staci Cooper <smcooper@us.ibm.com>
Authored: Fri Aug 1 16:33:07 2014 -0400
Committer: Staci Cooper <smcooper@us.ibm.com>
Committed: Fri Aug 1 16:33:07 2014 -0400

----------------------------------------------------------------------
 test/tests.js    | 170 --------------------------------------------------
 tests/plugin.xml |  29 +++++++++
 tests/tests.js   | 170 ++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 199 insertions(+), 170 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/blob/0527b774/test/tests.js
----------------------------------------------------------------------
diff --git a/test/tests.js b/test/tests.js
deleted file mode 100644
index 99ddf6e..0000000
--- a/test/tests.js
+++ /dev/null
@@ -1,170 +0,0 @@
-/*
- *
- * 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");
-        });
-    });
-};
-
-/******************************************************************************/
-/******************************************************************************/
-/******************************************************************************/
-
-exports.defineManualTests = function (contentEl, createActionButton) {
-    var logMessage = function (message) {
-        var log = document.getElementById('info');
-        var logLine = document.createElement('div');
-        logLine.innerHTML = message;
-        log.appendChild(logLine);
-    }
-
-    var clearLog = function () {
-        var log = document.getElementById('info');
-        log.innerHTML = '';
-    }
-
-    var beep = function () {
-        console.log("beep()");
-        navigator.notification.beep(3);
-    };
-
-    var alertDialog = function (message, title, button) {
-        console.log("alertDialog()");
-        navigator.notification.alert(message,
-            function () {
-                console.log("Alert dismissed.");
-            },
-            title, button);
-        console.log("After alert");
-    };
-
-    var confirmDialogA = function (message, title, buttons) {
-        clearLog();
-        navigator.notification.confirm(message,
-            function (r) {
-                if (r === 0) {
-                    logMessage("Dismissed dialog without making a selection.");
-                    console.log("Dismissed dialog without making a selection.");
-                } else {
-                    console.log("You selected " + r);
-                    logMessage("You selected " + (buttons.split(","))[r - 1]);
-                }
-            },
-            title,
-            buttons);
-    };
-
-    var confirmDialogB = function (message, title, buttons) {
-        clearLog();
-        navigator.notification.confirm(message,
-            function (r) {
-                if (r === 0) {
-                    logMessage("Dismissed dialog without making a selection.");
-                    console.log("Dismissed dialog without making a selection.");
-                } else {
-                    console.log("You selected " + r);
-                    logMessage("You selected " + buttons[r - 1]);
-                }
-            },
-            title,
-            buttons);
-    };
-
-    var promptDialog = function (message, title, buttons) {
-        clearLog();
-        navigator.notification.prompt(message,
-            function (r) {
-                if (r && r.buttonIndex === 0) {
-                    var msg = "Dismissed dialog";
-                    if (r.input1) {
-                        msg += " with input: " + r.input1
-                    }
-                    logMessage(msg);
-                    console.log(msg);
-                } else {
-                    console.log("You selected " + r.buttonIndex + " and entered: " + r.input1);
-                    logMessage("You selected " + buttons[r.buttonIndex - 1] + " and entered:
" + r.input1);
-                }
-            },
-            title,
-            buttons);
-    };
-
-    /******************************************************************************/
-
-    contentEl.innerHTML = '<div id="info"></div>' +
-        '<div id="actions"></div>';
-
-    createActionButton('Beep', function () {
-        beep();
-    }, 'actions');
-
-    createActionButton('Alert Dialog', function () {
-        alertDialog('You pressed alert.', 'Alert Dialog', 'Continue');
-    }, 'actions');
-
-    createActionButton('Confirm Dialog - Deprecated', function () {
-        confirmDialogA('You pressed confirm.', 'Confirm Dialog', 'Yes,No,Maybe');
-    }, 'actions');
-
-    createActionButton('Confirm Dialog', function () {
-        confirmDialogB('You pressed confirm.', 'Confirm Dialog', ['Yes', 'No', 'Maybe, Not
Sure']);
-    }, 'actions');
-
-    createActionButton('Prompt Dialog', function () {
-        promptDialog('You pressed prompt.', 'Prompt Dialog', ['Yes', 'No', 'Maybe, Not Sure']);
-    }, 'actions');
-
-    createActionButton('Built-in Alert Dialog', function () {
-        alert('You pressed alert');
-    }, 'actions');
-
-    createActionButton('Built-in Confirm Dialog', function () {
-        confirm('You selected confirm');
-    }, 'actions');
-
-    createActionButton('Built-in Prompt Dialog', function () {
-        prompt('This is a prompt', 'Default value');
-    }, 'actions');
-};

http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/blob/0527b774/tests/plugin.xml
----------------------------------------------------------------------
diff --git a/tests/plugin.xml b/tests/plugin.xml
new file mode 100644
index 0000000..16f8b46
--- /dev/null
+++ b/tests/plugin.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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.
+-->
+
+<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
+    id="org.apache.cordova.dialogs.tests"
+    version="0.2.9-dev">
+    <name>Cordova Notification Plugin Tests</name>
+    <license>Apache 2.0</license>
+
+    <js-module src="tests.js" name="tests">
+    </js-module>
+</plugin>

http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/blob/0527b774/tests/tests.js
----------------------------------------------------------------------
diff --git a/tests/tests.js b/tests/tests.js
new file mode 100644
index 0000000..99ddf6e
--- /dev/null
+++ b/tests/tests.js
@@ -0,0 +1,170 @@
+/*
+ *
+ * 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");
+        });
+    });
+};
+
+/******************************************************************************/
+/******************************************************************************/
+/******************************************************************************/
+
+exports.defineManualTests = function (contentEl, createActionButton) {
+    var logMessage = function (message) {
+        var log = document.getElementById('info');
+        var logLine = document.createElement('div');
+        logLine.innerHTML = message;
+        log.appendChild(logLine);
+    }
+
+    var clearLog = function () {
+        var log = document.getElementById('info');
+        log.innerHTML = '';
+    }
+
+    var beep = function () {
+        console.log("beep()");
+        navigator.notification.beep(3);
+    };
+
+    var alertDialog = function (message, title, button) {
+        console.log("alertDialog()");
+        navigator.notification.alert(message,
+            function () {
+                console.log("Alert dismissed.");
+            },
+            title, button);
+        console.log("After alert");
+    };
+
+    var confirmDialogA = function (message, title, buttons) {
+        clearLog();
+        navigator.notification.confirm(message,
+            function (r) {
+                if (r === 0) {
+                    logMessage("Dismissed dialog without making a selection.");
+                    console.log("Dismissed dialog without making a selection.");
+                } else {
+                    console.log("You selected " + r);
+                    logMessage("You selected " + (buttons.split(","))[r - 1]);
+                }
+            },
+            title,
+            buttons);
+    };
+
+    var confirmDialogB = function (message, title, buttons) {
+        clearLog();
+        navigator.notification.confirm(message,
+            function (r) {
+                if (r === 0) {
+                    logMessage("Dismissed dialog without making a selection.");
+                    console.log("Dismissed dialog without making a selection.");
+                } else {
+                    console.log("You selected " + r);
+                    logMessage("You selected " + buttons[r - 1]);
+                }
+            },
+            title,
+            buttons);
+    };
+
+    var promptDialog = function (message, title, buttons) {
+        clearLog();
+        navigator.notification.prompt(message,
+            function (r) {
+                if (r && r.buttonIndex === 0) {
+                    var msg = "Dismissed dialog";
+                    if (r.input1) {
+                        msg += " with input: " + r.input1
+                    }
+                    logMessage(msg);
+                    console.log(msg);
+                } else {
+                    console.log("You selected " + r.buttonIndex + " and entered: " + r.input1);
+                    logMessage("You selected " + buttons[r.buttonIndex - 1] + " and entered:
" + r.input1);
+                }
+            },
+            title,
+            buttons);
+    };
+
+    /******************************************************************************/
+
+    contentEl.innerHTML = '<div id="info"></div>' +
+        '<div id="actions"></div>';
+
+    createActionButton('Beep', function () {
+        beep();
+    }, 'actions');
+
+    createActionButton('Alert Dialog', function () {
+        alertDialog('You pressed alert.', 'Alert Dialog', 'Continue');
+    }, 'actions');
+
+    createActionButton('Confirm Dialog - Deprecated', function () {
+        confirmDialogA('You pressed confirm.', 'Confirm Dialog', 'Yes,No,Maybe');
+    }, 'actions');
+
+    createActionButton('Confirm Dialog', function () {
+        confirmDialogB('You pressed confirm.', 'Confirm Dialog', ['Yes', 'No', 'Maybe, Not
Sure']);
+    }, 'actions');
+
+    createActionButton('Prompt Dialog', function () {
+        promptDialog('You pressed prompt.', 'Prompt Dialog', ['Yes', 'No', 'Maybe, Not Sure']);
+    }, 'actions');
+
+    createActionButton('Built-in Alert Dialog', function () {
+        alert('You pressed alert');
+    }, 'actions');
+
+    createActionButton('Built-in Confirm Dialog', function () {
+        confirm('You selected confirm');
+    }, 'actions');
+
+    createActionButton('Built-in Prompt Dialog', function () {
+        prompt('This is a prompt', 'Default value');
+    }, 'actions');
+};


Mime
View raw message