[FIX] adjust the tests after changes to the searchview
authorGéry Debongnie <ged@odoo.com>
Mon, 26 May 2014 14:43:04 +0000 (16:43 +0200)
committerGéry Debongnie <ged@odoo.com>
Mon, 26 May 2014 14:43:04 +0000 (16:43 +0200)
* oe_searchview_custom has been split in oe_searchview_custom and
oe_searchview_filter: a test need to take that into account
* in adjust_top, the parent might not have a $ method.

addons/web/static/src/js/search.js
addons/web/static/test/search.js

index ae7644a..02d193a 100644 (file)
@@ -443,7 +443,7 @@ instance.web.SearchView = instance.web.Widget.extend(/** @lends instance.web.Sea
     adjust_top: function () {
         // hack to adjust the top of the view manager body to the actual header height
         var parent = this.getParent();
-        if (parent) {
+        if (parent && parent.$) {
             var h = parent.$(".oe_view_manager_header").height() + 1;
             parent.$(".oe_view_manager_body").css('top', h + 'px');                
         }        
index 9104f4d..4724ca0 100644 (file)
@@ -1329,10 +1329,10 @@ openerp.testing.section('search.filters.saved', {
         });
         return view.appendTo($fix)
         .then(function () {
-            $fix.find('.oe_searchview_custom input#oe_searchview_custom_input')
+            $fix.find('.oe_searchview_savefilter input#oe_searchview_custom_input')
                     .val("filter name")
                 .end()
-                .find('.oe_searchview_custom button').click();
+                .find('.oe_searchview_savefilter button').click();
             return done.promise();
         });
     });