diff --git a/addons/mail/static/tests/crosstab/crosstab_tests.js b/addons/mail/static/tests/crosstab/crosstab_tests.js index 758e5049d8b..a9d5366d021 100644 --- a/addons/mail/static/tests/crosstab/crosstab_tests.js +++ b/addons/mail/static/tests/crosstab/crosstab_tests.js @@ -1,6 +1,7 @@ /* @odoo-module */ import { startServer } from "@bus/../tests/helpers/mock_python_environment"; +import { waitUntilSubscribe } from "@bus/../tests/helpers/websocket_event_deferred"; import { start } from "@mail/../tests/helpers/test_utils"; @@ -122,7 +123,7 @@ QUnit.test("Channel subscription is renewed when channel is left", async (assert openDiscuss(); await click(".o-mail-DiscussSidebarChannel .btn[title='Leave this channel']"); await contains(".o-mail-DiscussSidebarChannel", { count: 0 }); - await new Promise((resolve) => setTimeout(resolve)); // update of channels is debounced + await waitUntilSubscribe(); assert.verifySteps(["update-channels"]); });