fix: Fix "Could not book the meeting" issue (fix-bookingIssue)#12252
fix: Fix "Could not book the meeting" issue (fix-bookingIssue)#12252keithwillcode merged 4 commits intomainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
3 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✅ 313 Passing - Run may still be in progress, this comment will be updated as current testing workflow or job completes... (Last updated on 11/07/2023 02:35:30pm UTC) Run DetailsRunning Workflow PR Update on Github Actions Commit: 47a37a4 Started: 11/07/2023 02:24:27pm UTC
|
| Test Case | Last 7 days Failures | Last 7 days Flakes |
|---|---|---|
|
2FA Tests should allow a user to enable 2FA and login using 2FA
Retry 1 • Initial Attempt |
0.45% (1)1 / 224 runfailed over last 7 days |
30.36% (68)68 / 224 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 |
20.60% (48)48 / 233 runsfailed over last 7 days |
73.82% (172)172 / 233 runsflaked over last 7 days |
|
Popup Tests should open embed iframe on click - Configured with light theme
Retry 2 • Retry 1 • Initial Attempt |
0.43% (1)1 / 233 runfailed over last 7 days |
60.09% (140)140 / 233 runsflaked over last 7 days |
📄 apps/web/playwright/insights.e2e.ts • 1 Flake
Test Case Results
| Test Case | Last 7 days Failures | Last 7 days Flakes |
|---|---|---|
|
Insights should be able to switch between memberUsers
Retry 1 • Initial Attempt |
0% (0)0 / 227 runsfailed over last 7 days |
1.32% (3)3 / 227 runsflaked over last 7 days |
📄 apps/web/playwright/teams.e2e.ts • 1 Flake
Test Case Results
| Test Case | Last 7 days Failures | Last 7 days Flakes |
|---|---|---|
|
Teams - NonOrg Non admin team members cannot create team in org
Retry 1 • Initial Attempt |
0% (0)0 / 214 runsfailed over last 7 days |
40.19% (86)86 / 214 runsflaked over last 7 days |
📄 apps/web/playwright/event-types.e2e.ts • 1 Flake
Test Case Results
| Test Case | Last 7 days Failures | Last 7 days Flakes |
|---|---|---|
|
Event Types tests user Different Locations Tests Can add Link Meeting as location and book with it
Retry 1 • Initial Attempt |
0% (0)0 / 226 runsfailed over last 7 days |
10.18% (23)23 / 226 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 |
10.82% (25)25 / 231 runsfailed over last 7 days |
12.99% (30)30 / 231 runsflaked over last 7 days |
keithwillcode
left a comment
There was a problem hiding this comment.
Nice find. Can we update the tests in date-ranges.test.ts to include tests for this change?
|
@keithwillcode We have made sure that these changes do not affect any test, so these current tests will also cover this new change 😄. |
|
@gitstart-calcom My point is that if there were a unit test for the issue that is fixed in this PR, that unit test would have been failing this whole time. If logic like this changes and no tests fail, that's great, but it doesn't mean that we actually have a test that ensures this change in logic works and continues working. Even if we have E2E tests to cover this, I prefer adding unit tests so we have verification at the root of the code. |
|
@keithwillcode Makes sense! We will add a unit test for that now! |
| it("should skip event if it ends before it starts (same day but different hours)", () => { | ||
| const item = { | ||
| days: [1], | ||
| startTime: new Date(new Date().setUTCHours(8, 0, 0, 0)), // 8 AM |
There was a problem hiding this comment.
@gitstart-calcom Thanks for adding these tests. Do we know how this happens? I'm just wondering how an end time would get set to be before a start time?
There was a problem hiding this comment.
To be honest we got confused about how this can happen too. Also, the issue occurring just in the first available time-slot was really weird. This hypothetical situation may be the result of a data entry error or a bug in the application code. It could be a mistake in the way the data is being provided or manipulated before it reaches the processWorkingHours function. Maybe setting the endTime/dateTo before the startTime/dateFrom can cause this issue, but we don't see a scenario in which that happens
There was a problem hiding this comment.
But now, with the specific tests and the new logic, we fixed the issue and we can identify a possible issue faster 😄
There was a problem hiding this comment.
Cool yeah that's what I suspected myself. Seems like this function is being passed bad data for some reason.
|
@keithwillcode We added 2 test lines for this case and added a screenshot in the description 😄 |
Co-authored-by: gitstart-calcom <gitstart-calcom@users.noreply.github.com>
DEMO
https://www.loom.com/share/ccbb1d3c40954b6588000955dcc43612?sid=8fe6456a-6d13-4370-95b6-4a19b5a40413
tests:
