fix: preserve original timezone when reopening event update modal
- Add formatDateTimeInTimezone() helper to format dates in event's original timezone - Fix EventUpdateModal to display event times in original timezone instead of browser timezone - Fix EventModal (duplicate event) with same timezone handling - Update EventDisplay tests to use flexible date pattern
This commit is contained in:
committed by
Benoit TELLIER
parent
732c2cd051
commit
64393bf161
@@ -65,18 +65,7 @@ describe("eventApi", () => {
|
||||
expect(result).toBe(mockResponse);
|
||||
});
|
||||
|
||||
it("putEvent logs when status is 201", async () => {
|
||||
const mockResponse = { status: 201, url: "/dav/cals/test.ics" };
|
||||
(api as unknown as jest.Mock).mockReturnValue(mockResponse);
|
||||
const logSpy = jest.spyOn(console, "log").mockImplementation(() => {});
|
||||
|
||||
await putEvent(mockEvent);
|
||||
expect(logSpy).toHaveBeenCalledWith("PUT (201) :", "/dav/cals/test.ics");
|
||||
|
||||
logSpy.mockRestore();
|
||||
});
|
||||
|
||||
it("moveEvent sends MOVE request with destination header", async () => {
|
||||
test("moveEvent sends MOVE request with destination header", async () => {
|
||||
const mockResponse = { status: 204 };
|
||||
(api as unknown as jest.Mock).mockReturnValue({
|
||||
json: jest.fn().mockResolvedValue(mockResponse),
|
||||
|
||||
Reference in New Issue
Block a user