summaryrefslogtreecommitdiff
path: root/addons/web_editor/static/tests/test_utils.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/web_editor/static/tests/test_utils.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/web_editor/static/tests/test_utils.js')
-rw-r--r--addons/web_editor/static/tests/test_utils.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/web_editor/static/tests/test_utils.js b/addons/web_editor/static/tests/test_utils.js
index 8b28e292438..9cd3249f953 100644
--- a/addons/web_editor/static/tests/test_utils.js
+++ b/addons/web_editor/static/tests/test_utils.js
@@ -293,12 +293,12 @@ function wysiwygData(data) {
*
* @param {object} params
*/
-function createWysiwyg(params) {
+async function createWysiwyg(params) {
patch();
params.data = wysiwygData(params.data);
var parent = new Widget();
- testUtils.mock.addMockEnvironment(parent, params);
+ await testUtils.mock.addMockEnvironment(parent, params);
var wysiwygOptions = _.extend({}, params.wysiwygOptions, {
recordInfo: {