Skip to content
Snippets Groups Projects
Commit 4f5334a0 authored by Sébastien Theys's avatar Sébastien Theys
Browse files

[FIX] mail: adapt "history" test with non deterministic issue


Follow up on 255f7219

The issue is still happening.

With the current commit, we will be able to know for sure if it happens because
we don't wait long enough, or because the messages are never appearing.

closes odoo/odoo#44471

Signed-off-by: default avatarAlexandre Kühn (aku) <aku@odoo.com>
parent c547d7c1
No related branches found
No related tags found
No related merge requests found
......@@ -1913,6 +1913,14 @@ QUnit.test('all messages in "Inbox" in "History" after marked all as read', asyn
await testUtils.nextTick();
assert.verifySteps(['message_fetch'],
"should fetch messages once for history");
let hasEnoughMessages = false;
while (!hasEnoughMessages) {
if (discuss.$('.o_thread_message').length === 30) {
hasEnoughMessages = true;
} else {
await testUtils.nextTick();
}
}
assert.containsN(discuss, '.o_thread_message', 30,
"there should be 30 messages in History");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment