From bb8b659ce39db24308bb922be042fb990c4b46f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9ry=20Debongnie?= Date: Mon, 26 May 2014 16:43:04 +0200 Subject: [PATCH] [FIX] adjust the tests after changes to the searchview * 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 | 2 +- addons/web/static/test/search.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/web/static/src/js/search.js b/addons/web/static/src/js/search.js index ae7644a89b7..02d193a2fbb 100644 --- a/addons/web/static/src/js/search.js +++ b/addons/web/static/src/js/search.js @@ -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'); } diff --git a/addons/web/static/test/search.js b/addons/web/static/test/search.js index 9104f4dfbfe..4724ca0792d 100644 --- a/addons/web/static/test/search.js +++ b/addons/web/static/test/search.js @@ -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(); }); });