[FIX] mail: fix non deterministic im status test
Before this PR the "Can handle im_status of unknown partner" test was sometimes failing. This test is not related to im_status: it tests that receiving a `mail.record/insert` notification properly inserts the data in the store. This flow is already thoroughly tested as many discuss functionalities rely on this mechanism. This PR removes this test. fixes runbot-52628 closes odoo/odoo#147705 X-original-commit: 39a368238f5fc9b8d8d4115f14a05499322e92e6 Signed-off-by: Sébastien Theys (seb) <seb@odoo.com> Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
This commit is contained in:
@@ -6,7 +6,6 @@ import { startServer } from "@bus/../tests/helpers/mock_python_environment";
|
||||
import { Command } from "@mail/../tests/helpers/command";
|
||||
import { start } from "@mail/../tests/helpers/test_utils";
|
||||
|
||||
import { nextTick } from "@web/../tests/helpers/utils";
|
||||
import { click, contains } from "@web/../tests/utils";
|
||||
|
||||
QUnit.module("im status");
|
||||
@@ -83,22 +82,6 @@ QUnit.test("change icon on change partner im_status", async () => {
|
||||
await contains(".o-mail-ImStatus i[title='Online']");
|
||||
});
|
||||
|
||||
QUnit.test("Can handle im_status of unknown partner", async (assert) => {
|
||||
const { env, pyEnv } = await start();
|
||||
const partnerId = pyEnv["res.partner"].create({ name: "Bob" });
|
||||
const channelId = pyEnv["discuss.channel"].create({
|
||||
name: "General",
|
||||
});
|
||||
const [channel] = pyEnv["discuss.channel"].searchRead([["id", "=", channelId]]);
|
||||
pyEnv["bus.bus"]._sendone(channel, "mail.record/insert", {
|
||||
Persona: { im_status: "online", id: partnerId, type: "partner" },
|
||||
});
|
||||
await nextTick();
|
||||
const persona = env.services["mail.store"].Persona.get({ type: "partner", id: partnerId });
|
||||
assert.ok(persona);
|
||||
assert.ok(persona.im_status === "online");
|
||||
});
|
||||
|
||||
QUnit.test("show im status in messaging menu preview of chat", async () => {
|
||||
const pyEnv = await startServer();
|
||||
const partnerId = pyEnv["res.partner"].create({ name: "Demo", im_status: "online" });
|
||||
|
||||
Reference in New Issue
Block a user