Scheduling infrastructure for absolutely everyone.
fix: use randomString() for booking uid in slots e2e tests to avoid unique constraint flake (#27916)
Syed Ali Shahbazbdeb4b1dc919
diff --git a/apps/api/v2/src/modules/slots/slots-2024-04-15/controllers/slots.controller.e2e-spec.ts b/apps/api/v2/src/modules/slots/slots-2024-04-15/controllers/slots.controller.e2e-spec.tsindex 7dc9f21da8a..6da4612ed67 100644--- a/apps/api/v2/src/modules/slots/slots-2024-04-15/controllers/slots.controller.e2e-spec.ts+++ b/apps/api/v2/src/modules/slots/slots-2024-04-15/controllers/slots.controller.e2e-spec.ts@@ -515,7 +515,7 @@ describe("Slots 2024-04-15 Endpoints", () => {it("should do a booking for seated event and slot should show attendees count and bookingUid", async () => {const startTime = "2050-09-05T11:00:00.000Z";const booking = await bookingsRepositoryFixture.create({- uid: `booking-uid-${seatedEventTypeId}`,+ uid: `booking-uid-${randomString()}`,title: "booking title",startTime,endTime: "2050-09-05T12:00:00.000Z",@@ -598,7 +598,7 @@ describe("Slots 2024-04-15 Endpoints", () => {it("should do a booking for seated event and slot should show attendees count and bookingUid in range format", async () => {const startTime = "2050-09-05T11:00:00.000Z";const booking = await bookingsRepositoryFixture.create({- uid: `booking-uid-${seatedEventTypeId}`,+ uid: `booking-uid-${randomString()}`,title: "booking title",startTime,endTime: "2050-09-05T12:00:00.000Z",diff --git a/apps/api/v2/src/modules/slots/slots-2024-09-04/controllers/e2e/user-event-type-slots.controller.e2e-spec.ts b/apps/api/v2/src/modules/slots/slots-2024-09-04/controllers/e2e/user-event-type-slots.controller.e2e-spec.tsindex 5e69d6ca9f6..305fdfdbe92 100644--- a/apps/api/v2/src/modules/slots/slots-2024-09-04/controllers/e2e/user-event-type-slots.controller.e2e-spec.ts+++ b/apps/api/v2/src/modules/slots/slots-2024-09-04/controllers/e2e/user-event-type-slots.controller.e2e-spec.ts@@ -832,7 +832,7 @@ describe("Slots 2024-09-04 Endpoints", () => {it("should do a booking for seated event and slot should show attendees count and bookingUid", async () => {const startTime = "2050-09-05T11:00:00.000Z";const booking = await bookingsRepositoryFixture.create({- uid: `booking-uid-${seatedEventType.id}`,+ uid: `booking-uid-${randomString()}`,title: "booking title",startTime,endTime: "2050-09-05T12:00:00.000Z",@@ -961,7 +961,7 @@ describe("Slots 2024-09-04 Endpoints", () => {it("should do a booking for seated event and slot should show attendees count and bookingUid and return range format", async () => {const startTime = "2050-09-05T11:00:00.000Z";const booking = await bookingsRepositoryFixture.create({- uid: `booking-uid-${seatedEventType.id}`,+ uid: `booking-uid-${randomString()}`,title: "booking title",startTime,endTime: "2050-09-05T12:00:00.000Z",