From 027436ee5aef3ff4d94d10ed69e51659e81f2267 Mon Sep 17 00:00:00 2001 From: Aaron Bohy Date: Thu, 30 Aug 2018 15:23:51 +0200 Subject: [PATCH] [REF] web: FormTests: move test to correct section --- addons/web/static/tests/views/form_tests.js | 60 ++++++++++----------- 1 file changed, 30 insertions(+), 30 deletions(-) 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(); - }); }); });