rave-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfrank...@apache.org
Subject svn commit: r1148522 - in /incubator/rave/trunk/rave-portal/src: main/webapp/script/rave.js main/webapp/script/rave_opensocial.js test/javascript/raveOpenSocialSpec.js test/javascript/raveSpec.js
Date Tue, 19 Jul 2011 20:55:05 GMT
Author: mfranklin
Date: Tue Jul 19 20:55:04 2011
New Revision: 1148522

URL: http://svn.apache.org/viewvc?rev=1148522&view=rev
Log:
Fixed jasmine tests (Supports RAVE-53)

Modified:
    incubator/rave/trunk/rave-portal/src/main/webapp/script/rave.js
    incubator/rave/trunk/rave-portal/src/main/webapp/script/rave_opensocial.js
    incubator/rave/trunk/rave-portal/src/test/javascript/raveOpenSocialSpec.js
    incubator/rave/trunk/rave-portal/src/test/javascript/raveSpec.js

Modified: incubator/rave/trunk/rave-portal/src/main/webapp/script/rave.js
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/rave-portal/src/main/webapp/script/rave.js?rev=1148522&r1=1148521&r2=1148522&view=diff
==============================================================================
--- incubator/rave/trunk/rave-portal/src/main/webapp/script/rave.js (original)
+++ incubator/rave/trunk/rave-portal/src/main/webapp/script/rave.js Tue Jul 19 20:55:04 2011
@@ -104,6 +104,8 @@ var rave = rave || (function() {
         function dragStop(event, ui) {
             $(".dnd-overlay").remove();
             $(".region-dragging").removeClass("region-dragging");
+            //Fixes a bug where the jQuery style attribute remains set in chrome
+            ui.item.attr("style", "");
             uiState.targetRegion = ui.item.parent().get(0);
             uiState.targetIndex = ui.item.index();
             rave.api.rpc.moveWidget(uiState);

Modified: incubator/rave/trunk/rave-portal/src/main/webapp/script/rave_opensocial.js
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/rave-portal/src/main/webapp/script/rave_opensocial.js?rev=1148522&r1=1148521&r2=1148522&view=diff
==============================================================================
--- incubator/rave/trunk/rave-portal/src/main/webapp/script/rave_opensocial.js (original)
+++ incubator/rave/trunk/rave-portal/src/main/webapp/script/rave_opensocial.js Tue Jul 19
20:55:04 2011
@@ -157,10 +157,7 @@ rave.opensocial = rave.opensocial || (fu
     function resizeIframe(args) {
         var max = 0x7FFFFFFF;
         var height = args.a > max ? max : args.a;
-        var element = document.getElementById(args.f);
-        if (element) {
-            element.style.height = height + 'px';
-        }
+        args.gs.setHeight(height);
     }
 
     /**

Modified: incubator/rave/trunk/rave-portal/src/test/javascript/raveOpenSocialSpec.js
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/rave-portal/src/test/javascript/raveOpenSocialSpec.js?rev=1148522&r1=1148521&r2=1148522&view=diff
==============================================================================
--- incubator/rave/trunk/rave-portal/src/test/javascript/raveOpenSocialSpec.js (original)
+++ incubator/rave/trunk/rave-portal/src/test/javascript/raveOpenSocialSpec.js Tue Jul 19
20:55:04 2011
@@ -122,7 +122,7 @@ describe("Rave OpenSocial", function() {
                 a: size,
                 gs: {
                     setHeight : function(value) {
-                        wasCalled = size == value;
+                        called = size == value;
                     }
                 },
                 wasCalled : function() {return called; }
@@ -133,14 +133,14 @@ describe("Rave OpenSocial", function() {
             rave.opensocial.init();
             var args = getMockResizeArgs(25);
             container.rpcHooks()["resize_iframe"](args);
-            //expect(args.wasCalled()).toBeTruthy();
+            expect(args.wasCalled()).toBeTruthy();
         });
 
         it("resizes Iframe to max if height is greater than max", function() {
             rave.opensocial.init();
             var args = getMockResizeArgs(2147483648);
             container.rpcHooks()["resize_iframe"](args);
-            //expect(args.wasCalled()).toBeTruthy();
+            expect(args.wasCalled()).toBeFalsy();
         });
 
         it("set title changes the title DOM node", function() {

Modified: incubator/rave/trunk/rave-portal/src/test/javascript/raveSpec.js
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/rave-portal/src/test/javascript/raveSpec.js?rev=1148522&r1=1148521&r2=1148522&view=diff
==============================================================================
--- incubator/rave/trunk/rave-portal/src/test/javascript/raveSpec.js (original)
+++ incubator/rave/trunk/rave-portal/src/test/javascript/raveSpec.js Tue Jul 19 20:55:04 2011
@@ -88,6 +88,9 @@ describe("Rave", function() {
                         } else {
                             return html;
                         }
+                    },
+                    attr: function(a, b) {
+
                     }
                 }
             };
@@ -230,6 +233,9 @@ describe("Rave", function() {
                     },
                     index : function() {
                         return 2
+                    },
+                    attr: function(a,b) {
+
                     }
                 }
             };



Mime
View raw message