[FIX] tests: update jquery link, fix broken searchview test following merge
authorXavier Morel <xmo@openerp.com>
Thu, 12 Jul 2012 11:55:52 +0000 (13:55 +0200)
committerXavier Morel <xmo@openerp.com>
Thu, 12 Jul 2012 11:55:52 +0000 (13:55 +0200)
bzr revid: xmo@openerp.com-20120712115552-7adsu941o3wjtrmr

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

index c8b6f79..504510e 100644 (file)
@@ -1669,6 +1669,7 @@ instance.web.search.AddToDashboard = instance.web.Widget.extend({
         return $.when(this.load_data(),this.data_loaded).pipe(this.proxy("render_data"));
     },
     load_data:function(){
+        if (!instance.webclient) { return $.Deferred().reject(); }
         var self = this,dashboard_menu = instance.webclient.menu.data.data.children;
         var ir_model_data = new instance.web.Model('ir.model.data',{},[['name','=','menu_reporting_dashboard']]).query(['res_id']);
         var map_data = function(result){
index 0b1ef7f..548eef6 100644 (file)
@@ -1061,17 +1061,11 @@ $(document).ready(function () {
 
     module('saved_filters', {
         setup: function () {
-            instance = window.openerp.init([]);
-            window.openerp.web.corelib(instance);
-            window.openerp.web.coresetup(instance);
-            window.openerp.web.chrome(instance);
-            window.openerp.web.data(instance);
-            window.openerp.web.formats(instance);
-            window.openerp.web.search(instance);
+            instance = openerp.testing.instanceFor('search');
 
-            instance.web.qweb.add_template(doc);
+            openerp.testing.loadTemplate(instance);
 
-            mockifyRPC(instance.connection);
+            openerp.testing.mockifyRPC(instance);
         }
     });
     asyncTest('checkboxing', 6, function () {
index 520a710..cab1586 100644 (file)
@@ -13,7 +13,7 @@
     <script src="/web/static/lib/backbone/backbone.js" type="text/javascript"></script>
 
     <!-- jquery -->
-    <script src="/web/static/lib/jquery/jquery-1.7.2b1.js"></script>
+    <script src="/web/static/lib/jquery/jquery-1.7.2.js"></script>
     <script src="/web/static/lib/jquery.ui/js/jquery-ui-1.8.17.custom.min.js"></script>
     <script src="/web/static/lib/jquery.ba-bbq/jquery.ba-bbq.js"></script>