mirror of
https://github.com/bringout/oca-ocb-technical.git
synced 2026-04-22 11:12:07 +02:00
19.0 vanilla
This commit is contained in:
parent
5faf7397c5
commit
2696f14ed7
721 changed files with 220375 additions and 91221 deletions
|
|
@ -0,0 +1,50 @@
|
|||
import { defineCalendarModels } from "@calendar/../tests/calendar_test_helpers";
|
||||
import { click, contains, start, startServer } from "@mail/../tests/mail_test_helpers";
|
||||
import { test } from "@odoo/hoot";
|
||||
import { mockDate } from "@odoo/hoot-mock";
|
||||
import {
|
||||
asyncStep,
|
||||
mockService,
|
||||
preloadBundle,
|
||||
serverState,
|
||||
waitForSteps,
|
||||
} from "@web/../tests/web_test_helpers";
|
||||
|
||||
defineCalendarModels();
|
||||
preloadBundle("web.fullcalendar_lib");
|
||||
|
||||
test("activity menu widget:today meetings", async () => {
|
||||
mockDate(2018, 3, 20, 6, 0, 0);
|
||||
const pyEnv = await startServer();
|
||||
const attendeeId = pyEnv["calendar.attendee"].create({ partner_id: serverState.partnerId });
|
||||
pyEnv["calendar.event"].create([
|
||||
{
|
||||
res_model: "calendar.event",
|
||||
name: "meeting1",
|
||||
start: "2018-04-20 06:30:00",
|
||||
attendee_ids: [attendeeId],
|
||||
},
|
||||
{
|
||||
res_model: "calendar.event",
|
||||
name: "meeting2",
|
||||
start: "2018-04-20 09:30:00",
|
||||
attendee_ids: [attendeeId],
|
||||
},
|
||||
]);
|
||||
mockService("action", {
|
||||
doAction(action) {
|
||||
if (typeof action === "string") {
|
||||
asyncStep(action);
|
||||
}
|
||||
},
|
||||
});
|
||||
await start();
|
||||
await contains(".o_menu_systray i[aria-label='Activities']");
|
||||
await click(".o_menu_systray i[aria-label='Activities']");
|
||||
await contains(".o-mail-ActivityGroup div[name='activityTitle']", { text: "Today's Meetings" });
|
||||
await contains(".o-mail-ActivityGroup .o-calendar-meeting", { count: 2 });
|
||||
await contains(".o-calendar-meeting span.fw-bold", { text: "meeting1" });
|
||||
await contains(".o-calendar-meeting span:not(.fw-bold)", { text: "meeting2" });
|
||||
await click(".o-mail-ActivityMenu .o-mail-ActivityGroup");
|
||||
await waitForSteps(["calendar.action_calendar_event"]);
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue