Includes: - Odoo 19 framework (odoo/) - 27 custom EnCoach addons (new_project/custom_addons/) - encoach_core, encoach_api, encoach_lms_api, encoach_adaptive_api - encoach_exam, encoach_taxonomy, encoach_adaptive, encoach_assignment - encoach_ai, encoach_ai_grading, encoach_ai_generation, encoach_ai_media - encoach_courseware, encoach_communication, encoach_subscription - encoach_notification, encoach_approval, encoach_branding - encoach_classroom, encoach_registration, encoach_stats - encoach_faq, encoach_ticket, encoach_training, encoach_resources - encoach_adaptive_ai, encoach_sis - 21 OpenEduCat Enterprise modules (new_project/enterprise-19/) - 14 OpenEduCat Community modules (new_project/openeducat_erp-19.0/) - Configuration: odoo.conf, requirements.txt, scripts - 200+ REST API endpoints with JWT authentication - SRS and test documentation Made-with: Cursor
76 lines
2.5 KiB
JavaScript
76 lines
2.5 KiB
JavaScript
import { defineCalendarModels } from "@calendar/../tests/calendar_test_helpers";
|
|
import {
|
|
click,
|
|
contains,
|
|
openFormView,
|
|
registerArchs,
|
|
start,
|
|
startServer,
|
|
} from "@mail/../tests/mail_test_helpers";
|
|
import { test } from "@odoo/hoot";
|
|
import { preloadBundle } from "@web/../tests/web_test_helpers";
|
|
|
|
defineCalendarModels();
|
|
preloadBundle("web.fullcalendar_lib");
|
|
|
|
test("activity click on Reschedule", async () => {
|
|
registerArchs({ "calendar.event,false,calendar": `<calendar date_start="start"/>` });
|
|
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,
|
|
});
|
|
await start();
|
|
await openFormView("res.partner", resPartnerId);
|
|
await click(".btn", { text: "Reschedule" });
|
|
await contains(".o_calendar_view");
|
|
});
|
|
|
|
test("Can cancel activity linked to an event", async () => {
|
|
const pyEnv = await startServer();
|
|
const partnerId = pyEnv["res.partner"].create({ name: "Milan Kundera" });
|
|
const activityTypeId = pyEnv["mail.activity.type"].create({
|
|
icon: "fa-calendar",
|
|
name: "Meeting",
|
|
});
|
|
const attendeeId = pyEnv["calendar.attendee"].create({
|
|
partner_id: partnerId,
|
|
});
|
|
const calendaMeetingId = pyEnv["calendar.event"].create({
|
|
res_model: "calendar.event",
|
|
name: "meeting1",
|
|
start: "2022-07-06 06:30:00",
|
|
attendee_ids: [attendeeId],
|
|
});
|
|
pyEnv["mail.activity"].create({
|
|
name: "Small Meeting",
|
|
activity_type_id: activityTypeId,
|
|
can_write: true,
|
|
res_id: partnerId,
|
|
res_model: "res.partner",
|
|
calendar_event_id: calendaMeetingId,
|
|
});
|
|
await start();
|
|
await openFormView("res.partner", partnerId);
|
|
await click(".o-mail-Activity .btn", { text: "Cancel" });
|
|
await contains(".o-mail-Activity", { count: 0 });
|
|
});
|