diff options
| author | Aaron Bohy <aab@odoo.com> | 2020-06-05 09:18:14 +0000 |
|---|---|---|
| committer | Aaron Bohy <aab@odoo.com> | 2020-06-12 09:47:48 +0000 |
| commit | b4ba0fc34082deec8ca6c871ce7a203c0a3a61a4 (patch) | |
| tree | 27451423f32b218e699d3135c398d338b249c5cd /addons/mail/static/tests/thread_window/moderation_thread_window_tests.js | |
| parent | dc260c324170a90fa737cd21dd528e39d658d9b6 (diff) | |
[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.
Diffstat (limited to 'addons/mail/static/tests/thread_window/moderation_thread_window_tests.js')
| -rw-r--r-- | addons/mail/static/tests/thread_window/moderation_thread_window_tests.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/addons/mail/static/tests/thread_window/moderation_thread_window_tests.js b/addons/mail/static/tests/thread_window/moderation_thread_window_tests.js index 732a5fe7938..db2561fd048 100644 --- a/addons/mail/static/tests/thread_window/moderation_thread_window_tests.js +++ b/addons/mail/static/tests/thread_window/moderation_thread_window_tests.js @@ -62,7 +62,7 @@ QUnit.module('Moderation', { 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 @@ -74,7 +74,7 @@ QUnit.module('Moderation', { self.services.mail_service.prototype.THREAD_WINDOW_APPENDTO = '#qunit-fixture'; } - testUtils.mock.addMockEnvironment(widget, params); + await testUtils.mock.addMockEnvironment(widget, params); return widget; }; }, @@ -110,7 +110,7 @@ QUnit.test('moderator: moderated channel with pending moderation message', async res_id: 1, }]; - var parent = this.createParent({ + var parent = await this.createParent({ data: this.data, services: this.services, }); |
