* = bus, calendar, crm_livechat, hr, hr_holidays, im_livechat, mail_bot,
mass_mailing, privacy_lookup, test_discuss_full, test_mail,
test_mail_full, website_crm_livechat, website_livechat, base
In preparation of splitting discuss and mail modules.
Part of task-3265211
closes odoo/odoo#118354
Related: odoo/upgrade#4553
Related: odoo/enterprise#39661
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
25 lines
823 B
JavaScript
25 lines
823 B
JavaScript
/** @odoo-module **/
|
|
|
|
import { start, startServer } from "@mail/../tests/helpers/test_utils";
|
|
|
|
QUnit.module("thread");
|
|
|
|
QUnit.test("out of office message on direct chat with out of office partner", async (assert) => {
|
|
const pyEnv = await startServer();
|
|
const partnerId = pyEnv["res.partner"].create({
|
|
name: "Demo",
|
|
im_status: "leave_online",
|
|
out_of_office_date_end: "2023-01-01",
|
|
});
|
|
const channelId = pyEnv["discuss.channel"].create({
|
|
channel_member_ids: [
|
|
[0, 0, { partner_id: pyEnv.currentPartnerId }],
|
|
[0, 0, { partner_id: partnerId }],
|
|
],
|
|
channel_type: "chat",
|
|
});
|
|
const { openDiscuss } = await start();
|
|
await openDiscuss(channelId);
|
|
assert.containsOnce($, ".alert:contains(Out of office until Jan 1, 2023)");
|
|
});
|