Scheduling infrastructure for absolutely everyone.
fix: no available users found (recurring events) (#22033)
Carina Wollendorferc4941f25a2f1
diff --git a/packages/features/bookings/lib/handleNewBooking/test/handleNewRecurringBooking.test.ts b/packages/features/bookings/lib/handleNewBooking/test/handleNewRecurringBooking.test.tsindex 08c6dd60f5c..193fd5176b5 100644--- a/packages/features/bookings/lib/handleNewBooking/test/handleNewRecurringBooking.test.ts+++ b/packages/features/bookings/lib/handleNewBooking/test/handleNewRecurringBooking.test.ts@@ -23,7 +23,6 @@ import { v4 as uuidv4 } from "uuid";import { describe, expect } from "vitest";import { WEBAPP_URL, WEBSITE_URL } from "@calcom/lib/constants";-import { ErrorCode } from "@calcom/lib/errorCodes";import logger from "@calcom/lib/logger";import { BookingStatus, SchedulingType } from "@calcom/prisma/enums";import { test } from "@calcom/web/test/fixtures/fixtures";@@ -256,7 +255,7 @@ describe("handleNewRecurringBooking", () => {timeout);- test(+ test.skip(`should fail recurring booking if second slot is already booked`,async ({}) => {const booker = getBooker({@@ -372,11 +371,12 @@ describe("handleNewRecurringBooking", () => {};});- await expect(() =>- handleNewRecurringBooking({- bookingData: bookingDataArray,- userId: -1,- })+ await expect(+ async () =>+ await handleNewRecurringBooking({+ bookingData: bookingDataArray,+ userId: -1,+ })).rejects.toThrow(ErrorCode.NoAvailableUsersFound);},timeout@@ -384,7 +384,7 @@ describe("handleNewRecurringBooking", () => {});describe("Round robin event type:", () => {- test("should fail recurring booking if a fixed host is not available on the second slot", async () => {+ test.skip("should fail recurring booking if a fixed host is not available on the second slot", async () => {const booker = getBooker({email: "[email protected]",name: "Booker",diff --git a/packages/features/bookings/lib/handleNewBooking/test/recurring-event.test.ts b/packages/features/bookings/lib/handleNewBooking/test/recurring-event.test.tsindex e04df8c744a..704bccb02fb 100644--- a/packages/features/bookings/lib/handleNewBooking/test/recurring-event.test.ts+++ b/packages/features/bookings/lib/handleNewBooking/test/recurring-event.test.ts@@ -256,7 +256,7 @@ describe("handleNewBooking", () => {timeout);- test(+ test.skip(`should fail recurring booking if second slot is already booked`,async ({}) => {const handleRecurringEventBooking = (await import("@calcom/web/pages/api/book/recurring-event"))@@ -822,7 +822,7 @@ describe("handleNewBooking", () => {);});describe("Round robin event type:", () => {- test("should when when a fixed host is not available on the second slot", async () => {+ test.skip("should when when a fixed host is not available on the second slot", async () => {const handleRecurringEventBooking = (await import("@calcom/web/pages/api/book/recurring-event")).handleRecurringEventBooking;const booker = getBooker({diff --git a/packages/features/bookings/lib/handleNewRecurringBooking.ts b/packages/features/bookings/lib/handleNewRecurringBooking.tsindex b593c98f284..e9db6bbb496 100644--- a/packages/features/bookings/lib/handleNewRecurringBooking.ts+++ b/packages/features/bookings/lib/handleNewRecurringBooking.ts@@ -29,7 +29,7 @@ export const handleNewRecurringBooking = async (input: BookingHandlerInput): Pro});const appsStatus: AppsStatus[] | undefined = undefined;- const numSlotsToCheckForAvailability = 2;+ const numSlotsToCheckForAvailability = 1;let thirdPartyRecurringEventId = null;