Commit Graph

48 Commits

Author SHA1 Message Date
Camille Moussu 23d50f250d Refactor imports (#470) 2026-01-20 17:33:30 +01:00
lenhanphung 8b3afc1737 - Replace avatar image from API with gradient avatar from twake-mui (#457)
- Display 2-letter initials (e.g., "JD" for "John Doe") instead of single letter
- Add getInitials helper function in avatarUtils for reusability
- Update Avatar in PeopleSearch, CalendarSearch, and Menubar components
- Remove avatarUrl prop usage across all Avatar components
2026-01-13 14:44:42 +01:00
lenhanphung 994ea1c45e fix url endcoding 2026-01-08 13:31:13 +07:00
lenhanphung 24f8895baa Update avatar component 2026-01-08 11:41:38 +07:00
Camille Moussu 9ff75056c7 [#397 bis] added participation management on event from thunderbird (#432)
Co-authored-by: Camille Moussu <cmoussu@linagora.com>
2026-01-07 11:45:17 +01:00
Camille Moussu d68b4146d3 [#397] Consider the calendar owner as the organizer when no organizer (#416)
Co-authored-by: Camille Moussu <cmoussu@linagora.com>
2025-12-12 18:00:27 +01:00
lenhanphung 9151ff5563 fix: preserve form data on API error and fix test cases (#338)
- Add temp storage utility (eventFormTempStorage.ts) to save/restore form data
- Implement error handling: close modal immediately, reopen on API failure with saved data
- Add event listeners in Calendar.tsx and EventDisplayPreview.tsx to reopen modals on error
- Fix calendar change logic in EventUpdateModal: use oldCalendar for update before move
- Update all test mocks to support .unwrap() method for Redux thunks
- Add sessionStorage.clear() in test beforeEach hooks
- Fix test timing issues with act() wrappers and increased timeouts
- Mock putEventAsync in TempUpdate test to ensure updateTempCalendar is called

- Fix update modal not reopening when API fails for recurring events (solo/all)
- Move update modal reopen logic from EventDisplayPreview to Calendar.tsx
- Use sessionStorage to persist update modal info across component unmounts
- Handle typeOfAction matching for recurring events (undefined vs solo/all)
- Fix error handling in updateEventInstanceAsync and updateSeriesAsync
- Ensure all API failures properly dispatch eventModalError event
2025-11-25 15:30:58 +01:00
Camille Moussu fd588b4749 [#326] fixed attendees preview string + extensive tests (#357)
Co-authored-by: Camille Moussu <cmoussu@linagora.com>
2025-11-25 11:15:47 +01:00
Camille Moussu f886846a2b [#265] prefills title + trad + test (#293)
Co-authored-by: Camille Moussu <cmoussu@linagora.com>
2025-11-12 20:42:05 +01:00
Camille Moussu e085e4c893 [#276] remove false from all day date subtitle (#289)
Co-authored-by: Camille Moussu <cmoussu@linagora.com>
2025-11-07 08:08:16 +01:00
Camille Moussu 36bc027d6d [#82] added cozy-ui for internationnalisation (#267)
Co-authored-by: Camille Moussu <cmoussu@linagora.com>
2025-11-06 15:46:58 +01:00
Camille Moussu 42f5d8e1a9 #204 Error management (#237)
* added error snackbar for api fails
* improved error page to be shown only for userdata errors and to allow retrying
* fixed test breaking only in local because of timezone and reduced warnings for easier reading of tests results
* added error management for failure inside calendars imports
* added error snackbar for api fails
* improved error page to be shown only for userdata errors and to allow retrying
* added error management for failure inside calendars imports

Co-authored-by: Camille Moussu <cmoussu@linagora.com>
2025-10-27 11:23:38 +01:00
Camille Moussu 6411ed636b [#197] added missing infos 2025-10-20 14:03:42 +02:00
Camille Moussu f278caf041 [#168] changed temp calendar reload to reload only thoses that are impacted 2025-10-17 11:26:50 +02:00
Camille Moussu 29f984b347 [#168] added refresh to temp calendars when updating 2025-10-17 11:26:50 +02:00
lenhanphung b9905cbb7a refactor(tests): use getByRole instead of getByText for interactive elements
- Refactor ~47 test cases across 7 test files to use getByRole
- Improve accessibility testing coverage following Testing Library best practices
- Make tests more robust against text changes (i18n, copy updates)
- Test elements as users (especially screen readers) interact with them
2025-10-16 10:36:28 +02:00
lenhanphung 192ab17789 test: fix timezone issues in EventDisplay tests
- Set explicit UTC timezone globally in jest.config.ts and setupTests.ts
- Mock Intl.DateTimeFormat to use UTC by default while preserving prototype
- Replace regex patterns with exact values for declarative assertions
- Remove complex date formatting computations in tests
- Use fixed dates (2025-01-15T10:00:00.000Z) for consistent test results
- Fix EventDisplay.test.tsx to use exact time values instead of regex
2025-10-15 08:29:28 +02:00
lenhanphung 2932607afb test: improve test assertions with exact value matching
- Replace regex patterns with exact equality assertions where possible
- Update 'toggle all-day' test to use exact date value instead of regex
- Keep regex for time range in preview as format varies by implementation
- Address Ben concern about meaningful test assertions
2025-10-15 08:29:28 +02:00
lenhanphung 4d346751bf style: fix prettier 2025-10-15 08:29:28 +02:00
lenhanphung faa1060949 refactor: improve test fixed timezone usage
- Agree with Ben concern about meaningful test assertions
2025-10-15 08:29:28 +02:00
lenhanphung 9b0e3446aa test: add timezone handling test cases as requested by chibenwa
- Add test for EventDisplay showing event in user local timezone
- Add test for EventUpdateModal displaying time in original event timezone
- Test verifies event at 2PM UTC+7 is displayed as 2PM in Asia/Bangkok when editing
- Create new test file EventUpdateModal.test.tsx for update modal specific tests
2025-10-15 08:29:28 +02:00
lenhanphung f88639951b test: put back test case for recurring event update with typeOfAction 2025-10-15 08:29:28 +02:00
lenhanphung 9ff8354950 fix: update EventDisplay and EventRepetition tests
- Fix formatLocalDateTime import in EventDisplay.tsx (now in EventFormFields)
- Update test expectations: 'Edit Event' -> 'Update Event'
- Remove getEventAsync spy (no longer called before modal opens)
2025-10-15 08:29:28 +02:00
lenhanphung ad56b71488 fix: update test imports and use main's EventDisplay tests
- Fix EventDisplayPreview import paths (moved to features/Events/)
- Use main's EventDisplay.test.tsx (matches new UI)
- Fix DuplicateEvent and EventRepetition test imports
2025-10-15 08:29:28 +02:00
lenhanphung 64393bf161 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
2025-10-15 08:29:28 +02:00
lenhanphung 202feb3d23 fix test case 2025-10-15 08:29:28 +02:00
lenhanphung 42c953ccf9 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)
2025-10-15 08:29:28 +02:00
Camille Moussu c86db8fa49 refactor recurring event modification (#173) 2025-10-07 18:16:00 +02:00
Camille Moussu 3f8f3eff23 [#162] changed preview modal looks to follow figma (#163)
Co-authored-by: Camille Moussu <cmoussu@linagora.com>
2025-10-07 11:20:09 +02:00
lenhanphung ff54840ac8 fix: resolve all failing test suites
- Fix RepeatEvent.test.tsx (15/15 tests): Update selectors to match actual UI text ('Day(s)', 'Week(s)', etc.) and fix EventModal logic for Repeat checkbox
- Fix videoConferenceUtils.test.ts (1/1 test): Mock window object for Node.js environment
- Fix EventModal.test.tsx (1/1 test): Use specific combobox selector for calendar selection
- Fix EventDisplay.test.tsx (1/1 test): Remove incorrect Repeat checkbox expectation
2025-10-03 10:07:08 +07:00
lenhanphung 407290702f fix: resolve all failing test suites
- Fix RepeatEvent.test.tsx (15/15 tests): Update selectors to match actual UI text ('Day(s)', 'Week(s)', etc.) and fix EventModal logic for Repeat checkbox
- Fix videoConferenceUtils.test.ts (1/1 test): Mock window object for Node.js environment
- Fix EventModal.test.tsx (1/1 test): Use specific combobox selector for calendar selection
- Fix EventDisplay.test.tsx (1/1 test): Remove incorrect Repeat checkbox expectation
2025-10-02 18:11:55 +07:00
lenhanphung 4eb2c86771 fix: update test cases to match new UI labels
- Update RepeatEvent.test.tsx to use correct selectors and text matching
- Update EventDisplay.test.tsx to use 'Notification' instead of 'Alarm'
- Update EventModal.test.tsx to use new label names and fix description input tests
- Update Calendar.test.tsx to use new placeholder text 'Start typing a name or email'
- Fix EventDisplay.tsx to use 'Notification' label consistently
2025-10-02 14:19:05 +07:00
Camille Moussu 5522673342 remove user mail from mail list when sending mail to attendees (#110)
Co-authored-by: Camille Moussu <cmoussu@linagora.com>
2025-09-15 17:17:54 +02:00
Camille Moussu d76775c7d2 [#106] added prettier check to jenkins and prettified files (#109)
Co-authored-by: Camille Moussu <cmoussu@linagora.com>
2025-09-12 11:05:52 +02:00
Camille Moussu 8f2277b278 [#72] added duplicate button and fixed tests broken by new interaction between components 2025-09-11 18:22:11 +02:00
Camille Moussu e486c9637e [#73] added tests 2025-09-11 12:19:17 +02:00
Camille Moussu 24c6788c2c [#92] added free busy and missing tests 2025-09-09 17:19:27 +02:00
Camille Moussu 0549a77d92 [#77] fixed when getEventAsync is dispatched to prevent missing data 2025-09-05 13:07:51 +02:00
Camille Moussu b3c05e0aa5 [#7] fixed attendance update when editing event 2025-09-03 11:10:17 +02:00
Camille Moussu ee01e1d027 [#77] added complex ui for repetition, fixed broken tests due to new feature 2025-09-02 18:14:55 +02:00
Camille Moussu 64f3ff0aa4 [#7] fixed move destination 2025-08-29 10:21:43 +02:00
Camille Moussu 1c6cdb382b [#7] fixed test with incorect date gestion 2025-08-28 15:13:44 +02:00
Camille Moussu a2b0ab32b7 [#7] added MOVE support for changing calendar for event + missing tests for this PR 2025-08-28 13:08:10 +02:00
Camille Moussu 6669eeb456 [#7] fixed allday implementation to prevent errors with openpaas 2025-08-27 14:55:14 +02:00
Camille Moussu e8a0ac41ef [#7] skeleton for complexe display 2025-08-25 17:01:18 +02:00
Camille Moussu 38dfb49dc8 [#4] added tests 2025-08-21 15:49:34 +02:00
Camille Moussu 5cdce4201a [#50] fixed sent invite to appear on invitee calendar 2025-08-21 13:18:41 +02:00
Camille Moussu 2377cde057 [#3] added pretty attendee list and tests + fixed broken tests due to dates 2025-07-29 11:09:21 +02:00