From b4ba0fc34082deec8ca6c871ce7a203c0a3a61a4 Mon Sep 17 00:00:00 2001 From: Aaron Bohy Date: Fri, 5 Jun 2020 09:18:14 +0000 Subject: [FIX] *: adapt tests to env rework This commit adapts tests following recent changes on the helpers. The main change is that addMockEnvironment (and all functions using it) are now async, as they need to wait for services to be started. --- addons/mail/static/tests/models/cc_throttle_function_tests.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'addons/mail/static/tests/models/cc_throttle_function_tests.js') diff --git a/addons/mail/static/tests/models/cc_throttle_function_tests.js b/addons/mail/static/tests/models/cc_throttle_function_tests.js index 5ab00ef6048..f760675b1f3 100644 --- a/addons/mail/static/tests/models/cc_throttle_function_tests.js +++ b/addons/mail/static/tests/models/cc_throttle_function_tests.js @@ -31,7 +31,7 @@ QUnit.module('mail', { QUnit.module('model', {}, function () { QUnit.module('CC Throttle Function'); -QUnit.test('cancel()', function (assert) { +QUnit.test('cancel()', async function (assert) { var done = assert.async(); assert.expect(3); @@ -39,7 +39,7 @@ QUnit.test('cancel()', function (assert) { var def = testUtils.makeTestPromise(); var step = 1; - var widget = testUtils.createParent({ + var widget = await testUtils.createParent({ mockRPC: function (route, args) { if (args.method === '__rpc__') { assert.step(args.method + args.args[0]); @@ -87,7 +87,7 @@ QUnit.test('cancel()', function (assert) { }); }); -QUnit.test('clear()', function (assert) { +QUnit.test('clear()', async function (assert) { var done = assert.async(); assert.expect(5); @@ -96,7 +96,7 @@ QUnit.test('clear()', function (assert) { var def2 = testUtils.makeTestPromise(); var step = 1; - var widget = testUtils.createParent({ + var widget = await testUtils.createParent({ mockRPC: function (route, args) { if (args.method === '__rpc__') { assert.step(args.method + args.args[0]); -- cgit v1.2.3