Fixes that sometimes last shown slot was unavailable (#7804)
* fix unavailable slots + add relevant test * code clean up --------- Co-authored-by: CarinaWolli <[email protected]>
This commit is contained in:
1 parent
13577a5dbe
commit
6128be8860
2 files changed
+22
-1
No files matched your search
@@ -112,4 +112,25 @@ describe("Tests the slot logic", () => {
|
||||
})
|
||||
).toHaveLength(11);
|
||||
});
|
||||
|
||||
it("shows correct time slots for 20 minutes long events with working hours that do not end at a full hour ", async () => {
|
||||
// 72 20-minutes events in a 24h day
|
||||
expect(
|
||||
getSlots({
|
||||
inviteeDate: dayjs.utc().add(1, "day"),
|
||||
frequency: 20,
|
||||
minimumBookingNotice: 0,
|
||||
workingHours: [
|
||||
{
|
||||
userId: 1,
|
||||
days: Array.from(Array(7).keys()),
|
||||
startTime: MINUTES_DAY_START,
|
||||
endTime: MINUTES_DAY_END - 14, // 23:45
|
||||
},
|
||||
],
|
||||
eventLength: 20,
|
||||
organizerTimeZone: "America/Toronto",
|
||||
})
|
||||
).toHaveLength(71);
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user