diff --git a/addons/web/static/tests/views/form_tests.js b/addons/web/static/tests/views/form_tests.js index 222317ae3e4..f985062966c 100644 --- a/addons/web/static/tests/views/form_tests.js +++ b/addons/web/static/tests/views/form_tests.js @@ -7036,6 +7036,36 @@ QUnit.module('Views', { form.destroy(); }); + QUnit.test('asynchronous rendering of a widget tag', function (assert) { + assert.expect(1); + + var def1 = $.Deferred(); + + var MyWidget = Widget.extend({ + willStart: function() { + return def1; + }, + }); + + widgetRegistry.add('test', MyWidget); + + createAsyncView({ + View: FormView, + model: 'partner', + data: this.data, + arch: '
' + + '' + + '', + }).then(function(form) { + assert.strictEqual(form.$('div.o_widget').length, 1, + "there should be a div with widget class"); + form.destroy(); + delete widgetRegistry.map.test; + }); + + def1.resolve(); + }); + QUnit.module('FormViewTABMainButtons'); QUnit.test('using tab in an empty required string field should not move to the next field',function(assert) { @@ -7395,36 +7425,6 @@ QUnit.module('Views', { */ assert.ok("Behavior can't be tested"); }); - - QUnit.test('asynchronous rendering of a widget tag', function (assert) { - assert.expect(1); - - var def1 = $.Deferred(); - - var MyWidget = Widget.extend({ - willStart: function() { - return def1; - }, - }); - - widgetRegistry.add('test', MyWidget); - - createAsyncView({ - View: FormView, - model: 'partner', - data: this.data, - arch: '
' + - '' + - '', - }).then(function(form) { - assert.strictEqual(form.$('div.o_widget').length, 1, - "there should be a div with widget class"); - form.destroy(); - delete widgetRegistry.map.test; - }); - - def1.resolve(); - }); }); });