From 0862f2fab0be757175b00a4babd162ae26fffb74 Mon Sep 17 00:00:00 2001 From: tsm-odoo Date: Thu, 17 Feb 2022 18:11:52 +0000 Subject: [PATCH] [IMP] mail, *: make mail module's beforeEach functions async MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit *: calendar, hr, hr_holidays, im_livechat, note, sms, snailmail, website_livechat, website_slides. This commit prepares the ground for the model definitions PR. In order to reduce the noise, all mail module's beforeEach functions will be made async. task-2767820 closes odoo/odoo#84845 Related: odoo/enterprise#24489 Signed-off-by: Sébastien Theys (seb) --- .../calendar/static/tests/systray_activity_menu_tests.js | 4 ++-- addons/hr/static/tests/m2x_avatar_employee_tests.js | 4 ++-- .../tests/partner_im_status_icon_tests.js | 4 ++-- .../src/components/thread_icon/tests/thread_icon_tests.js | 4 ++-- .../src/components/thread_view/tests/thread_view_tests.js | 4 ++-- .../tests/chat_window_manager_tests.js | 4 ++-- .../src/components/composer/tests/composer_tests.js | 4 ++-- .../static/src/components/discuss/tests/discuss_tests.js | 4 ++-- .../tests/discuss_sidebar_category_tests.js | 4 ++-- .../tests/discuss_sidebar_category_item_tests.js | 4 ++-- .../messaging_menu/tests/messaging_menu_tests.js | 4 ++-- .../src/components/thread_icon/tests/thread_icon_tests.js | 4 ++-- .../tests/thread_textual_typing_status_tests.js | 4 ++-- .../src/components/activity/tests/activity_tests.js | 4 ++-- .../tests/activity_mark_done_popover_tests.js | 4 ++-- .../attachment_box/tests/attachment_box_tests.js | 4 ++-- .../attachment_image/tests/attachment_image_tests.js | 4 ++-- .../attachment_list/tests/attachment_list_tests.js | 4 ++-- .../tests/channel_invitation_form_tests.js | 4 ++-- .../tests/chat_window_manager_tests.js | 4 ++-- .../chatter/tests/chatter_suggested_recipient_tests.js | 4 ++-- .../static/src/components/chatter/tests/chatter_tests.js | 4 ++-- .../chatter_topbar/tests/chatter_topbar_tests.js | 4 ++-- .../src/components/composer/tests/composer_tests.js | 4 ++-- .../tests/composer_suggestion_canned_response_tests.js | 4 ++-- .../tests/composer_suggestion_channel_tests.js | 4 ++-- .../tests/composer_suggestion_command_tests.js | 4 ++-- .../tests/composer_suggestion_partner_tests.js | 4 ++-- .../dialog_manager/tests/dialog_manager_tests.js | 4 ++-- .../src/components/discuss/tests/discuss_inbox_tests.js | 4 ++-- .../discuss/tests/discuss_message_edit_tests.js | 4 ++-- .../src/components/discuss/tests/discuss_pinned_tests.js | 4 ++-- .../src/components/discuss/tests/discuss_sidebar_tests.js | 4 ++-- .../static/src/components/discuss/tests/discuss_tests.js | 4 ++-- .../discuss_mobile_mailbox_selection_tests.js | 4 ++-- .../tests/discuss_sidebar_category_tests.js | 4 ++-- .../tests/discuss_sidebar_category_item_tests.js | 4 ++-- .../components/file_uploader/tests/file_uploader_tests.js | 4 ++-- .../components/follow_button/tests/follow_button_tests.js | 4 ++-- .../src/components/follower/tests/follower_tests.js | 4 ++-- .../follower_list_menu/tests/follower_list_menu_tests.js | 4 ++-- .../follower_subtype/tests/follower_subtype_tests.js | 4 ++-- .../static/src/components/message/tests/message_tests.js | 4 ++-- .../tests/message_seen_indicator_tests.js | 4 ++-- .../messaging_menu/tests/messaging_menu_tests.js | 4 ++-- .../tests/notification_list_notification_group_tests.js | 4 ++-- .../notification_list/tests/notification_list_tests.js | 4 ++-- .../tests/partner_im_status_icon_tests.js | 4 ++-- .../src/components/thread_icon/tests/thread_icon_tests.js | 4 ++-- .../tests/thread_needaction_preview_tests.js | 4 ++-- .../thread_preview/tests/thread_preview_tests.js | 4 ++-- .../tests/thread_textual_typing_status_tests.js | 4 ++-- .../src/components/thread_view/tests/thread_view_tests.js | 4 ++-- .../src/model/tests/model_field_command/clear_tests.js | 4 ++-- .../tests/model_field_command/insert_and_replace_tests.js | 4 ++-- .../src/model/tests/model_field_command/insert_tests.js | 4 ++-- .../src/model/tests/model_field_command/link_tests.js | 4 ++-- .../src/model/tests/model_field_command/replace_tests.js | 4 ++-- .../src/model/tests/model_field_command/set_tests.js | 4 ++-- .../model/tests/model_field_command/unlink_all_tests.js | 4 ++-- .../src/model/tests/model_field_command/unlink_tests.js | 4 ++-- .../src/models/attachment/tests/attachment_tests.js | 4 ++-- .../mail/static/src/models/message/tests/message_tests.js | 4 ++-- .../static/src/models/messaging/tests/messaging_tests.js | 4 ++-- .../models/messaging_menu/tests/messaging_menu_tests.js | 4 ++-- .../mail/static/src/models/thread/tests/thread_tests.js | 4 ++-- .../static/src/utils/throttle/tests/throttle_tests.js | 4 ++-- addons/mail/static/src/utils/timer/tests/timer_tests.js | 4 ++-- .../widgets/form_renderer/tests/form_renderer_tests.js | 4 ++-- .../notification_alert/tests/notification_alert_tests.js | 4 ++-- addons/mail/static/tests/chatter_tests.js | 8 ++++---- addons/mail/static/tests/m2x_avatar_user_tests.js | 4 ++-- .../static/tests/systray/systray_activity_menu_tests.js | 4 ++-- .../tests/webclient/commands/mail_providers_tests.js | 4 ++-- addons/note/static/tests/systray_activity_menu_tests.js | 4 ++-- .../static/src/components/message/tests/message_tests.js | 4 ++-- .../tests/notification_list_notification_group_tests.js | 4 ++-- .../static/src/components/message/tests/message_tests.js | 4 ++-- .../tests/notification_list_notification_group_tests.js | 4 ++-- .../static/src/components/discuss/tests/discuss_tests.js | 4 ++-- .../tests/messaging_notification_handler_tests.js | 4 ++-- .../src/components/activity/tests/activity_tests.js | 4 ++-- 82 files changed, 166 insertions(+), 166 deletions(-) diff --git a/addons/calendar/static/tests/systray_activity_menu_tests.js b/addons/calendar/static/tests/systray_activity_menu_tests.js index 65f0337b996..481f258f1bb 100644 --- a/addons/calendar/static/tests/systray_activity_menu_tests.js +++ b/addons/calendar/static/tests/systray_activity_menu_tests.js @@ -7,8 +7,8 @@ import testUtils from 'web.test_utils'; QUnit.module('calendar', {}, function () { QUnit.module('ActivityMenu', { - beforeEach() { - beforeEach(this); + async beforeEach() { + await beforeEach(this); Object.assign(this.data, { 'calendar.event': { diff --git a/addons/hr/static/tests/m2x_avatar_employee_tests.js b/addons/hr/static/tests/m2x_avatar_employee_tests.js index 46af4662854..3399c605a0a 100644 --- a/addons/hr/static/tests/m2x_avatar_employee_tests.js +++ b/addons/hr/static/tests/m2x_avatar_employee_tests.js @@ -15,8 +15,8 @@ import { dom, mock } from 'web.test_utils'; QUnit.module('hr', {}, function () { QUnit.module('M2XAvatarEmployee', { - beforeEach() { - beforeEach(this); + async beforeEach() { + await beforeEach(this); // reset the cache before each test Many2OneAvatarEmployee.prototype.partnerIds = {}; diff --git a/addons/hr_holidays/static/src/components/partner_im_status_icon/tests/partner_im_status_icon_tests.js b/addons/hr_holidays/static/src/components/partner_im_status_icon/tests/partner_im_status_icon_tests.js index fa6c77bb548..8fd3e0165e3 100644 --- a/addons/hr_holidays/static/src/components/partner_im_status_icon/tests/partner_im_status_icon_tests.js +++ b/addons/hr_holidays/static/src/components/partner_im_status_icon/tests/partner_im_status_icon_tests.js @@ -11,8 +11,8 @@ QUnit.module('hr_holidays', {}, function () { QUnit.module('components', {}, function () { QUnit.module('partner_im_status_icon', {}, function () { QUnit.module('partner_im_status_icon_tests.js', { - beforeEach() { - beforeEach(this); + async beforeEach() { + await beforeEach(this); this.createPartnerImStatusIcon = async partner => { await createRootMessagingComponent(this, "PartnerImStatusIcon", { diff --git a/addons/hr_holidays/static/src/components/thread_icon/tests/thread_icon_tests.js b/addons/hr_holidays/static/src/components/thread_icon/tests/thread_icon_tests.js index 78125ee3e93..ced19dbdd11 100644 --- a/addons/hr_holidays/static/src/components/thread_icon/tests/thread_icon_tests.js +++ b/addons/hr_holidays/static/src/components/thread_icon/tests/thread_icon_tests.js @@ -11,8 +11,8 @@ QUnit.module('mail', {}, function () { QUnit.module('components', {}, function () { QUnit.module('thread_icon', {}, function () { QUnit.module('thread_icon_tests.js', { - beforeEach() { - beforeEach(this); + async beforeEach() { + await beforeEach(this); this.createThreadIcon = async thread => { await createRootMessagingComponent(this, "ThreadIcon", { diff --git a/addons/hr_holidays/static/src/components/thread_view/tests/thread_view_tests.js b/addons/hr_holidays/static/src/components/thread_view/tests/thread_view_tests.js index 809fe732a7a..847eb72ff79 100644 --- a/addons/hr_holidays/static/src/components/thread_view/tests/thread_view_tests.js +++ b/addons/hr_holidays/static/src/components/thread_view/tests/thread_view_tests.js @@ -11,8 +11,8 @@ QUnit.module('hr_holidays', {}, function () { QUnit.module('components', {}, function () { QUnit.module('thread_view', {}, function () { QUnit.module('thread_view_tests.js', { - beforeEach() { - beforeEach(this); + async beforeEach() { + await beforeEach(this); this.start = async params => { const res = await start({ ...params, data: this.data }); diff --git a/addons/im_livechat/static/src/components/chat_window_manager/tests/chat_window_manager_tests.js b/addons/im_livechat/static/src/components/chat_window_manager/tests/chat_window_manager_tests.js index 73ce465f094..1a9ce10ef57 100644 --- a/addons/im_livechat/static/src/components/chat_window_manager/tests/chat_window_manager_tests.js +++ b/addons/im_livechat/static/src/components/chat_window_manager/tests/chat_window_manager_tests.js @@ -11,8 +11,8 @@ QUnit.module('im_livechat', {}, function () { QUnit.module('components', {}, function () { QUnit.module('chat_window_manager', {}, function () { QUnit.module('chat_window_manager_tests.js', { - beforeEach() { - beforeEach(this); + async beforeEach() { + await beforeEach(this); this.start = async params => { const res = await start(Object.assign( diff --git a/addons/im_livechat/static/src/components/composer/tests/composer_tests.js b/addons/im_livechat/static/src/components/composer/tests/composer_tests.js index 34f3018ab1a..09b6115591d 100644 --- a/addons/im_livechat/static/src/components/composer/tests/composer_tests.js +++ b/addons/im_livechat/static/src/components/composer/tests/composer_tests.js @@ -6,8 +6,8 @@ QUnit.module('im_livechat', {}, function () { QUnit.module('components', {}, function () { QUnit.module('composer', {}, function () { QUnit.module('composer_tests.js', { - beforeEach() { - beforeEach(this); + async beforeEach() { + await beforeEach(this); this.start = async params => { const res = await start({ ...params, data: this.data }); diff --git a/addons/im_livechat/static/src/components/discuss/tests/discuss_tests.js b/addons/im_livechat/static/src/components/discuss/tests/discuss_tests.js index 5d9b736e3cf..fd3d0754c7c 100644 --- a/addons/im_livechat/static/src/components/discuss/tests/discuss_tests.js +++ b/addons/im_livechat/static/src/components/discuss/tests/discuss_tests.js @@ -14,8 +14,8 @@ QUnit.module('im_livechat', {}, function () { QUnit.module('components', {}, function () { QUnit.module('discuss', {}, function () { QUnit.module('discuss_tests.js', { - beforeEach() { - beforeEach(this); + async beforeEach() { + await beforeEach(this); this.start = async params => { const { env, widget } = await start(Object.assign({}, params, { diff --git a/addons/im_livechat/static/src/components/discuss_sidebar_category/tests/discuss_sidebar_category_tests.js b/addons/im_livechat/static/src/components/discuss_sidebar_category/tests/discuss_sidebar_category_tests.js index 68d932f71a2..e3eba161ec6 100644 --- a/addons/im_livechat/static/src/components/discuss_sidebar_category/tests/discuss_sidebar_category_tests.js +++ b/addons/im_livechat/static/src/components/discuss_sidebar_category/tests/discuss_sidebar_category_tests.js @@ -11,8 +11,8 @@ QUnit.module('im_livechat', {}, function () { QUnit.module('components', {}, function () { QUnit.module('discuss_sidebar_category', {}, function () { QUnit.module('discuss_sidebar_category_tests.js', { - beforeEach() { - beforeEach(this); + async beforeEach() { + await beforeEach(this); this.start = async params => { const { env, widget } = await start(Object.assign({}, params, { diff --git a/addons/im_livechat/static/src/components/discuss_sidebar_category_item/tests/discuss_sidebar_category_item_tests.js b/addons/im_livechat/static/src/components/discuss_sidebar_category_item/tests/discuss_sidebar_category_item_tests.js index a853e345f9d..90744a4f54d 100644 --- a/addons/im_livechat/static/src/components/discuss_sidebar_category_item/tests/discuss_sidebar_category_item_tests.js +++ b/addons/im_livechat/static/src/components/discuss_sidebar_category_item/tests/discuss_sidebar_category_item_tests.js @@ -10,8 +10,8 @@ QUnit.module('im_livechat', {}, function () { QUnit.module('components', {}, function () { QUnit.module('discuss_sidebar_category_item', {}, function () { QUnit.module('discuss_sidebar_category_item_tests.js', { - beforeEach() { - beforeEach(this); + async beforeEach() { + await beforeEach(this); this.start = async params => { const { env, widget } = await start(Object.assign({}, params, { diff --git a/addons/im_livechat/static/src/components/messaging_menu/tests/messaging_menu_tests.js b/addons/im_livechat/static/src/components/messaging_menu/tests/messaging_menu_tests.js index cf200c187f5..cca1ee9e521 100644 --- a/addons/im_livechat/static/src/components/messaging_menu/tests/messaging_menu_tests.js +++ b/addons/im_livechat/static/src/components/messaging_menu/tests/messaging_menu_tests.js @@ -11,8 +11,8 @@ QUnit.module('im_livechat', {}, function () { QUnit.module('components', {}, function () { QUnit.module('messaging_menu', {}, function () { QUnit.module('messaging_menu_tests.js', { - beforeEach() { - beforeEach(this); + async beforeEach() { + await beforeEach(this); this.start = async params => { const res = await start(Object.assign({}, params, { diff --git a/addons/im_livechat/static/src/components/thread_icon/tests/thread_icon_tests.js b/addons/im_livechat/static/src/components/thread_icon/tests/thread_icon_tests.js index c96af73221a..a04f16d6a51 100644 --- a/addons/im_livechat/static/src/components/thread_icon/tests/thread_icon_tests.js +++ b/addons/im_livechat/static/src/components/thread_icon/tests/thread_icon_tests.js @@ -12,8 +12,8 @@ QUnit.module('im_livechat', {}, function () { QUnit.module('components', {}, function () { QUnit.module('thread_icon', {}, function () { QUnit.module('thread_icon_tests.js', { - beforeEach() { - beforeEach(this); + async beforeEach() { + await beforeEach(this); this.createThreadIcon = async thread => { await createRootMessagingComponent(this, "ThreadIcon", { diff --git a/addons/im_livechat/static/src/components/thread_textual_typing_status/tests/thread_textual_typing_status_tests.js b/addons/im_livechat/static/src/components/thread_textual_typing_status/tests/thread_textual_typing_status_tests.js index 0b5a69803b0..3b2f3088e12 100644 --- a/addons/im_livechat/static/src/components/thread_textual_typing_status/tests/thread_textual_typing_status_tests.js +++ b/addons/im_livechat/static/src/components/thread_textual_typing_status/tests/thread_textual_typing_status_tests.js @@ -12,8 +12,8 @@ QUnit.module('im_livechat', {}, function () { QUnit.module('components', {}, function () { QUnit.module('thread_textual_typing_status', {}, function () { QUnit.module('thread_textual_typing_status_tests.js', { - beforeEach() { - beforeEach(this); + async beforeEach() { + await beforeEach(this); this.createThreadTextualTypingStatusComponent = async thread => { await createRootMessagingComponent(this, "ThreadTextualTypingStatus", { diff --git a/addons/mail/static/src/components/activity/tests/activity_tests.js b/addons/mail/static/src/components/activity/tests/activity_tests.js index 2bceec8569e..3d496f45024 100644 --- a/addons/mail/static/src/components/activity/tests/activity_tests.js +++ b/addons/mail/static/src/components/activity/tests/activity_tests.js @@ -9,8 +9,8 @@ QUnit.module('mail', {}, function () { QUnit.module('components', {}, function () { QUnit.module('activity', {}, function () { QUnit.module('activity_tests.js', { - beforeEach() { - beforeEach(this); + async beforeEach() { + await beforeEach(this); this.start = async params => { const res = await start({ ...params, data: this.data }); diff --git a/addons/mail/static/src/components/activity_mark_done_popover/tests/activity_mark_done_popover_tests.js b/addons/mail/static/src/components/activity_mark_done_popover/tests/activity_mark_done_popover_tests.js index 441316059f3..6262a72ccec 100644 --- a/addons/mail/static/src/components/activity_mark_done_popover/tests/activity_mark_done_popover_tests.js +++ b/addons/mail/static/src/components/activity_mark_done_popover/tests/activity_mark_done_popover_tests.js @@ -8,8 +8,8 @@ QUnit.module('mail', {}, function () { QUnit.module('components', {}, function () { QUnit.module('activity_mark_done_popover', {}, function () { QUnit.module('activity_mark_done_popover_tests.js', { - beforeEach() { - beforeEach(this); + async beforeEach() { + await beforeEach(this); this.start = async params => { const res = await start({ ...params, data: this.data }); diff --git a/addons/mail/static/src/components/attachment_box/tests/attachment_box_tests.js b/addons/mail/static/src/components/attachment_box/tests/attachment_box_tests.js index cea1e04ec3d..55338d64e60 100644 --- a/addons/mail/static/src/components/attachment_box/tests/attachment_box_tests.js +++ b/addons/mail/static/src/components/attachment_box/tests/attachment_box_tests.js @@ -17,8 +17,8 @@ QUnit.module('mail', {}, function () { QUnit.module('components', {}, function () { QUnit.module('attachment_box', {}, function () { QUnit.module('attachment_box_tests.js', { - beforeEach() { - beforeEach(this); + async beforeEach() { + await beforeEach(this); this.start = async params => { const res = await start(Object.assign({}, params, { diff --git a/addons/mail/static/src/components/attachment_image/tests/attachment_image_tests.js b/addons/mail/static/src/components/attachment_image/tests/attachment_image_tests.js index cf4589a64e8..55dd8227d07 100644 --- a/addons/mail/static/src/components/attachment_image/tests/attachment_image_tests.js +++ b/addons/mail/static/src/components/attachment_image/tests/attachment_image_tests.js @@ -11,8 +11,8 @@ QUnit.module('mail', {}, function () { QUnit.module('components', {}, function () { QUnit.module('attachment_image', {}, function () { QUnit.module('attachment_image_tests.js', { - beforeEach() { - beforeEach(this); + async beforeEach() { + await beforeEach(this); this.start = async params => { const res = await start({ ...params, data: this.data }); diff --git a/addons/mail/static/src/components/attachment_list/tests/attachment_list_tests.js b/addons/mail/static/src/components/attachment_list/tests/attachment_list_tests.js index 3d1155dc856..0f0d5c71548 100644 --- a/addons/mail/static/src/components/attachment_list/tests/attachment_list_tests.js +++ b/addons/mail/static/src/components/attachment_list/tests/attachment_list_tests.js @@ -13,8 +13,8 @@ QUnit.module('mail', {}, function () { QUnit.module('components', {}, function () { QUnit.module('attachment_list', {}, function () { QUnit.module('attachment_list_tests.js', { - beforeEach() { - beforeEach(this); + async beforeEach() { + await beforeEach(this); this.start = async params => { const res = await start({ ...params, data: this.data }); diff --git a/addons/mail/static/src/components/channel_invitation_form/tests/channel_invitation_form_tests.js b/addons/mail/static/src/components/channel_invitation_form/tests/channel_invitation_form_tests.js index 254c81b4076..db691ffbde7 100644 --- a/addons/mail/static/src/components/channel_invitation_form/tests/channel_invitation_form_tests.js +++ b/addons/mail/static/src/components/channel_invitation_form/tests/channel_invitation_form_tests.js @@ -11,8 +11,8 @@ QUnit.module('mail', {}, function () { QUnit.module('components', {}, function () { QUnit.module('channel_invitation_form', {}, function () { QUnit.module('channel_invitation_form_tests.js', { - beforeEach() { - beforeEach(this); + async beforeEach() { + await beforeEach(this); this.start = async params => { const { env, widget } = await start(Object.assign({}, params, { diff --git a/addons/mail/static/src/components/chat_window_manager/tests/chat_window_manager_tests.js b/addons/mail/static/src/components/chat_window_manager/tests/chat_window_manager_tests.js index 65a0d303d88..7d578c7cbcb 100644 --- a/addons/mail/static/src/components/chat_window_manager/tests/chat_window_manager_tests.js +++ b/addons/mail/static/src/components/chat_window_manager/tests/chat_window_manager_tests.js @@ -17,8 +17,8 @@ QUnit.module('mail', {}, function () { QUnit.module('components', {}, function () { QUnit.module('chat_window_manager', {}, function () { QUnit.module('chat_window_manager_tests.js', { - beforeEach() { - beforeEach(this); + async beforeEach() { + await beforeEach(this); this.start = async params => { const res = await start(Object.assign( diff --git a/addons/mail/static/src/components/chatter/tests/chatter_suggested_recipient_tests.js b/addons/mail/static/src/components/chatter/tests/chatter_suggested_recipient_tests.js index 6601f5091aa..ea2a5c6835c 100644 --- a/addons/mail/static/src/components/chatter/tests/chatter_suggested_recipient_tests.js +++ b/addons/mail/static/src/components/chatter/tests/chatter_suggested_recipient_tests.js @@ -6,8 +6,8 @@ QUnit.module('mail', {}, function () { QUnit.module('components', {}, function () { QUnit.module('chatter', {}, function () { QUnit.module('chatter_suggested_recipients_tests.js', { - beforeEach() { - beforeEach(this); + async beforeEach() { + await beforeEach(this); this.start = async params => { const res = await start(Object.assign({}, params, { diff --git a/addons/mail/static/src/components/chatter/tests/chatter_tests.js b/addons/mail/static/src/components/chatter/tests/chatter_tests.js index c2e81d72eb7..c069fd574be 100644 --- a/addons/mail/static/src/components/chatter/tests/chatter_tests.js +++ b/addons/mail/static/src/components/chatter/tests/chatter_tests.js @@ -6,8 +6,8 @@ QUnit.module('mail', {}, function () { QUnit.module('components', {}, function () { QUnit.module('chatter', {}, function () { QUnit.module('chatter_tests.js', { - beforeEach() { - beforeEach(this); + async beforeEach() { + await beforeEach(this); this.start = async params => { const res = await start({ ...params, data: this.data }); diff --git a/addons/mail/static/src/components/chatter_topbar/tests/chatter_topbar_tests.js b/addons/mail/static/src/components/chatter_topbar/tests/chatter_topbar_tests.js index ac7fc6fb49d..ad29e8c8cd9 100644 --- a/addons/mail/static/src/components/chatter_topbar/tests/chatter_topbar_tests.js +++ b/addons/mail/static/src/components/chatter_topbar/tests/chatter_topbar_tests.js @@ -8,8 +8,8 @@ QUnit.module('mail', {}, function () { QUnit.module('components', {}, function () { QUnit.module('chatter_topbar', {}, function () { QUnit.module('chatter_topbar_tests.js', { - beforeEach() { - beforeEach(this); + async beforeEach() { + await beforeEach(this); this.start = async params => { const res = await start(Object.assign({}, params, { diff --git a/addons/mail/static/src/components/composer/tests/composer_tests.js b/addons/mail/static/src/components/composer/tests/composer_tests.js index 54eb7a5d0e5..c3d2af43d67 100644 --- a/addons/mail/static/src/components/composer/tests/composer_tests.js +++ b/addons/mail/static/src/components/composer/tests/composer_tests.js @@ -23,8 +23,8 @@ QUnit.module('mail', {}, function () { QUnit.module('components', {}, function () { QUnit.module('composer', {}, function () { QUnit.module('composer_tests.js', { - beforeEach() { - beforeEach(this); + async beforeEach() { + await beforeEach(this); this.start = async params => { const res = await start({ ...params, data: this.data }); diff --git a/addons/mail/static/src/components/composer_suggestion/tests/composer_suggestion_canned_response_tests.js b/addons/mail/static/src/components/composer_suggestion/tests/composer_suggestion_canned_response_tests.js index bf7300187b8..1c9e950aed2 100644 --- a/addons/mail/static/src/components/composer_suggestion/tests/composer_suggestion_canned_response_tests.js +++ b/addons/mail/static/src/components/composer_suggestion/tests/composer_suggestion_canned_response_tests.js @@ -6,8 +6,8 @@ QUnit.module('mail', {}, function () { QUnit.module('components', {}, function () { QUnit.module('composer_suggestion', {}, function () { QUnit.module('composer_suggestion_canned_response_tests.js', { - beforeEach() { - beforeEach(this); + async beforeEach() { + await beforeEach(this); this.start = async params => { const res = await start({ ...params, data: this.data }); diff --git a/addons/mail/static/src/components/composer_suggestion/tests/composer_suggestion_channel_tests.js b/addons/mail/static/src/components/composer_suggestion/tests/composer_suggestion_channel_tests.js index 1f17f95c60e..4932e97f8c8 100644 --- a/addons/mail/static/src/components/composer_suggestion/tests/composer_suggestion_channel_tests.js +++ b/addons/mail/static/src/components/composer_suggestion/tests/composer_suggestion_channel_tests.js @@ -6,8 +6,8 @@ QUnit.module('mail', {}, function () { QUnit.module('components', {}, function () { QUnit.module('composer_suggestion', {}, function () { QUnit.module('composer_suggestion_channel_tests.js', { - beforeEach() { - beforeEach(this); + async beforeEach() { + await beforeEach(this); this.start = async params => { const res = await start({ ...params, data: this.data }); diff --git a/addons/mail/static/src/components/composer_suggestion/tests/composer_suggestion_command_tests.js b/addons/mail/static/src/components/composer_suggestion/tests/composer_suggestion_command_tests.js index 7c806b3515c..88409937be2 100644 --- a/addons/mail/static/src/components/composer_suggestion/tests/composer_suggestion_command_tests.js +++ b/addons/mail/static/src/components/composer_suggestion/tests/composer_suggestion_command_tests.js @@ -6,8 +6,8 @@ QUnit.module('mail', {}, function () { QUnit.module('components', {}, function () { QUnit.module('composer_suggestion', {}, function () { QUnit.module('composer_suggestion_command_tests.js', { - beforeEach() { - beforeEach(this); + async beforeEach() { + await beforeEach(this); this.start = async params => { const res = await start({ ...params, data: this.data }); diff --git a/addons/mail/static/src/components/composer_suggestion/tests/composer_suggestion_partner_tests.js b/addons/mail/static/src/components/composer_suggestion/tests/composer_suggestion_partner_tests.js index 34ec74607a3..099558ddd63 100644 --- a/addons/mail/static/src/components/composer_suggestion/tests/composer_suggestion_partner_tests.js +++ b/addons/mail/static/src/components/composer_suggestion/tests/composer_suggestion_partner_tests.js @@ -6,8 +6,8 @@ QUnit.module('mail', {}, function () { QUnit.module('components', {}, function () { QUnit.module('composer_suggestion', {}, function () { QUnit.module('composer_suggestion_partner_tests.js', { - beforeEach() { - beforeEach(this); + async beforeEach() { + await beforeEach(this); this.start = async params => { const res = await start({ ...params, data: this.data }); diff --git a/addons/mail/static/src/components/dialog_manager/tests/dialog_manager_tests.js b/addons/mail/static/src/components/dialog_manager/tests/dialog_manager_tests.js index a5833292abd..9cf8a8271e4 100644 --- a/addons/mail/static/src/components/dialog_manager/tests/dialog_manager_tests.js +++ b/addons/mail/static/src/components/dialog_manager/tests/dialog_manager_tests.js @@ -12,8 +12,8 @@ QUnit.module('mail', {}, function () { QUnit.module('components', {}, function () { QUnit.module('dialog_manager', {}, function () { QUnit.module('dialog_manager_tests.js', { - beforeEach() { - beforeEach(this); + async beforeEach() { + await beforeEach(this); this.start = async params => { const { env, widget } = await start(Object.assign( diff --git a/addons/mail/static/src/components/discuss/tests/discuss_inbox_tests.js b/addons/mail/static/src/components/discuss/tests/discuss_inbox_tests.js index a140aba777c..4375fed68dd 100644 --- a/addons/mail/static/src/components/discuss/tests/discuss_inbox_tests.js +++ b/addons/mail/static/src/components/discuss/tests/discuss_inbox_tests.js @@ -14,8 +14,8 @@ QUnit.module('mail', {}, function () { QUnit.module('components', {}, function () { QUnit.module('discuss', {}, function () { QUnit.module('discuss_inbox_tests.js', { - beforeEach() { - beforeEach(this); + async beforeEach() { + await beforeEach(this); this.start = async params => { const { env, widget } = await start(Object.assign({}, params, { diff --git a/addons/mail/static/src/components/discuss/tests/discuss_message_edit_tests.js b/addons/mail/static/src/components/discuss/tests/discuss_message_edit_tests.js index a06bb3e531b..7b5a22fab49 100644 --- a/addons/mail/static/src/components/discuss/tests/discuss_message_edit_tests.js +++ b/addons/mail/static/src/components/discuss/tests/discuss_message_edit_tests.js @@ -6,8 +6,8 @@ QUnit.module('mail', {}, function () { QUnit.module('components', {}, function () { QUnit.module('discuss', {}, function () { QUnit.module('discuss_message_edit_tests.js', { - beforeEach() { - beforeEach(this); + async beforeEach() { + await beforeEach(this); this.start = async params => { const res = await start(Object.assign({}, params, { diff --git a/addons/mail/static/src/components/discuss/tests/discuss_pinned_tests.js b/addons/mail/static/src/components/discuss/tests/discuss_pinned_tests.js index 4964d1f033f..68ad3cfc361 100644 --- a/addons/mail/static/src/components/discuss/tests/discuss_pinned_tests.js +++ b/addons/mail/static/src/components/discuss/tests/discuss_pinned_tests.js @@ -11,8 +11,8 @@ QUnit.module('mail', {}, function () { QUnit.module('components', {}, function () { QUnit.module('discuss', {}, function () { QUnit.module('discuss_pinned_tests.js', { - beforeEach() { - beforeEach(this); + async beforeEach() { + await beforeEach(this); this.start = async params => { const { env, widget } = await start(Object.assign({}, params, { diff --git a/addons/mail/static/src/components/discuss/tests/discuss_sidebar_tests.js b/addons/mail/static/src/components/discuss/tests/discuss_sidebar_tests.js index d2a6f330fd7..951ac1292b1 100644 --- a/addons/mail/static/src/components/discuss/tests/discuss_sidebar_tests.js +++ b/addons/mail/static/src/components/discuss/tests/discuss_sidebar_tests.js @@ -13,8 +13,8 @@ QUnit.module('mail', {}, function () { QUnit.module('components', {}, function () { QUnit.module('discuss', {}, function () { QUnit.module('discuss_sidebar_tests.js', { - beforeEach() { - beforeEach(this); + async beforeEach() { + await beforeEach(this); this.start = async params => { const { env, widget } = await start(Object.assign({}, params, { diff --git a/addons/mail/static/src/components/discuss/tests/discuss_tests.js b/addons/mail/static/src/components/discuss/tests/discuss_tests.js index c45c1ad6260..b14a86732f0 100644 --- a/addons/mail/static/src/components/discuss/tests/discuss_tests.js +++ b/addons/mail/static/src/components/discuss/tests/discuss_tests.js @@ -19,8 +19,8 @@ QUnit.module('mail', {}, function () { QUnit.module('components', {}, function () { QUnit.module('discuss', {}, function () { QUnit.module('discuss_tests.js', { - beforeEach() { - beforeEach(this); + async beforeEach() { + await beforeEach(this); this.start = async params => { const res = await start(Object.assign({}, params, { diff --git a/addons/mail/static/src/components/discuss_mobile_mailbox_selection/mobile_tests/discuss_mobile_mailbox_selection_tests.js b/addons/mail/static/src/components/discuss_mobile_mailbox_selection/mobile_tests/discuss_mobile_mailbox_selection_tests.js index 17b02eb8aa5..828fa790ed3 100644 --- a/addons/mail/static/src/components/discuss_mobile_mailbox_selection/mobile_tests/discuss_mobile_mailbox_selection_tests.js +++ b/addons/mail/static/src/components/discuss_mobile_mailbox_selection/mobile_tests/discuss_mobile_mailbox_selection_tests.js @@ -11,8 +11,8 @@ QUnit.module('mail', {}, function () { QUnit.module('components', {}, function () { QUnit.module('discuss_mobile_mailbox_selection', {}, function () { QUnit.module('discuss_mobile_mailbox_selection_tests.js', { - beforeEach() { - beforeEach(this); + async beforeEach() { + await beforeEach(this); this.start = async params => { const { env, widget } = await start(Object.assign( diff --git a/addons/mail/static/src/components/discuss_sidebar_category/tests/discuss_sidebar_category_tests.js b/addons/mail/static/src/components/discuss_sidebar_category/tests/discuss_sidebar_category_tests.js index bc3e1b25647..fb97f7a1f1a 100644 --- a/addons/mail/static/src/components/discuss_sidebar_category/tests/discuss_sidebar_category_tests.js +++ b/addons/mail/static/src/components/discuss_sidebar_category/tests/discuss_sidebar_category_tests.js @@ -11,8 +11,8 @@ QUnit.module('mail', {}, function () { QUnit.module('components', {}, function () { QUnit.module('discuss_sidebar_category', {}, function () { QUnit.module('discuss_sidebar_category_tests.js', { - beforeEach() { - beforeEach(this); + async beforeEach() { + await beforeEach(this); this.start = async params => { const { env, widget } = await start(Object.assign({}, params, { diff --git a/addons/mail/static/src/components/discuss_sidebar_category_item/tests/discuss_sidebar_category_item_tests.js b/addons/mail/static/src/components/discuss_sidebar_category_item/tests/discuss_sidebar_category_item_tests.js index 9fffd1e94a1..3bad19c38ec 100644 --- a/addons/mail/static/src/components/discuss_sidebar_category_item/tests/discuss_sidebar_category_item_tests.js +++ b/addons/mail/static/src/components/discuss_sidebar_category_item/tests/discuss_sidebar_category_item_tests.js @@ -13,8 +13,8 @@ QUnit.module('mail', {}, function () { QUnit.module('components', {}, function () { QUnit.module('discuss_sidebar_category_item', {}, function () { QUnit.module('discuss_sidebar_category_item_tests.js', { - beforeEach() { - beforeEach(this); + async beforeEach() { + await beforeEach(this); this.start = async params => { const { env, widget } = await start(Object.assign({}, params, { diff --git a/addons/mail/static/src/components/file_uploader/tests/file_uploader_tests.js b/addons/mail/static/src/components/file_uploader/tests/file_uploader_tests.js index 0030ac26e53..8482f3a821a 100644 --- a/addons/mail/static/src/components/file_uploader/tests/file_uploader_tests.js +++ b/addons/mail/static/src/components/file_uploader/tests/file_uploader_tests.js @@ -9,8 +9,8 @@ QUnit.module('mail', {}, function () { QUnit.module('components', {}, function () { QUnit.module('file_uploader', {}, function () { QUnit.module('file_uploader_tests.js', { - beforeEach() { - beforeEach(this); + async beforeEach() { + await beforeEach(this); this.apps = []; this.start = async params => { diff --git a/addons/mail/static/src/components/follow_button/tests/follow_button_tests.js b/addons/mail/static/src/components/follow_button/tests/follow_button_tests.js index 1f35c2af9a3..3d41b0f5737 100644 --- a/addons/mail/static/src/components/follow_button/tests/follow_button_tests.js +++ b/addons/mail/static/src/components/follow_button/tests/follow_button_tests.js @@ -12,8 +12,8 @@ QUnit.module('mail', {}, function () { QUnit.module('components', {}, function () { QUnit.module('follow_button', {}, function () { QUnit.module('follow_button_tests.js', { - beforeEach() { - beforeEach(this); + async beforeEach() { + await beforeEach(this); this.createFollowButtonComponent = async (thread, otherProps = {}) => { const props = Object.assign({ threadLocalId: thread.localId }, otherProps); diff --git a/addons/mail/static/src/components/follower/tests/follower_tests.js b/addons/mail/static/src/components/follower/tests/follower_tests.js index b59cc761219..ab947dcbdfe 100644 --- a/addons/mail/static/src/components/follower/tests/follower_tests.js +++ b/addons/mail/static/src/components/follower/tests/follower_tests.js @@ -16,8 +16,8 @@ QUnit.module('mail', {}, function () { QUnit.module('components', {}, function () { QUnit.module('follower', {}, function () { QUnit.module('follower_tests.js', { - beforeEach() { - beforeEach(this); + async beforeEach() { + await beforeEach(this); this.createFollowerComponent = async (follower) => { await createRootMessagingComponent(this, "Follower", { diff --git a/addons/mail/static/src/components/follower_list_menu/tests/follower_list_menu_tests.js b/addons/mail/static/src/components/follower_list_menu/tests/follower_list_menu_tests.js index bd2d02da12f..4d90a760f04 100644 --- a/addons/mail/static/src/components/follower_list_menu/tests/follower_list_menu_tests.js +++ b/addons/mail/static/src/components/follower_list_menu/tests/follower_list_menu_tests.js @@ -15,8 +15,8 @@ QUnit.module('mail', {}, function () { QUnit.module('components', {}, function () { QUnit.module('follower_list_menu', {}, function () { QUnit.module('follower_list_menu_tests.js', { - beforeEach() { - beforeEach(this); + async beforeEach() { + await beforeEach(this); this.createFollowerListMenuComponent = async (thread, otherProps = {}) => { const props = Object.assign({ threadLocalId: thread.localId }, otherProps); diff --git a/addons/mail/static/src/components/follower_subtype/tests/follower_subtype_tests.js b/addons/mail/static/src/components/follower_subtype/tests/follower_subtype_tests.js index ad2cfe5935b..c81307bb8ac 100644 --- a/addons/mail/static/src/components/follower_subtype/tests/follower_subtype_tests.js +++ b/addons/mail/static/src/components/follower_subtype/tests/follower_subtype_tests.js @@ -13,8 +13,8 @@ QUnit.module('mail', {}, function () { QUnit.module('components', {}, function () { QUnit.module('follower_subtype', {}, function () { QUnit.module('follower_subtype_tests.js', { - beforeEach() { - beforeEach(this); + async beforeEach() { + await beforeEach(this); this.createFollowerSubtypeComponent = async ({ follower, followerSubtype }) => { const props = { diff --git a/addons/mail/static/src/components/message/tests/message_tests.js b/addons/mail/static/src/components/message/tests/message_tests.js index 04f812cc708..95a24a04f23 100644 --- a/addons/mail/static/src/components/message/tests/message_tests.js +++ b/addons/mail/static/src/components/message/tests/message_tests.js @@ -17,8 +17,8 @@ QUnit.module('mail', {}, function () { QUnit.module('components', {}, function () { QUnit.module('message', {}, function () { QUnit.module('message_tests.js', { - beforeEach() { - beforeEach(this); + async beforeEach() { + await beforeEach(this); this.start = async params => { const res = await start({ ...params, data: this.data }); diff --git a/addons/mail/static/src/components/message_seen_indicator/tests/message_seen_indicator_tests.js b/addons/mail/static/src/components/message_seen_indicator/tests/message_seen_indicator_tests.js index 43542a256ec..8fa78b3e822 100644 --- a/addons/mail/static/src/components/message_seen_indicator/tests/message_seen_indicator_tests.js +++ b/addons/mail/static/src/components/message_seen_indicator/tests/message_seen_indicator_tests.js @@ -12,8 +12,8 @@ QUnit.module('mail', {}, function () { QUnit.module('components', {}, function () { QUnit.module('message_seen_indicator', {}, function () { QUnit.module('message_seen_indicator_tests.js', { - beforeEach() { - beforeEach(this); + async beforeEach() { + await beforeEach(this); this.createMessageSeenIndicatorComponent = async ({ message, thread }, otherProps) => { const props = Object.assign( diff --git a/addons/mail/static/src/components/messaging_menu/tests/messaging_menu_tests.js b/addons/mail/static/src/components/messaging_menu/tests/messaging_menu_tests.js index 25c848958af..521a802a58b 100644 --- a/addons/mail/static/src/components/messaging_menu/tests/messaging_menu_tests.js +++ b/addons/mail/static/src/components/messaging_menu/tests/messaging_menu_tests.js @@ -14,8 +14,8 @@ QUnit.module('mail', {}, function () { QUnit.module('components', {}, function () { QUnit.module('messaging_menu', {}, function () { QUnit.module('messaging_menu_tests.js', { - beforeEach() { - beforeEach(this); + async beforeEach() { + await beforeEach(this); this.start = async params => { const res = await start(Object.assign({}, params, { diff --git a/addons/mail/static/src/components/notification_list/tests/notification_list_notification_group_tests.js b/addons/mail/static/src/components/notification_list/tests/notification_list_notification_group_tests.js index 5aecaeebb7e..c5fbe6e5c66 100644 --- a/addons/mail/static/src/components/notification_list/tests/notification_list_notification_group_tests.js +++ b/addons/mail/static/src/components/notification_list/tests/notification_list_notification_group_tests.js @@ -8,8 +8,8 @@ QUnit.module('mail', {}, function () { QUnit.module('components', {}, function () { QUnit.module('notification_list', {}, function () { QUnit.module('notification_list_notification_group_tests.js', { - beforeEach() { - beforeEach(this); + async beforeEach() { + await beforeEach(this); this.start = async params => { const res = await start(Object.assign({}, params, { diff --git a/addons/mail/static/src/components/notification_list/tests/notification_list_tests.js b/addons/mail/static/src/components/notification_list/tests/notification_list_tests.js index 2930800d7c0..664161733c6 100644 --- a/addons/mail/static/src/components/notification_list/tests/notification_list_tests.js +++ b/addons/mail/static/src/components/notification_list/tests/notification_list_tests.js @@ -6,8 +6,8 @@ QUnit.module('mail', {}, function () { QUnit.module('components', {}, function () { QUnit.module('notification_list', {}, function () { QUnit.module('notification_list_tests.js', { - beforeEach() { - beforeEach(this); + async beforeEach() { + await beforeEach(this); this.start = async params => { const res = await start(Object.assign({}, params, { diff --git a/addons/mail/static/src/components/partner_im_status_icon/tests/partner_im_status_icon_tests.js b/addons/mail/static/src/components/partner_im_status_icon/tests/partner_im_status_icon_tests.js index 5ce50bdf0bb..95b14deae67 100644 --- a/addons/mail/static/src/components/partner_im_status_icon/tests/partner_im_status_icon_tests.js +++ b/addons/mail/static/src/components/partner_im_status_icon/tests/partner_im_status_icon_tests.js @@ -12,8 +12,8 @@ QUnit.module('mail', {}, function () { QUnit.module('components', {}, function () { QUnit.module('partner_im_status_icon', {}, function () { QUnit.module('partner_im_status_icon_tests.js', { - beforeEach() { - beforeEach(this); + async beforeEach() { + await beforeEach(this); this.createPartnerImStatusIcon = async partner => { await createRootMessagingComponent(this, "PartnerImStatusIcon", { diff --git a/addons/mail/static/src/components/thread_icon/tests/thread_icon_tests.js b/addons/mail/static/src/components/thread_icon/tests/thread_icon_tests.js index c2a00761368..383ee488ed2 100644 --- a/addons/mail/static/src/components/thread_icon/tests/thread_icon_tests.js +++ b/addons/mail/static/src/components/thread_icon/tests/thread_icon_tests.js @@ -12,8 +12,8 @@ QUnit.module('mail', {}, function () { QUnit.module('components', {}, function () { QUnit.module('thread_icon', {}, function () { QUnit.module('thread_icon_tests.js', { - beforeEach() { - beforeEach(this); + async beforeEach() { + await beforeEach(this); this.createThreadIcon = async thread => { await createRootMessagingComponent(this, "ThreadIcon", { diff --git a/addons/mail/static/src/components/thread_needaction_preview/tests/thread_needaction_preview_tests.js b/addons/mail/static/src/components/thread_needaction_preview/tests/thread_needaction_preview_tests.js index c7bd28e5bf1..17c4b2a3d9b 100644 --- a/addons/mail/static/src/components/thread_needaction_preview/tests/thread_needaction_preview_tests.js +++ b/addons/mail/static/src/components/thread_needaction_preview/tests/thread_needaction_preview_tests.js @@ -8,8 +8,8 @@ QUnit.module('mail', {}, function () { QUnit.module('components', {}, function () { QUnit.module('thread_needaction_preview', {}, function () { QUnit.module('thread_needaction_preview_tests.js', { - beforeEach() { - beforeEach(this); + async beforeEach() { + await beforeEach(this); this.start = async params => { const res = await start(Object.assign({}, params, { diff --git a/addons/mail/static/src/components/thread_preview/tests/thread_preview_tests.js b/addons/mail/static/src/components/thread_preview/tests/thread_preview_tests.js index 56363cc0604..ed8bf22da98 100644 --- a/addons/mail/static/src/components/thread_preview/tests/thread_preview_tests.js +++ b/addons/mail/static/src/components/thread_preview/tests/thread_preview_tests.js @@ -6,8 +6,8 @@ QUnit.module('mail', {}, function () { QUnit.module('components', {}, function () { QUnit.module('thread_preview', {}, function () { QUnit.module('thread_preview_tests.js', { - beforeEach() { - beforeEach(this); + async beforeEach() { + await beforeEach(this); this.start = async params => { const res = await start(Object.assign({}, params, { diff --git a/addons/mail/static/src/components/thread_textual_typing_status/tests/thread_textual_typing_status_tests.js b/addons/mail/static/src/components/thread_textual_typing_status/tests/thread_textual_typing_status_tests.js index a7c1bbdfda6..7a035094865 100644 --- a/addons/mail/static/src/components/thread_textual_typing_status/tests/thread_textual_typing_status_tests.js +++ b/addons/mail/static/src/components/thread_textual_typing_status/tests/thread_textual_typing_status_tests.js @@ -13,8 +13,8 @@ QUnit.module('mail', {}, function () { QUnit.module('components', {}, function () { QUnit.module('thread_textual_typing_status', {}, function () { QUnit.module('thread_textual_typing_status_tests.js', { - beforeEach() { - beforeEach(this); + async beforeEach() { + await beforeEach(this); this.createThreadTextualTypingStatusComponent = async thread => { await createRootMessagingComponent(this, "ThreadTextualTypingStatus", { diff --git a/addons/mail/static/src/components/thread_view/tests/thread_view_tests.js b/addons/mail/static/src/components/thread_view/tests/thread_view_tests.js index 83e803ccac4..977f3337895 100644 --- a/addons/mail/static/src/components/thread_view/tests/thread_view_tests.js +++ b/addons/mail/static/src/components/thread_view/tests/thread_view_tests.js @@ -13,8 +13,8 @@ QUnit.module('mail', {}, function () { QUnit.module('components', {}, function () { QUnit.module('thread_view', {}, function () { QUnit.module('thread_view_tests.js', { - beforeEach() { - beforeEach(this); + async beforeEach() { + await beforeEach(this); this.start = async params => { const res = await start({ ...params, data: this.data }); diff --git a/addons/mail/static/src/model/tests/model_field_command/clear_tests.js b/addons/mail/static/src/model/tests/model_field_command/clear_tests.js index f03090ac8c1..75a3a5bcd00 100644 --- a/addons/mail/static/src/model/tests/model_field_command/clear_tests.js +++ b/addons/mail/static/src/model/tests/model_field_command/clear_tests.js @@ -11,8 +11,8 @@ QUnit.module('mail', {}, function () { QUnit.module('model', {}, function () { QUnit.module('model_field_command', {}, function () { QUnit.module('clear_tests.js', { - beforeEach() { - beforeEach(this); + async beforeEach() { + await beforeEach(this); this.start = async params => { const { env, widget } = await start(Object.assign({}, params, { data: this.data, diff --git a/addons/mail/static/src/model/tests/model_field_command/insert_and_replace_tests.js b/addons/mail/static/src/model/tests/model_field_command/insert_and_replace_tests.js index 5ec030f3a00..8d9d3814eda 100644 --- a/addons/mail/static/src/model/tests/model_field_command/insert_and_replace_tests.js +++ b/addons/mail/static/src/model/tests/model_field_command/insert_and_replace_tests.js @@ -11,8 +11,8 @@ QUnit.module('mail', {}, function () { QUnit.module('model', {}, function () { QUnit.module('model_field_command', {}, function () { QUnit.module('insert_and_replace_tests.js', { - beforeEach() { - beforeEach(this); + async beforeEach() { + await beforeEach(this); this.start = async params => { const { env, widget } = await start(Object.assign({}, params, { data: this.data, diff --git a/addons/mail/static/src/model/tests/model_field_command/insert_tests.js b/addons/mail/static/src/model/tests/model_field_command/insert_tests.js index 9aa73394282..3103e1176a0 100644 --- a/addons/mail/static/src/model/tests/model_field_command/insert_tests.js +++ b/addons/mail/static/src/model/tests/model_field_command/insert_tests.js @@ -11,8 +11,8 @@ QUnit.module('mail', {}, function () { QUnit.module('model', {}, function () { QUnit.module('model_field_command', {}, function () { QUnit.module('insert_tests.js', { - beforeEach() { - beforeEach(this); + async beforeEach() { + await beforeEach(this); this.start = async params => { const { env, widget } = await start(Object.assign({}, params, { data: this.data, diff --git a/addons/mail/static/src/model/tests/model_field_command/link_tests.js b/addons/mail/static/src/model/tests/model_field_command/link_tests.js index 84de51905e2..07884d76b2b 100644 --- a/addons/mail/static/src/model/tests/model_field_command/link_tests.js +++ b/addons/mail/static/src/model/tests/model_field_command/link_tests.js @@ -11,8 +11,8 @@ QUnit.module('mail', {}, function () { QUnit.module('model', {}, function () { QUnit.module('model_field_command', {}, function () { QUnit.module('field_command_link_tests.js', { - beforeEach() { - beforeEach(this); + async beforeEach() { + await beforeEach(this); this.start = async params => { const { env, widget } = await start(Object.assign({}, params, { data: this.data, diff --git a/addons/mail/static/src/model/tests/model_field_command/replace_tests.js b/addons/mail/static/src/model/tests/model_field_command/replace_tests.js index 3055893f663..3ef8f0b7f77 100644 --- a/addons/mail/static/src/model/tests/model_field_command/replace_tests.js +++ b/addons/mail/static/src/model/tests/model_field_command/replace_tests.js @@ -11,8 +11,8 @@ QUnit.module('mail', {}, function () { QUnit.module('model', {}, function () { QUnit.module('model_field_command', {}, function () { QUnit.module('replace_tests.js', { - beforeEach() { - beforeEach(this); + async beforeEach() { + await beforeEach(this); this.start = async params => { const { env, widget } = await start(Object.assign({}, params, { data: this.data, diff --git a/addons/mail/static/src/model/tests/model_field_command/set_tests.js b/addons/mail/static/src/model/tests/model_field_command/set_tests.js index 3d15267fe22..d27aa44b9d1 100644 --- a/addons/mail/static/src/model/tests/model_field_command/set_tests.js +++ b/addons/mail/static/src/model/tests/model_field_command/set_tests.js @@ -15,8 +15,8 @@ QUnit.module('mail', {}, function () { QUnit.module('model', {}, function () { QUnit.module('model_field_command', {}, function () { QUnit.module('set_tests.js', { - beforeEach() { - beforeEach(this); + async beforeEach() { + await beforeEach(this); this.start = async params => { const { env, widget } = await start(Object.assign({}, params, { data: this.data, diff --git a/addons/mail/static/src/model/tests/model_field_command/unlink_all_tests.js b/addons/mail/static/src/model/tests/model_field_command/unlink_all_tests.js index 59b5fc1776d..2b7050ed5d2 100644 --- a/addons/mail/static/src/model/tests/model_field_command/unlink_all_tests.js +++ b/addons/mail/static/src/model/tests/model_field_command/unlink_all_tests.js @@ -11,8 +11,8 @@ QUnit.module('mail', {}, function () { QUnit.module('model', {}, function () { QUnit.module('model_field_command', {}, function () { QUnit.module('unlink_all_tests.js', { - beforeEach() { - beforeEach(this); + async beforeEach() { + await beforeEach(this); this.start = async params => { const { env, widget } = await start(Object.assign({}, params, { data: this.data, diff --git a/addons/mail/static/src/model/tests/model_field_command/unlink_tests.js b/addons/mail/static/src/model/tests/model_field_command/unlink_tests.js index c705c05a157..f920c632ab0 100644 --- a/addons/mail/static/src/model/tests/model_field_command/unlink_tests.js +++ b/addons/mail/static/src/model/tests/model_field_command/unlink_tests.js @@ -11,8 +11,8 @@ QUnit.module('mail', {}, function () { QUnit.module('model', {}, function () { QUnit.module('model_field_command', {}, function () { QUnit.module('unlink_tests.js', { - beforeEach() { - beforeEach(this); + async beforeEach() { + await beforeEach(this); this.start = async params => { const { env, widget } = await start(Object.assign({}, params, { data: this.data, diff --git a/addons/mail/static/src/models/attachment/tests/attachment_tests.js b/addons/mail/static/src/models/attachment/tests/attachment_tests.js index ba8ef35d029..1a27f1d3f81 100644 --- a/addons/mail/static/src/models/attachment/tests/attachment_tests.js +++ b/addons/mail/static/src/models/attachment/tests/attachment_tests.js @@ -6,8 +6,8 @@ QUnit.module('mail', {}, function () { QUnit.module('models', {}, function () { QUnit.module('attachment', {}, function () { QUnit.module('attachment_tests.js', { - beforeEach() { - beforeEach(this); + async beforeEach() { + await beforeEach(this); this.start = async params => { const { env, widget } = await start(Object.assign({}, params, { diff --git a/addons/mail/static/src/models/message/tests/message_tests.js b/addons/mail/static/src/models/message/tests/message_tests.js index e0c5a8bcedf..e7d2dd88f97 100644 --- a/addons/mail/static/src/models/message/tests/message_tests.js +++ b/addons/mail/static/src/models/message/tests/message_tests.js @@ -9,8 +9,8 @@ QUnit.module('mail', {}, function () { QUnit.module('models', {}, function () { QUnit.module('message', {}, function () { QUnit.module('message_tests.js', { - beforeEach() { - beforeEach(this); + async beforeEach() { + await beforeEach(this); this.start = async params => { const { env, widget } = await start(Object.assign({}, params, { diff --git a/addons/mail/static/src/models/messaging/tests/messaging_tests.js b/addons/mail/static/src/models/messaging/tests/messaging_tests.js index c5aec0d5bf1..ba0bc3d7d36 100644 --- a/addons/mail/static/src/models/messaging/tests/messaging_tests.js +++ b/addons/mail/static/src/models/messaging/tests/messaging_tests.js @@ -6,8 +6,8 @@ QUnit.module('mail', {}, function () { QUnit.module('models', {}, function () { QUnit.module('messaging', {}, function () { QUnit.module('messaging_tests.js', { - beforeEach() { - beforeEach(this); + async beforeEach() { + await beforeEach(this); this.start = async params => { const { env, widget } = await start(Object.assign({}, params, { diff --git a/addons/mail/static/src/models/messaging_menu/tests/messaging_menu_tests.js b/addons/mail/static/src/models/messaging_menu/tests/messaging_menu_tests.js index 4a1e44c2bb8..6809a166abd 100644 --- a/addons/mail/static/src/models/messaging_menu/tests/messaging_menu_tests.js +++ b/addons/mail/static/src/models/messaging_menu/tests/messaging_menu_tests.js @@ -6,8 +6,8 @@ QUnit.module('mail', {}, function () { QUnit.module('models', {}, function () { QUnit.module('messaging_menu', {}, function () { QUnit.module('messaging_menu_tests.js', { - beforeEach() { - beforeEach(this); + async beforeEach() { + await beforeEach(this); this.start = async params => { const { env } = await start({ data: this.data, ...params }); diff --git a/addons/mail/static/src/models/thread/tests/thread_tests.js b/addons/mail/static/src/models/thread/tests/thread_tests.js index 9ec2b27944e..89746b0b040 100644 --- a/addons/mail/static/src/models/thread/tests/thread_tests.js +++ b/addons/mail/static/src/models/thread/tests/thread_tests.js @@ -7,8 +7,8 @@ QUnit.module('mail', {}, function () { QUnit.module('models', {}, function () { QUnit.module('thread', {}, function () { QUnit.module('thread_tests.js', { - beforeEach() { - beforeEach(this); + async beforeEach() { + await beforeEach(this); this.start = async params => { const { env, widget } = await start(Object.assign({}, params, { diff --git a/addons/mail/static/src/utils/throttle/tests/throttle_tests.js b/addons/mail/static/src/utils/throttle/tests/throttle_tests.js index df3cc3d846d..4f4e3a02ef1 100644 --- a/addons/mail/static/src/utils/throttle/tests/throttle_tests.js +++ b/addons/mail/static/src/utils/throttle/tests/throttle_tests.js @@ -10,8 +10,8 @@ QUnit.module('mail', {}, function () { QUnit.module('utils', {}, function () { QUnit.module('throttle', {}, function () { QUnit.module('throttle_tests.js', { - beforeEach() { - beforeEach(this); + async beforeEach() { + await beforeEach(this); this.throttles = []; this.start = async params => { diff --git a/addons/mail/static/src/utils/timer/tests/timer_tests.js b/addons/mail/static/src/utils/timer/tests/timer_tests.js index 7b2c2067651..2c3e2500424 100644 --- a/addons/mail/static/src/utils/timer/tests/timer_tests.js +++ b/addons/mail/static/src/utils/timer/tests/timer_tests.js @@ -9,8 +9,8 @@ QUnit.module('mail', {}, function () { QUnit.module('utils', {}, function () { QUnit.module('timer', {}, function () { QUnit.module('timer_tests.js', { - beforeEach() { - beforeEach(this); + async beforeEach() { + await beforeEach(this); this.timers = []; this.start = async (params) => { diff --git a/addons/mail/static/src/widgets/form_renderer/tests/form_renderer_tests.js b/addons/mail/static/src/widgets/form_renderer/tests/form_renderer_tests.js index 69a9ca1b570..d18085eee0c 100644 --- a/addons/mail/static/src/widgets/form_renderer/tests/form_renderer_tests.js +++ b/addons/mail/static/src/widgets/form_renderer/tests/form_renderer_tests.js @@ -21,8 +21,8 @@ QUnit.module('mail', {}, function () { QUnit.module('widgets', {}, function () { QUnit.module('form_renderer', {}, function () { QUnit.module('form_renderer_tests.js', { - beforeEach() { - beforeEach(this); + async beforeEach() { + await beforeEach(this); // FIXME archs could be removed once task-2248306 is done // The mockServer will try to get the list view diff --git a/addons/mail/static/src/widgets/notification_alert/tests/notification_alert_tests.js b/addons/mail/static/src/widgets/notification_alert/tests/notification_alert_tests.js index 736ee6f688f..d7b305c4eaf 100644 --- a/addons/mail/static/src/widgets/notification_alert/tests/notification_alert_tests.js +++ b/addons/mail/static/src/widgets/notification_alert/tests/notification_alert_tests.js @@ -8,8 +8,8 @@ QUnit.module('mail', {}, function () { QUnit.module('widgets', {}, function () { QUnit.module('notification_alert', {}, function () { QUnit.module('notification_alert_tests.js', { - beforeEach() { - beforeEach(this); + async beforeEach() { + await beforeEach(this); this.start = async params => { let { widget } = await start(Object.assign({ diff --git a/addons/mail/static/tests/chatter_tests.js b/addons/mail/static/tests/chatter_tests.js index 15e00865c02..2fdb5dd1a13 100644 --- a/addons/mail/static/tests/chatter_tests.js +++ b/addons/mail/static/tests/chatter_tests.js @@ -8,8 +8,8 @@ import testUtils from 'web.test_utils'; QUnit.module('mail', {}, function () { QUnit.module('Chatter', { - beforeEach: function () { - beforeEach(this); + async beforeEach() { + await beforeEach(this); this.data['res.partner'].records.push({ id: 11, im_status: 'online' }); this.data['mail.activity.type'].records.push( @@ -372,8 +372,8 @@ QUnit.test('list activity exception widget with activity', async function (asser }); QUnit.module('FieldMany2ManyTagsEmail', { - beforeEach() { - beforeEach(this); + async beforeEach() { + await beforeEach(this); Object.assign(this.data['res.users'].fields, { timmy: { string: "pokemon", type: "many2many", relation: 'partner_type' }, diff --git a/addons/mail/static/tests/m2x_avatar_user_tests.js b/addons/mail/static/tests/m2x_avatar_user_tests.js index bfdfa6e9183..d56aec9b48c 100644 --- a/addons/mail/static/tests/m2x_avatar_user_tests.js +++ b/addons/mail/static/tests/m2x_avatar_user_tests.js @@ -18,8 +18,8 @@ let target; QUnit.module('mail', {}, function () { QUnit.module('M2XAvatarUser', { - beforeEach() { - beforeEach(this); + async beforeEach() { + await beforeEach(this); // reset the cache before each test Many2OneAvatarUser.prototype.partnerIds = {}; diff --git a/addons/mail/static/tests/systray/systray_activity_menu_tests.js b/addons/mail/static/tests/systray/systray_activity_menu_tests.js index 44daf93b912..c940880f777 100644 --- a/addons/mail/static/tests/systray/systray_activity_menu_tests.js +++ b/addons/mail/static/tests/systray/systray_activity_menu_tests.js @@ -12,8 +12,8 @@ import testUtils from 'web.test_utils'; QUnit.module('mail', {}, function () { QUnit.module('ActivityMenu', { - beforeEach() { - beforeEach(this); + async beforeEach() { + await beforeEach(this); Object.assign(this.data, { 'mail.activity.menu': { diff --git a/addons/mail/static/tests/webclient/commands/mail_providers_tests.js b/addons/mail/static/tests/webclient/commands/mail_providers_tests.js index db4f9de493f..5905e67cda2 100644 --- a/addons/mail/static/tests/webclient/commands/mail_providers_tests.js +++ b/addons/mail/static/tests/webclient/commands/mail_providers_tests.js @@ -11,9 +11,9 @@ const serviceRegistry = registry.category("services"); QUnit.module('mail', {}, function () { QUnit.module('Command Palette', { - beforeEach() { + async beforeEach() { serviceRegistry.add("command", commandService); - beforeEach(this); + await beforeEach(this); patchWithCleanup(browser, { clearTimeout() {}, setTimeout(later, wait) { diff --git a/addons/note/static/tests/systray_activity_menu_tests.js b/addons/note/static/tests/systray_activity_menu_tests.js index 249d6fd1ec5..a1b1585d76c 100644 --- a/addons/note/static/tests/systray_activity_menu_tests.js +++ b/addons/note/static/tests/systray_activity_menu_tests.js @@ -7,8 +7,8 @@ import testUtils from 'web.test_utils'; QUnit.module('note', {}, function () { QUnit.module("ActivityMenu", { - beforeEach() { - beforeEach(this); + async beforeEach() { + await beforeEach(this); Object.assign(this.data, { 'mail.activity.menu': { diff --git a/addons/sms/static/src/components/message/tests/message_tests.js b/addons/sms/static/src/components/message/tests/message_tests.js index dabb9778d1f..8ff413f9523 100644 --- a/addons/sms/static/src/components/message/tests/message_tests.js +++ b/addons/sms/static/src/components/message/tests/message_tests.js @@ -15,8 +15,8 @@ QUnit.module('sms', {}, function () { QUnit.module('components', {}, function () { QUnit.module('message', {}, function () { QUnit.module('message_tests.js', { - beforeEach() { - beforeEach(this); + async beforeEach() { + await beforeEach(this); this.start = async params => { const res = await start({ ...params, data: this.data }); diff --git a/addons/sms/static/src/components/notification_list/tests/notification_list_notification_group_tests.js b/addons/sms/static/src/components/notification_list/tests/notification_list_notification_group_tests.js index 901a7c1da15..7106bef2f6b 100644 --- a/addons/sms/static/src/components/notification_list/tests/notification_list_notification_group_tests.js +++ b/addons/sms/static/src/components/notification_list/tests/notification_list_notification_group_tests.js @@ -8,8 +8,8 @@ QUnit.module('sms', {}, function () { QUnit.module('components', {}, function () { QUnit.module('notification_list', {}, function () { QUnit.module('notification_list_notification_group_tests.js', { - beforeEach() { - beforeEach(this); + async beforeEach() { + await beforeEach(this); this.start = async params => { const res = await start(Object.assign({}, params, { diff --git a/addons/snailmail/static/src/components/message/tests/message_tests.js b/addons/snailmail/static/src/components/message/tests/message_tests.js index 522046bf4eb..637a181ddeb 100644 --- a/addons/snailmail/static/src/components/message/tests/message_tests.js +++ b/addons/snailmail/static/src/components/message/tests/message_tests.js @@ -14,8 +14,8 @@ QUnit.module('snailmail', {}, function () { QUnit.module('components', {}, function () { QUnit.module('message', {}, function () { QUnit.module('message_tests.js', { - beforeEach() { - beforeEach(this); + async beforeEach() { + await beforeEach(this); this.start = async params => { const res = await start({ ...params, data: this.data }); diff --git a/addons/snailmail/static/src/components/notification_list/tests/notification_list_notification_group_tests.js b/addons/snailmail/static/src/components/notification_list/tests/notification_list_notification_group_tests.js index 7fe8aca956d..891d1fa5da5 100644 --- a/addons/snailmail/static/src/components/notification_list/tests/notification_list_notification_group_tests.js +++ b/addons/snailmail/static/src/components/notification_list/tests/notification_list_notification_group_tests.js @@ -8,8 +8,8 @@ QUnit.module('snailmail', {}, function () { QUnit.module('components', {}, function () { QUnit.module('notification_list', {}, function () { QUnit.module('notification_list_notification_group_tests.js', { - beforeEach() { - beforeEach(this); + async beforeEach() { + await beforeEach(this); this.start = async params => { const res = await start(Object.assign({}, params, { diff --git a/addons/website_livechat/static/src/components/discuss/tests/discuss_tests.js b/addons/website_livechat/static/src/components/discuss/tests/discuss_tests.js index 6a8e78d6882..5f3d3e96081 100644 --- a/addons/website_livechat/static/src/components/discuss/tests/discuss_tests.js +++ b/addons/website_livechat/static/src/components/discuss/tests/discuss_tests.js @@ -10,8 +10,8 @@ QUnit.module('website_livechat', {}, function () { QUnit.module('components', {}, function () { QUnit.module('discuss', {}, function () { QUnit.module('discuss_tests.js', { - beforeEach() { - beforeEach(this); + async beforeEach() { + await beforeEach(this); this.start = async params => { const { env, widget } = await start(Object.assign({}, params, { diff --git a/addons/website_livechat/static/src/models/messaging_notification_handler/tests/messaging_notification_handler_tests.js b/addons/website_livechat/static/src/models/messaging_notification_handler/tests/messaging_notification_handler_tests.js index 248f9f7e1cf..3957355fe02 100644 --- a/addons/website_livechat/static/src/models/messaging_notification_handler/tests/messaging_notification_handler_tests.js +++ b/addons/website_livechat/static/src/models/messaging_notification_handler/tests/messaging_notification_handler_tests.js @@ -14,8 +14,8 @@ QUnit.module('website_livechat', {}, function () { QUnit.module('models', {}, function () { QUnit.module('messaging_notification_handler', {}, function () { QUnit.module('messaging_notification_handler_tests.js', { - beforeEach() { - beforeEach(this); + async beforeEach() { + await beforeEach(this); this.start = async params => { const { env, widget } = await start(Object.assign({}, { diff --git a/addons/website_slides/static/src/components/activity/tests/activity_tests.js b/addons/website_slides/static/src/components/activity/tests/activity_tests.js index 2a0bc970b6f..850b6737e60 100644 --- a/addons/website_slides/static/src/components/activity/tests/activity_tests.js +++ b/addons/website_slides/static/src/components/activity/tests/activity_tests.js @@ -6,8 +6,8 @@ QUnit.module('website_slides', {}, function () { QUnit.module('components', {}, function () { QUnit.module('activity', {}, function () { QUnit.module('activity_tests.js', { - beforeEach() { - beforeEach(this); + async beforeEach() { + await beforeEach(this); this.start = async params => { const res = await start({ ...params, data: this.data }); const { apps, env, widget } = res;