fix: booking timeslots#12195
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
5 Ignored Deployments
|
|
Thank you for following the naming conventions! 🙏 Feel free to join our discord and post your PR link to collect XP and win prizes! |
📦 Next.js Bundle Analysis for @calcom/webThis analysis was generated by the Next.js Bundle Analysis action. 🤖 This PR introduced no changes to the JavaScript bundle! 🙌 |
Current Playwright Test Results Summary✅ 293 Passing - Run may still be in progress, this comment will be updated as current testing workflow or job completes... (Last updated on 11/03/2023 02:31:53pm UTC) Run DetailsRunning Workflow PR Update on Github Actions Commit: 832f621 Started: 11/03/2023 02:24:20pm UTC
|
| Test Case | Last 7 days Failures | Last 7 days Flakes |
|---|---|---|
|
Routing Forms Seeded Routing Form Test preview should return correct route
Retry 1 • Initial Attempt |
0% (0)0 / 282 runsfailed over last 7 days |
4.26% (12)12 / 282 runsflaked over last 7 days |
📄 apps/web/playwright/managed-event-types.e2e.ts • 1 Flake
Test Case Results
| Test Case | Last 7 days Failures | Last 7 days Flakes |
|---|---|---|
|
Managed Event Types tests Can create managed event type
Retry 2 • Retry 1 • Initial Attempt |
9.51% (27)27 / 284 runsfailed over last 7 days |
14.08% (40)40 / 284 runsflaked over last 7 days |
📄 apps/web/playwright/teams.e2e.ts • 2 Flakes
Top 1 Common Error Messages
|
|
2 Test Cases Affected |
Test Case Results
| Test Case | Last 7 days Failures | Last 7 days Flakes |
|---|---|---|
|
Teams - NonOrg Can create a booking for Collective EventType
Retry 1 • Initial Attempt |
0% (0)0 / 234 runsfailed over last 7 days |
1.28% (3)3 / 234 runsflaked over last 7 days |
|
Teams - NonOrg Can create a private team
Retry 1 • Initial Attempt |
0% (0)0 / 234 runsfailed over last 7 days |
14.53% (34)34 / 234 runsflaked over last 7 days |
📄 packages/embeds/embed-core/playwright/tests/inline.e2e.ts • 1 Flake
Test Case Results
| Test Case | Last 7 days Failures | Last 7 days Flakes |
|---|---|---|
|
Inline Iframe Inline Iframe - Configured with Dark Theme
Retry 1 • Initial Attempt |
2.11% (6)6 / 284 runsfailed over last 7 days |
25.70% (73)73 / 284 runsflaked over last 7 days |
📄 packages/embeds/embed-core/playwright/tests/action-based.e2e.ts • 2 Flakes
Top 1 Common Error Messages
|
|
2 Test Cases Affected |
Test Case Results
| Test Case | Last 7 days Failures | Last 7 days Flakes |
|---|---|---|
|
Popup Tests should be able to reschedule
Retry 1 • Initial Attempt |
21.75% (62)62 / 285 runsfailed over last 7 days |
75.09% (214)214 / 285 runsflaked over last 7 days |
|
Popup Tests should open Routing Forms embed on click
Retry 1 • Initial Attempt |
0% (0)0 / 285 runsfailed over last 7 days |
29.82% (85)85 / 285 runsflaked over last 7 days |
CarinaWolli
left a comment
There was a problem hiding this comment.
Looks good, great fix! @supalarry could we add a test for that?
Done. |
What does this PR do?
Fixes #12142
Fixes
mergeOverlappingDateRangesnot properly merging date ranges if first starts at day X and ends at day X + 1 but second date range starts and ends in X + 1 while starting after and ending before the first one.How it was before
Lets say
mergeOverlappingDateRangestook the givendateRangesbelow as argument. You see that first one starts November 2, 23:00 and ends November 3, 07:00 and all other date ranges are within its range.then it didn't merge them and returned what's below. It should have only returned the first entry because it covers all other date ranges.
because within the function there is conditional
where
isSameDayisHow it is now
We have a new
isCurrentRangeOverlappingNextfunction for the if block that does not check the start based on the same day but based on timestamp value.Given as input:
it returns
Type of change
How should this be tested?
Test data above is from Australia/Brisbane example below (scenario 1)
Scenario 1
Create user 1 and user 2 with availabilities like below and Australia/Brisbane timezone. Then, create a round robin event where both of those users take part in. Check the booking page and see that there are no duplicate timetable entries and timetable entries are in ascending order.
Scenario 2
Change availability timezones to Europe/Rome and check the round robin booking page again. Timetable entries are in order and there are no duplicates.
Mandatory Tasks