feat(events): align Update modal with Create; extract shared form fields
- ux: close Update modal immediately on Save; run API in background - fix: remove stale single-instance when converting to repeating - test: adjust EventDisplay expectations - refactor: share form via components/Event/EventFormFields (used by Create/Update)
This commit is contained in:
committed by
Benoit TELLIER
parent
770257c03b
commit
42c953ccf9
@@ -14,7 +14,6 @@ const baseRepetition: RepetitionObject = {
|
||||
interval: 1,
|
||||
occurrences: 0,
|
||||
endDate: "",
|
||||
selectedDays: [],
|
||||
};
|
||||
|
||||
const mockOnClose = jest.fn();
|
||||
@@ -188,7 +187,7 @@ describe("RepeatEvent Component", () => {
|
||||
fireEvent.click(mondayCheckbox);
|
||||
|
||||
expect(setRepetition).toHaveBeenCalledWith(
|
||||
expect.objectContaining({ selectedDays: ["MO"] })
|
||||
expect.objectContaining({ byday: ["MO"] })
|
||||
);
|
||||
});
|
||||
});
|
||||
@@ -270,7 +269,7 @@ describe("Repeat Event Integration Tests", () => {
|
||||
await expectRRule({
|
||||
freq: "weekly",
|
||||
interval: 1,
|
||||
selectedDays: ["FR", "TH"],
|
||||
byday: ["FR", "TH"],
|
||||
});
|
||||
expect(mockOnClose).toHaveBeenCalledWith({}, "backdropClick");
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user