This commit refactors discuss code to use OWL components and new tools and services in web/. Functionally, Discuss app should work relatively the same as before this commit. closes https://github.com/odoo/odoo/pull/110188 Related: https://github.com/odoo/enterprise/pull/38058 https://github.com/odoo/upgrade/pull/4423 closes odoo/odoo#110188 Related: odoo/upgrade#4423 Related: odoo/enterprise#38058 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com> Co-authored-by: Alexandre (aku) <aku@odoo.com> Co-authored-by: Didier (did) <did@odoo.com> Co-authored-by: Géry (ged) <ged@odoo.com> Co-authored-by: Louis (wil) <wil@odoo.com> Co-authored-by: Maël (mapa) <mapa@odoo.com> Co-authored-by: Maryam (maki) <maki@odoo.com> Co-authored-by: Sébastien (seb) <seb@odoo.com> Co-authored-by: Thanh (tso) <tso@odoo.com> Co-authored-by: Matthieu (tsm) <tsm@odoo.com> Co-authored-by: Zelong (zel) <zel@odoo.com>
43 lines
1.3 KiB
JavaScript
43 lines
1.3 KiB
JavaScript
/** @odoo-module **/
|
|
|
|
import { click, start, startServer } from "@mail/../tests/helpers/test_utils";
|
|
import { getFixture } from "@web/../tests/helpers/utils";
|
|
|
|
let target;
|
|
|
|
QUnit.module("activity", {
|
|
async beforeEach() {
|
|
target = getFixture();
|
|
},
|
|
});
|
|
|
|
QUnit.test("activity click on Reschedule", async function (assert) {
|
|
const pyEnv = await startServer();
|
|
const resPartnerId = pyEnv["res.partner"].create({});
|
|
const meetingActivityTypeId = pyEnv["mail.activity.type"].create({
|
|
icon: "fa-calendar",
|
|
name: "Meeting",
|
|
});
|
|
const calendarAttendeeId = pyEnv["calendar.attendee"].create({
|
|
partner_id: resPartnerId,
|
|
});
|
|
const calendaMeetingId = pyEnv["calendar.event"].create({
|
|
res_model: "calendar.event",
|
|
name: "meeting1",
|
|
start: "2022-07-06 06:30:00",
|
|
attendee_ids: [calendarAttendeeId],
|
|
});
|
|
pyEnv["mail.activity"].create({
|
|
name: "Small Meeting",
|
|
activity_type_id: meetingActivityTypeId,
|
|
can_write: true,
|
|
res_id: resPartnerId,
|
|
res_model: "res.partner",
|
|
calendar_event_id: calendaMeetingId,
|
|
});
|
|
const { openFormView } = await start();
|
|
await openFormView("res.partner", resPartnerId);
|
|
await click(".btn:contains('Reschedule')");
|
|
assert.containsOnce(target, ".o_calendar_view");
|
|
});
|