[IMP] mail, *: remove setup manager patches in test

*: im_livechat, website_livechat.

Before this PR, services has to be added to the setup manager in order to be loaded in tests. This was cumbersome because the setup manager was patched by each sub-feature to add feature related services to the registry. The same had to be done for systray/main components registries.

This PR automates this process in order to remove the patches.

closes odoo/odoo#129705

Related: odoo/enterprise#44596
Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
This commit is contained in:
tsm-odoo
2023-07-28 16:28:52 +02:00
parent 7016c5ae7b
commit 577f0b3471
15 changed files with 89 additions and 277 deletions
@@ -90,7 +90,7 @@ QUnit.module("M2XAvatarUser", ({ beforeEach }) => {
res_id: avatarUserId,
views: [[false, "kanban"]],
});
patchWithCleanup(browser, {
setTimeout: (callback, delay) => {
assert.step(`setTimeout of ${delay}ms`);
@@ -99,7 +99,7 @@ QUnit.module("M2XAvatarUser", ({ beforeEach }) => {
});
// Open card
await triggerEvent(target, ".o_m2o_avatar > img", "mouseover");
assert.verifySteps(["setTimeout of 350ms", "user read"]);
assert.verifySteps(["setTimeout of 350ms", "setTimeout of 250ms", "user read"]);
assert.containsOnce(target, ".o_avatar_card");
assert.deepEqual(getNodesTextContent(target.querySelectorAll(".o_card_user_infos > *")), ['Mario', 'sub manager', 'Managemment', ' Mario@odoo.test', ' +585555555']);
// Close card