mirror of
https://github.com/bringout/oca-ocb-mail.git
synced 2026-04-22 11:42:06 +02:00
19.0 vanilla
This commit is contained in:
parent
5df8c07b59
commit
daa394e8b0
2114 changed files with 564841 additions and 299642 deletions
|
|
@ -0,0 +1,47 @@
|
|||
import { click, contains, patchUiSize, start, startServer } from "@mail/../tests/mail_test_helpers";
|
||||
import { describe, test } from "@odoo/hoot";
|
||||
import { Command, serverState } from "@web/../tests/web_test_helpers";
|
||||
import { defineLivechatModels } from "./livechat_test_helpers";
|
||||
|
||||
describe.current.tags("desktop");
|
||||
defineLivechatModels();
|
||||
|
||||
test('livechats should be in "chat" filter', async () => {
|
||||
const pyEnv = await startServer();
|
||||
const guestId = pyEnv["mail.guest"].create({ name: "Visitor 11" });
|
||||
pyEnv["discuss.channel"].create({
|
||||
channel_member_ids: [
|
||||
Command.create({ partner_id: serverState.partnerId, livechat_member_type: "agent" }),
|
||||
Command.create({ guest_id: guestId, livechat_member_type: "visitor" }),
|
||||
],
|
||||
channel_type: "livechat",
|
||||
livechat_operator_id: serverState.partnerId,
|
||||
});
|
||||
await start();
|
||||
await click(".o_menu_systray i[aria-label='Messages']");
|
||||
await contains(".o-mail-MessagingMenu button.fw-bold", { text: "Notifications" });
|
||||
await contains(".o-mail-NotificationItem", { text: "Visitor 11" });
|
||||
await click(".o-mail-MessagingMenu button", { text: "Chats" });
|
||||
await contains(".o-mail-MessagingMenu button.fw-bold", { text: "Chats" });
|
||||
await contains(".o-mail-NotificationItem", { text: "Visitor 11" });
|
||||
});
|
||||
|
||||
test('livechats should be in "livechat" tab in mobile', async () => {
|
||||
patchUiSize({ height: 360, width: 640 });
|
||||
const pyEnv = await startServer();
|
||||
const guestId = pyEnv["mail.guest"].create({ name: "Visitor 11" });
|
||||
pyEnv["discuss.channel"].create({
|
||||
channel_member_ids: [
|
||||
Command.create({ partner_id: serverState.partnerId, livechat_member_type: "agent" }),
|
||||
Command.create({ guest_id: guestId, livechat_member_type: "visitor" }),
|
||||
],
|
||||
channel_type: "livechat",
|
||||
livechat_operator_id: serverState.partnerId,
|
||||
});
|
||||
await start();
|
||||
await click(".o_menu_systray i[aria-label='Messages']");
|
||||
await click("button", { text: "Live Chats" });
|
||||
await contains(".o-mail-NotificationItem", { text: "Visitor 11" });
|
||||
await click("button", { text: "Chats" });
|
||||
await contains(".o-mail-NotificationItem", { count: 0, text: "Visitor 11" });
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue