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 2017/02/22 03:26:48 UTC

[5/9] cordova-plugin-screen-orientation git commit: Fixed errors in tests and changed plugin test id

 Fixed errors in tests and changed  plugin test id


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/commit/083578ea
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/tree/083578ea
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/diff/083578ea

Branch: refs/heads/master
Commit: 083578eaa87c696f55c1bc23e0ec67d755270f96
Parents: 68693cf
Author: maverickmishra <vi...@gmail.com>
Authored: Wed Jan 25 15:02:04 2017 -0800
Committer: maverickmishra <vi...@gmail.com>
Committed: Wed Jan 25 15:02:04 2017 -0800

----------------------------------------------------------------------
 tests/plugin.xml |  2 +-
 tests/tests.js   | 11 ++++-------
 2 files changed, 5 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/blob/083578ea/tests/plugin.xml
----------------------------------------------------------------------
diff --git a/tests/plugin.xml b/tests/plugin.xml
index 5d01bad..c8d9755 100644
--- a/tests/plugin.xml
+++ b/tests/plugin.xml
@@ -21,7 +21,7 @@
 <plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
     xmlns:rim="http://www.blackberry.com/ns/widgets"
     xmlns:android="http://schemas.android.com/apk/res/android"
-    id="cordova-plugin-device-tests"
+    id="cordova-plugin-screen-orientation-tests"
     version="1.0.0-dev">
     <name>Cordova Screen Orientation Plugin Tests</name>
     <license>Apache 2.0</license>

http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/blob/083578ea/tests/tests.js
----------------------------------------------------------------------
diff --git a/tests/tests.js b/tests/tests.js
index 08acc69..e06c2b1 100644
--- a/tests/tests.js
+++ b/tests/tests.js
@@ -43,8 +43,8 @@ exports.defineAutoTests = function() {
     describe('Screen functions', function () {
         it('should successfully lock and unlock screen orientation', function (done) {
             try {
-                window.screen.lockOrientation('landscape').then(function () {
-                    expect(window.screen.unlockOrientation).not.toThrow();
+                window.screen.orientation.lock('landscape').then(function () {
+                    expect(window.screen.orientation.unlock).not.toThrow();
                     done();
                 }, function (err) {
                     fail('Promise was rejected: ' + err);
@@ -67,7 +67,6 @@ exports.defineAutoTests = function() {
 		expect(window.OrientationLockType['portrait']).toBe(3);
 		expect(window.OrientationLockType['landscape']).toBe(12);
 		expect(window.OrientationLockType['any']).toBe(15);
-		 alert(window.screen.orientation.angle);
 		});
    });
   describe('Screen object should exist', function () {
@@ -83,11 +82,9 @@ exports.defineAutoTests = function() {
       expect(window.screen.orientation.lock).toEqual(jasmine.any(Function));
       expect(window.screen.orientation.unlock).toEqual(jasmine.any(Function));
       });
-	it(" Screenorientation object should contain properties called type and angle", function() {
+	it(" Screenorientation object should contain property called type", function() {
       expect(window.screen.orientation.type).toBeDefined();
-      expect(window.screen.orientation.angle).toBeDefined();
-
-      });
+  });
 
   });
 };


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