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. --- .../static/tests/thread_window/hidden_thread_window_tests.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'addons/mail/static/tests/thread_window/hidden_thread_window_tests.js') diff --git a/addons/mail/static/tests/thread_window/hidden_thread_window_tests.js b/addons/mail/static/tests/thread_window/hidden_thread_window_tests.js index 078230e276a..36da266128c 100644 --- a/addons/mail/static/tests/thread_window/hidden_thread_window_tests.js +++ b/addons/mail/static/tests/thread_window/hidden_thread_window_tests.js @@ -31,7 +31,7 @@ QUnit.module('Hidden', { this.services = mailTestUtils.getMailServices(); this.ORIGINAL_THREAD_WINDOW_APPENDTO = this.services.mail_service.prototype.THREAD_WINDOW_APPENDTO; - this.createParent = function (params) { + this.createParent = async function (params) { var widget = new Widget(); // in non-debug mode, append thread windows in qunit-fixture @@ -43,7 +43,7 @@ QUnit.module('Hidden', { self.services.mail_service.prototype.THREAD_WINDOW_APPENDTO = '#qunit-fixture'; } - testUtils.mock.addMockEnvironment(widget, params); + await testUtils.mock.addMockEnvironment(widget, params); return widget; }; }, @@ -86,7 +86,7 @@ QUnit.test('hidden thread windows dropdown when not enough horizontal space (ver }, }; - var parent = this.createParent({ + var parent = await this.createParent({ data: this.data, services: this.services, }); @@ -172,7 +172,7 @@ QUnit.test('hidden thread windows dropdown when not enough horizontal space (ver }, }; - var parent = this.createParent({ + var parent = await this.createParent({ data: this.data, services: this.services, }); @@ -266,7 +266,7 @@ QUnit.test('receive message from hidden thread window', async function (assert) }, }; - var parent = this.createParent({ + var parent = await this.createParent({ data: this.data, services: this.services, }); -- cgit v1.2.3