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:06:11 UTC

[4/6] git commit: added documentation for manual tests

added documentation for manual tests


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-device-motion/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-device-motion/commit/183e8712
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-device-motion/tree/183e8712
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-device-motion/diff/183e8712

Branch: refs/heads/master
Commit: 183e8712782eea400faaa495366d4de3ade0a2a5
Parents: fdbc17d
Author: Edna Morales <ed...@ednas-mbp-2.raleigh.ibm.com>
Authored: Thu Jul 24 13:28:30 2014 -0400
Committer: Edna Morales <ed...@ednas-mbp-2.raleigh.ibm.com>
Committed: Thu Jul 24 13:28:30 2014 -0400

----------------------------------------------------------------------
 test/tests.js | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-device-motion/blob/183e8712/test/tests.js
----------------------------------------------------------------------
diff --git a/test/tests.js b/test/tests.js
index 75016d0..6bcd61c 100644
--- a/test/tests.js
+++ b/test/tests.js
@@ -264,6 +264,13 @@ exports.defineManualTests = function (contentEl, createActionButton) {
 
     /******************************************************************************/
 
+    var accelerometer_tests = '<div id="getAcceleration"></div>' +
+        'Expected result: Will update the status box with X, Y, and Z values when pressed. Status will read "Stopped"' +
+        '<p/> <div id="watchAcceleration"></div>' +
+        'Expected result: When pressed, will start a watch on the accelerometer and update X,Y,Z values when movement is sensed. Status will read "Running"' +
+        '<p/> <div id="clearAcceleration"></div>' +
+        'Expected result: Will clear the accelerometer watch, so X,Y,Z values will no longer be updated. Status will read "Stopped"';
+
     contentEl.innerHTML = '<div id="info">' +
         'Status: <span id="accel_status">Stopped</span>' +
         '<table width="100%">' +
@@ -271,17 +278,17 @@ exports.defineManualTests = function (contentEl, createActionButton) {
         '<tr><td width="20%">Y:</td><td id="y"> </td></tr>' +
         '<tr><td width="20%">Z:</td><td id="z"> </td></tr>' +
         '</table></div>' +
-        '<div id="actions"></div>';
+        accelerometer_tests;
 
     createActionButton('Get Acceleration', function () {
         getAccel();
-    }, 'actions');
+    }, 'getAcceleration');
 
     createActionButton('Start Watch', function () {
         watchAccel();
-    }, 'actions');
+    }, 'watchAcceleration');
 
     createActionButton('Clear Watch', function () {
         stopAccel();
-    }, 'actions');
+    }, 'clearAcceleration');
 };