6f0c09d2be5ba2cedcded486cbdb07eb7620af80
7
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
0757b00db7 |
feat: list schedules atom (#24205)
* feat: add api v2 endpoint to fetch all user schedules * chore: update typing * feat: custom hook to fetch all user schedules * refactor: shift logic to transform schedules into function of its own * init: list schedules atom * feat: api endpoints for list schedules atom * refactor: accept redirect url as prop * fix: pass redirect url prop * integrate list schedules atom with availability settings * refactor: extract types to be reused in api v2 endpoints * skip availability settings page for the time being until we have api v2 endpoints in prod * feat: add docs for list schedules atom * fixup * export Schedule type * make sure we always have a default schedule if user deletes his default schedule * chore: implement code rabbit feedback * chore: implement PR feedback * fix: resolve merge conflicts * fix: import path * update platform libraries * fix: type check * resolve merge conflicts * update atoms export * update platform libraries schedule * chore: arrange atoms in alphabetical order * update atoms controller to include endpoints for list schedules atom * add create atom scheule atom * fix: invalidate schedules on new schedule creation * chore: add changesets |
||
|
|
f41aa234d7 | test: Skip broken atom E2E test (#23925) | ||
|
|
eaa1ad6578 |
feat: e2e tests for Connect atoms (#23433)
* e2e tests for apple connect atom * update globalEnv for turbo.json * update pages for tests * update playwright config so we can use env variables inside tests * update packages * update variable names * update playwright config * fix: import variables from env instead of separate files * update env variables for atoms e2e yml |
||
|
|
d49843de0b |
fix: update e2e tests for event types (#23322)
* add data test id for testing * update tests for creating event type * add test for creating team event types * helper function for tests * update tests * update tests * fixup: fix correct data test ids for tabs |
||
|
|
d9adb6c1fc |
feat: atoms e2e tests (#23273)
* e2e tests for availability settings atom * init tests for booking page * add data test id for event type card * update tests for booking page * add data test ids for playwright tests * update test coverage for booking page |
||
|
|
1914b37ee4 |
feat: add PATCH endpoint for updating Google Calendar events (#22339)
* feat: add PATCH endpoint for updating Google Calendar events - Create UpdateUnifiedCalendarEventInput DTO with optional fields for partial updates - Add PATCH /:calendar/event/:eventUid endpoint to CalUnifiedCalendarsController - Extend GoogleCalendarService with updateEventDetails method - Support updating title, description, start/end times for Google Calendar events - Follow existing patterns for validation, error handling, and response transformation - Initially support Google Calendar only with extensibility for other providers Co-Authored-By: somay@cal.com <somay@cal.com> * feat: expand PATCH endpoint to support all calendar event fields - Add comprehensive field support to UpdateUnifiedCalendarEventInput DTO - Include locations, attendees, status, and hosts fields with proper validation - Expand GoogleCalendarService.updateEventDetails to handle complex field transformations - Add helper methods for response status and event status mapping - Preserve existing transformation logic from GoogleCalendarEventOutputPipe - Support conferenceData updates with conferenceDataVersion parameter Co-Authored-By: somay@cal.com <somay@cal.com> * fix: add support for simple location field in Google Calendar events - Add handling for geographic location field in addition to conferenceData - Filter non-video locations for the simple location string field - Preserve existing conferenceData support for video meetings - Verified against Google Calendar API documentation Co-Authored-By: somay@cal.com <somay@cal.com> * refactor: extract transformation logic into GoogleCalendarEventInputPipe - Create GoogleCalendarEventInputPipe following existing patterns - Extract transformation logic from updateEventDetails method - Move mapping methods to the new pipe for better organization - Improve code reusability and maintainability Addresses PR comment requesting transformation logic extraction. Co-Authored-By: somay@cal.com <somay@cal.com> * refactor: remove locations field and simplify calendar event input handling * update docs * refactor: remove hosts field from the update endpoint * fix: exclude organizer from attendees list in Google Calendar event transformation * feat: implement organizer preservation logic in PATCH endpoint - Fetch existing Google Calendar event data before transformation - Extract organizer attendees from existing event and merge with user-provided attendees - Prevent accidental removal of organizers when users update attendees - Add custom interface for GoogleCalendarEventInputPipe to support optional existingEvent parameter - Preserve organizers unless user explicitly provides hosts field in update request Co-Authored-By: somay@cal.com <somay@cal.com> * feat: add hosts array handling to PATCH endpoint - Add hosts field back to UpdateUnifiedCalendarEventInput DTO - Implement transformAttendeesWithHostsHandling method in GoogleCalendarEventInputPipe - Convert hosts to attendees with organizer: true for Google Calendar API - When hosts are provided, they replace existing organizers (not merge) - Maintain backward compatibility with existing organizer preservation logic Co-Authored-By: somay@cal.com <somay@cal.com> * feat: implement sophisticated attendee update logic with preservation and deletion support - Add UpdateCalendarEventAttendee class with action: 'delete' support - Implement attendee preservation logic that starts with existing Google Calendar attendees - Support explicit attendee deletion using action: 'delete' field - Update existing attendees when provided without action field - Add new attendees that don't exist in current event - Preserve organizer status when updating existing attendees - Fetch existing event data when attendees OR hosts are being updated - Maintain hosts array handling that replaces existing organizers Co-Authored-By: somay@cal.com <somay@cal.com> * feat: add host management and attendee deletion to calendar event API * refactor: improve readability of transformAttendeesWithHostsHandling and restrict hosts to responseStatus updates only - Break down complex transformAttendeesWithHostsHandling method into smaller, more readable helper functions: - preserveExistingAttendees: handles existing attendee preservation - processAttendeeDeletions: handles attendee deletion logic - processAttendeeUpdatesAndAdditions: handles attendee updates and additions - replaceHostsWithUpdatedOnes: handles host replacement with restrictions - Create UpdateCalendarEventHost class that only allows responseStatus updates - Restrict hosts array to prevent changes to name, email, and other fields - Preserve existing host displayName from Google Calendar when updating responseStatus Co-Authored-By: somay@cal.com <somay@cal.com> * feat: restrict host updates to responseStatus only, preserve email and name from Google Calendar data - Remove email field from UpdateCalendarEventHost class - Update replaceHostsWithUpdatedOnes to preserve all host data except responseStatus - Apply responseStatus updates to all existing organizers from Google Calendar - Prevent users from updating host email or name fields Co-Authored-By: somay@cal.com <somay@cal.com> * Revert "feat: restrict host updates to responseStatus only, preserve email and name from Google Calendar data" This reverts commit 22d07ce0cb13e71661522b2fd8a237d8b6e0809c. * refactor: replace optional flag with organizer property in calendar event attendees * refactor: remove organizer field from calendar event attendee input * feat: add comprehensive test suites for calendar transformation pipes - Create google-calendar-event-input.pipe.spec.ts with 67 test cases - Create get-calendar-event-details-output-pipe.spec.ts with 35 test cases - Follow event-types transformer test patterns with separate describe blocks - Cover all transformation functions including edge cases and null handling - Test attendee preservation, deletion, host management, and status transformations - Ensure comprehensive coverage for sophisticated attendee update logic Co-Authored-By: somay@cal.com <somay@cal.com> * fix: remove invalid optional properties from calendar pipe tests - Remove optional: false from line 85 in 'should transform attendees without existing event' test case - Remove optional: true from line 388 in 'should update existing attendee' test case - Remove optional: false from line 421 in 'should add new attendee' test case - Update expected outputs to match actual pipe implementation behavior - All 30 tests now pass locally Co-Authored-By: somay@cal.com <somay@cal.com> * fix: add platform library path mappings to Jest configuration - Resolves module resolution errors for @calcom/platform-libraries/* imports in Jest - Ensures test suite can run without 'Cannot find module' errors - Adds comprehensive path mappings matching TypeScript configuration Co-Authored-By: somay@cal.com <somay@cal.com> * fix: add @calcom/dayjs path mapping to Jest configuration - Add missing moduleNameMapper entry for @calcom/dayjs to resolve TypeScript path mappings in Jest - Fixes TypeError: Cannot read properties of undefined (reading 'extend') in calendar pipe tests - Calendar transformation pipe tests now pass successfully Co-Authored-By: somay@cal.com <somay@cal.com> * fix: configure Jest to use dayjs mock system for consistent test environment - Remove @calcom/dayjs path mapping from Jest config - Add setupFilesAfterEnv to automatically import dayjs mock - Update dayjs mock with comprehensive jest.fn() implementation - Add @calcom/platform-libraries/repositories and @calcom/prisma/client mappings - Resolves dayjs TypeError in slots.service.spec.ts and other test files Co-Authored-By: somay@cal.com <somay@cal.com> * fix: complete shared Google event data with required properties for test suites - Add missing required properties to sharedGoogleEvent in both test files - Fix TypeScript compilation errors in calendar transformation pipe tests - Correct test assertion for attendees filtering logic in output pipe - All 11 test suites now pass with 199 tests total Co-Authored-By: somay@cal.com <somay@cal.com> * undo extra changes * better tests * fix: update calendar API endpoints to use plural events in path * update documentation * fix: Restrict updates to only the responseStatus field for hosts * feat: add PATCH endpoint for updating Google Calendar events - Create UpdateUnifiedCalendarEventInput DTO with optional fields for partial updates - Add PATCH /:calendar/event/:eventUid endpoint to CalUnifiedCalendarsController - Extend GoogleCalendarService with updateEventDetails method - Support updating title, description, start/end times for Google Calendar events - Follow existing patterns for validation, error handling, and response transformation - Initially support Google Calendar only with extensibility for other providers Co-Authored-By: somay@cal.com <somay@cal.com> * feat: expand PATCH endpoint to support all calendar event fields - Add comprehensive field support to UpdateUnifiedCalendarEventInput DTO - Include locations, attendees, status, and hosts fields with proper validation - Expand GoogleCalendarService.updateEventDetails to handle complex field transformations - Add helper methods for response status and event status mapping - Preserve existing transformation logic from GoogleCalendarEventOutputPipe - Support conferenceData updates with conferenceDataVersion parameter Co-Authored-By: somay@cal.com <somay@cal.com> * fix: add support for simple location field in Google Calendar events - Add handling for geographic location field in addition to conferenceData - Filter non-video locations for the simple location string field - Preserve existing conferenceData support for video meetings - Verified against Google Calendar API documentation Co-Authored-By: somay@cal.com <somay@cal.com> * refactor: extract transformation logic into GoogleCalendarEventInputPipe - Create GoogleCalendarEventInputPipe following existing patterns - Extract transformation logic from updateEventDetails method - Move mapping methods to the new pipe for better organization - Improve code reusability and maintainability Addresses PR comment requesting transformation logic extraction. Co-Authored-By: somay@cal.com <somay@cal.com> * refactor: remove locations field and simplify calendar event input handling * update docs * refactor: remove hosts field from the update endpoint * fix: exclude organizer from attendees list in Google Calendar event transformation * feat: implement organizer preservation logic in PATCH endpoint - Fetch existing Google Calendar event data before transformation - Extract organizer attendees from existing event and merge with user-provided attendees - Prevent accidental removal of organizers when users update attendees - Add custom interface for GoogleCalendarEventInputPipe to support optional existingEvent parameter - Preserve organizers unless user explicitly provides hosts field in update request Co-Authored-By: somay@cal.com <somay@cal.com> * feat: add hosts array handling to PATCH endpoint - Add hosts field back to UpdateUnifiedCalendarEventInput DTO - Implement transformAttendeesWithHostsHandling method in GoogleCalendarEventInputPipe - Convert hosts to attendees with organizer: true for Google Calendar API - When hosts are provided, they replace existing organizers (not merge) - Maintain backward compatibility with existing organizer preservation logic Co-Authored-By: somay@cal.com <somay@cal.com> * feat: implement sophisticated attendee update logic with preservation and deletion support - Add UpdateCalendarEventAttendee class with action: 'delete' support - Implement attendee preservation logic that starts with existing Google Calendar attendees - Support explicit attendee deletion using action: 'delete' field - Update existing attendees when provided without action field - Add new attendees that don't exist in current event - Preserve organizer status when updating existing attendees - Fetch existing event data when attendees OR hosts are being updated - Maintain hosts array handling that replaces existing organizers Co-Authored-By: somay@cal.com <somay@cal.com> * feat: add host management and attendee deletion to calendar event API * refactor: improve readability of transformAttendeesWithHostsHandling and restrict hosts to responseStatus updates only - Break down complex transformAttendeesWithHostsHandling method into smaller, more readable helper functions: - preserveExistingAttendees: handles existing attendee preservation - processAttendeeDeletions: handles attendee deletion logic - processAttendeeUpdatesAndAdditions: handles attendee updates and additions - replaceHostsWithUpdatedOnes: handles host replacement with restrictions - Create UpdateCalendarEventHost class that only allows responseStatus updates - Restrict hosts array to prevent changes to name, email, and other fields - Preserve existing host displayName from Google Calendar when updating responseStatus Co-Authored-By: somay@cal.com <somay@cal.com> * feat: restrict host updates to responseStatus only, preserve email and name from Google Calendar data - Remove email field from UpdateCalendarEventHost class - Update replaceHostsWithUpdatedOnes to preserve all host data except responseStatus - Apply responseStatus updates to all existing organizers from Google Calendar - Prevent users from updating host email or name fields Co-Authored-By: somay@cal.com <somay@cal.com> * Revert "feat: restrict host updates to responseStatus only, preserve email and name from Google Calendar data" This reverts commit 22d07ce0cb13e71661522b2fd8a237d8b6e0809c. * feat: add comprehensive test suites for calendar transformation pipes - Create google-calendar-event-input.pipe.spec.ts with 67 test cases - Create get-calendar-event-details-output-pipe.spec.ts with 35 test cases - Follow event-types transformer test patterns with separate describe blocks - Cover all transformation functions including edge cases and null handling - Test attendee preservation, deletion, host management, and status transformations - Ensure comprehensive coverage for sophisticated attendee update logic Co-Authored-By: somay@cal.com <somay@cal.com> * refactor: replace optional flag with organizer property in calendar event attendees * refactor: remove organizer field from calendar event attendee input * fix: remove invalid optional properties from calendar pipe tests - Remove optional: false from line 85 in 'should transform attendees without existing event' test case - Remove optional: true from line 388 in 'should update existing attendee' test case - Remove optional: false from line 421 in 'should add new attendee' test case - Update expected outputs to match actual pipe implementation behavior - All 30 tests now pass locally Co-Authored-By: somay@cal.com <somay@cal.com> * fix: complete shared Google event data with required properties for test suites - Add missing required properties to sharedGoogleEvent in both test files - Fix TypeScript compilation errors in calendar transformation pipe tests - Correct test assertion for attendees filtering logic in output pipe - All 11 test suites now pass with 199 tests total Co-Authored-By: somay@cal.com <somay@cal.com> * fix: resolve TypeScript compilation errors in calendar transformation pipe tests - Add comprehensive Jest mocks for @calcom/prisma/client, @calcom/dayjs, CalendarManager, and delegationCredential - Fix RedisService AbortSignal.timeout() usage - Update UserAvailabilityService import path to use @calcom/lib/getUserAvailability - Configure Jest moduleNameMapper to handle ES module imports and package.json mocking - All 11 test suites now pass with 199 tests total Co-Authored-By: somay@cal.com <somay@cal.com> * fix: use proper CacheService dependency injection in AvailableSlotsService - Replace direct CacheService instantiation with dependency injection - Update CacheService import path to use correct calendar-cache module - Fix repository and service dependencies for proper type safety - Resolves TypeScript compilation errors in slots service tests Co-Authored-By: somay@cal.com <somay@cal.com> * fix: remove duplicate test file causing TypeScript compilation error Co-Authored-By: somay@cal.com <somay@cal.com> * undo extra changes * undo extra changes * fix: remove the action: "delete" key from attendees * fix: simplify tests * update docs * undo: remove hosts * Update pre-commit * feat: add alternate route for calendar event retrieval and simplify test fixtures * remove userId -- unused * undo --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: somay@cal.com <somay@cal.com> Co-authored-by: Somay Chauhan <somaychauhan98@gmail.com> Co-authored-by: Volnei Munhoz <volnei.munhoz@gmail.com> |
||
|
|
7b7478c0a9 |
feat: atoms e2e tests (#22926)
* feat: atoms example app e2e * chore: build atoms when e2e examples app * docs: readme * fix: add env variable * fix: env var * chore: playwright at monorepo version * fix: workflow * chore: increase timeout to have time to build atoms * increase timeout for e2e * bump e2e instance * go back to 4cpu |