Split calendar module into form and views
All checks were successful
Deploy Sokko G / deploy (push) Successful in 15s

This commit is contained in:
Shinuwa 2026-08-24 20:29:57 +02:00
parent c81f66c747
commit 233f81541d
4 changed files with 774 additions and 619 deletions

View file

@ -151,6 +151,9 @@ test("toolbox module registry and modules expose expected behavior", async () =>
const timerParts = await readFile("website/src/features/toolboxes/modules/TimerParts.jsx", "utf8");
const timerOptions = await readFile("website/src/features/toolboxes/modules/timerOptions.js", "utf8");
const calendarModule = await readFile("website/src/features/toolboxes/modules/CalendarModule.jsx", "utf8");
const calendarEventForm = await readFile("website/src/features/toolboxes/modules/CalendarEventForm.jsx", "utf8");
const calendarViews = await readFile("website/src/features/toolboxes/modules/CalendarViews.jsx", "utf8");
const calendarBundle = `${calendarModule}\n${calendarEventForm}\n${calendarViews}`;
const calendarUtils = await readFile("website/src/features/toolboxes/modules/calendarUtils.js", "utf8");
const taskPlannerModule = await readFile("website/src/features/toolboxes/modules/TaskPlannerModule.jsx", "utf8");
const taskPlannerItems = await readFile("website/src/features/toolboxes/modules/TaskPlannerItems.jsx", "utf8");
@ -321,28 +324,28 @@ test("toolbox module registry and modules expose expected behavior", async () =>
assert.match(timerModule, /TextExchangeActions/);
assert.match(calendarModule, /export function CalendarModule/);
assert.match(calendarModule, /normalizeCalendarData/);
assert.match(calendarModule, /calendar-mode-choice/);
assert.match(calendarModule, /calendar-week-grid/);
assert.match(calendarModule, /calendar-month-grid/);
assert.match(calendarModule, /getMonthOccurrenceSegments/);
assert.match(calendarModule, /calendar-month-bar/);
assert.match(calendarModule, /MonthDateDropdown/);
assert.match(calendarModule, /MonthEventRepeatSwitch/);
assert.match(calendarModule, /monthlyRepeatBy/);
assert.match(calendarBundle, /calendar-mode-choice/);
assert.match(calendarBundle, /calendar-week-grid/);
assert.match(calendarBundle, /calendar-month-grid/);
assert.match(calendarBundle, /getMonthOccurrenceSegments/);
assert.match(calendarBundle, /calendar-month-bar/);
assert.match(calendarBundle, /MonthDateDropdown/);
assert.match(calendarBundle, /MonthEventRepeatSwitch/);
assert.match(calendarBundle, /monthlyRepeatBy/);
assert.match(calendarModule, /displayedMonth/);
assert.match(calendarModule, /deleteOccurrence/);
assert.match(calendarModule, /onPointerDown/);
assert.match(calendarBundle, /onPointerDown/);
assert.match(calendarModule, /copyEvent/);
assert.match(calendarModule, /calendar-repeat-switch/);
assert.match(calendarModule, /layout-switch calendar-month-repeat-switch/);
assert.match(calendarModule, /WEEK_TIME_INPUT_STEP_MINUTES \* 60/);
assert.match(calendarModule, /durationMinutes < 120/);
assert.match(calendarModule, /is-compact/);
assert.match(calendarBundle, /calendar-repeat-switch/);
assert.match(calendarBundle, /layout-switch calendar-month-repeat-switch/);
assert.match(calendarBundle, /WEEK_TIME_INPUT_STEP_MINUTES \* 60/);
assert.match(calendarBundle, /durationMinutes < 120/);
assert.match(calendarBundle, /is-compact/);
assert.match(calendarModule, /handleKeyDown/);
assert.match(calendarModule, /TextExchangeActions/);
assert.match(calendarModule, /type="calendar"/);
assert.match(calendarModule, /repeatLabel/);
assert.match(calendarModule, /CalendarAlertModeSwitch/);
assert.match(calendarBundle, /repeatLabel/);
assert.match(calendarBundle, /CalendarAlertModeSwitch/);
assert.doesNotMatch(moduleRegistry, /calendarInitOpen/);
assert.doesNotMatch(moduleRegistry, /calendar-init-modal/);
assert.match(calendarUtils, /export function getCalendarOccurrences/);