From 8f399a270c1e80a4e8a2b7558972aeef4b150c86 Mon Sep 17 00:00:00 2001 From: tsm-odoo Date: Mon, 8 May 2023 09:50:24 +0000 Subject: [PATCH] [FIX] mail: indeterministic discuss test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR fixes the `Posting message should transform relevant data to emoji` test that sometimes failed due to a race condition. The assertion was too strict, this test just needs to check that the emoji are properly parsed when posting a message. Fixes runbot error: 20934. closes odoo/odoo#120769 Signed-off-by: Alexandre KΓΌhn (aku) --- addons/mail/static/tests/discuss_app/discuss_tests.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/mail/static/tests/discuss_app/discuss_tests.js b/addons/mail/static/tests/discuss_app/discuss_tests.js index 49beb9f4d42..d2a70faadf5 100644 --- a/addons/mail/static/tests/discuss_app/discuss_tests.js +++ b/addons/mail/static/tests/discuss_app/discuss_tests.js @@ -294,7 +294,7 @@ QUnit.test("Posting message should transform relevant data to emoji.", async (as await openDiscuss(channelId); await insertText(".o-mail-Composer-input", "test :P :laughing:"); await click(".o-mail-Composer-send"); - assert.equal($(".o-mail-Message-body").text(), "test πŸ˜› πŸ˜†"); + assert.containsOnce($, ".o-mail-Message-body:contains(test πŸ˜› πŸ˜†)"); }); QUnit.test(