summaryrefslogtreecommitdiff
path: root/addons/mail/static/tests/thread_window/hidden_thread_window_tests.js
diff options
context:
space:
mode:
authorAaron Bohy <aab@odoo.com>2020-06-05 09:18:14 +0000
committerAaron Bohy <aab@odoo.com>2020-06-12 09:47:48 +0000
commitb4ba0fc34082deec8ca6c871ce7a203c0a3a61a4 (patch)
tree27451423f32b218e699d3135c398d338b249c5cd /addons/mail/static/tests/thread_window/hidden_thread_window_tests.js
parentdc260c324170a90fa737cd21dd528e39d658d9b6 (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/hidden_thread_window_tests.js')
-rw-r--r--addons/mail/static/tests/thread_window/hidden_thread_window_tests.js10
1 files changed, 5 insertions, 5 deletions
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,
});