26 lines
1.0 KiB
JavaScript
26 lines
1.0 KiB
JavaScript
import { describe, test } from "@odoo/hoot";
|
|
import { click, contains, start, startServer } from "@mail/../tests/mail_test_helpers";
|
|
import { Command, serverState } from "@web/../tests/web_test_helpers";
|
|
import { defineWhatsAppModels } from "@whatsapp/../tests/whatsapp_test_helpers";
|
|
|
|
describe.current.tags("desktop");
|
|
defineWhatsAppModels();
|
|
|
|
test("WhatsApp channel chat windows should have whatsapp icon", async () => {
|
|
const pyEnv = await startServer();
|
|
const partnerId = pyEnv["res.partner"].create({ name: "WhatsApp User" });
|
|
pyEnv["discuss.channel"].create({
|
|
name: "WhatsApp 1",
|
|
channel_type: "whatsapp",
|
|
channel_member_ids: [
|
|
Command.create({ partner_id: serverState.partnerId }),
|
|
Command.create({ partner_id: partnerId }),
|
|
],
|
|
whatsapp_partner_id: partnerId,
|
|
});
|
|
await start();
|
|
await click(".o_menu_systray i[aria-label='Messages']");
|
|
await click(".o-mail-NotificationItem");
|
|
await contains(".o-mail-ChatWindow-header .fa-whatsapp");
|
|
});
|