cbfb11015e
* feat: add E2E test to prevent duplicate schedule API calls
- Tests individual user events (/{user}/{eventTypeSlug})
- Tests team events (/team/{teamSlug}/{eventTypeSlug})
- Tests organization team events (/org/{orgSlug}/{teamSlug}/{eventTypeSlug})
- Ensures /api/trpc/getSchedule and /v2/slots/available are called only once
- Prevents regression of double API calls in Booker component
- Uses flexible assertions to handle environment issues while detecting duplicates
Co-Authored-By: keith@cal.com <keithwillcode@gmail.com>
* refactor: rename E2E test file to booking-duplicate-api-calls.e2e.ts
Addresses GitHub comment from keithwillcode to follow naming convention
Co-Authored-By: keith@cal.com <keithwillcode@gmail.com>
* fix: correct tRPC API route pattern to api/trpc/slots/getSchedule
Addresses GitHub comment from keithwillcode - the route pattern should be
api/trpc/slots/getSchedule instead of api/trpc/viewer.slots.getSchedule
in all page.route() interceptors for the getSchedule endpoint.
Co-Authored-By: keith@cal.com <keithwillcode@gmail.com>
* fix: revert to correct tRPC API route pattern api/trpc/viewer.slots.getSchedule
The previous change to api/trpc/slots/getSchedule was incorrect. The tRPC router
structure shows that getSchedule is under viewer.slots, which translates to the
HTTP endpoint api/trpc/viewer.slots.getSchedule as used by trpc.viewer.slots.getSchedule.useQuery().
Co-Authored-By: keith@cal.com <keithwillcode@gmail.com>
---------
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>