mail/static/tests/activity/activity_menu_tests.js
Данил Воробьев 6e6f15d803 initial commit
2024-05-03 09:40:35 +00:00

24 lines
814 B
JavaScript

/* @odoo-module */
import { startServer } from "@bus/../tests/helpers/mock_python_environment";
import { start } from "@mail/../tests/helpers/test_utils";
import { click, contains } from "@web/../tests/utils";
QUnit.module("activity menu");
QUnit.test("should update activities when opening the activity menu", async () => {
const pyEnv = await startServer();
await start();
await contains(".o_menu_systray i[aria-label='Activities']");
await contains(".o-mail-ActivityMenu-counter", { count: 0 });
const partnerId = pyEnv["res.partner"].create({});
pyEnv["mail.activity"].create({
res_id: partnerId,
res_model: "res.partner",
});
await click(".o_menu_systray i[aria-label='Activities']");
await contains(".o-mail-ActivityMenu-counter", { text: "1" });
});