diff --git a/addons/web/static/src/js/testing.js b/addons/web/static/src/js/testing.js index 094270ec237..e7aad43ffc7 100644 --- a/addons/web/static/src/js/testing.js +++ b/addons/web/static/src/js/testing.js @@ -10,7 +10,7 @@ openerp.testing = {}; formats: ['coresetup', 'dates'], chrome: ['corelib', 'coresetup'], views: ['corelib', 'coresetup', 'data', 'chrome'], - search: ['data', 'coresetup', 'formats'], + search: ['views', 'formats'], list: ['views', 'data'], form: ['data', 'views', 'list', 'formats'], list_editable: ['list', 'form', 'data'], diff --git a/addons/web/static/test/list-editable.js b/addons/web/static/test/list-editable.js index b02e8abed96..89907aa16ee 100644 --- a/addons/web/static/test/list-editable.js +++ b/addons/web/static/test/list-editable.js @@ -183,7 +183,7 @@ openerp.testing.section('list.edition', { } return []; }); - mock('/web/view/load', function () { + mock('demo:fields_view_get', function () { return { type: 'tree', fields: { @@ -191,15 +191,7 @@ openerp.testing.section('list.edition', { b: {type: 'char', string: "B"}, c: {type: 'char', string: "C"} }, - arch: { - tag: 'tree', - attrs: {}, - children: [ - {tag: 'field', attrs: {name: 'a'}}, - {tag: 'field', attrs: {name: 'b'}}, - {tag: 'field', attrs: {name: 'c'}} - ] - } + arch: '', }; }); } @@ -247,7 +239,7 @@ openerp.testing.section('list.edition.events', { mock('demo:read', function () { return [{ id: 1, a: 'foo', b: 'bar', c: 'baz' }]; }); - mock('/web/view/load', function () { + mock('demo:fields_view_get', function () { return { type: 'tree', fields: { @@ -255,15 +247,7 @@ openerp.testing.section('list.edition.events', { b: {type: 'char', string: "B"}, c: {type: 'char', string: "C"} }, - arch: { - tag: 'tree', - attrs: {}, - children: [ - {tag: 'field', attrs: {name: 'a'}}, - {tag: 'field', attrs: {name: 'b'}}, - {tag: 'field', attrs: {name: 'c'}} - ] - } + arch: '', }; }); } @@ -320,19 +304,13 @@ openerp.testing.section('list.edition.onwrite', { templates: true, }, function (test) { test('record-to-read', {asserts: 4}, function (instance, $fix, mock) { - mock('/web/view/load', function () { + mock('demo:fields_view_get', function () { return { type: 'tree', fields: { a: {type: 'char', string: "A"} }, - arch: { - tag: 'tree', - attrs: { on_write: 'on_write', colors: 'red:a == "foo"' }, - children: [ - {tag: 'field', attrs: {name: 'a'}} - ] - } + arch: '', }; }); mock('demo:read', function (args, kwargs) { diff --git a/addons/web/static/test/list.js b/addons/web/static/test/list.js index 22c33ef104a..bb4c4c38640 100644 --- a/addons/web/static/test/list.js +++ b/addons/web/static/test/list.js @@ -4,20 +4,13 @@ openerp.testing.section('list.buttons', { templates: true }, function (test) { test('record-deletion', {asserts: 2}, function (instance, $fix, mock) { - mock('/web/view/load', function () { + mock('demo:fields_view_get', function () { return { type: 'tree', fields: { a: {type: 'char', string: "A"} }, - arch: { - tag: 'tree', - attrs: { }, - children: [ - {tag: 'field', attrs: {name: 'a'}}, - {tag: 'button', attrs: {type: 'object', name: 'foo'}} - ] - } + arch: '