-
Notifications
You must be signed in to change notification settings - Fork 6.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: '/slots' endpoint API fixes #12693
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
4 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✅ 336 Passing - Run may still be in progress, this comment will be updated as current testing workflow or job completes... (Last updated on 12/06/2023 04:29:16pm UTC) Run DetailsRunning Workflow PR Update on Github Actions Commit: c732636 Started: 12/06/2023 04:23:53pm UTC
|
|
2 Test Cases Affected |
Test Case Results
Test Case | Last 7 days Failures | Last 7 days Flakes |
---|---|---|
Booking With Multiple Email Question and Each Other Question Booking With Multiple Email Question and multiselect Question Multiple Email required and multiselect text required
Retry 1 • Initial Attempt |
0.41% (1)1 / 244 runfailed over last 7 days |
2.46% (6)6 / 244 runsflaked over last 7 days |
Booking With Multiple Email Question and Each Other Question Booking With Multiple Email Question and Radio group Question Multiple Email and Radio group not required
Retry 1 • Initial Attempt |
0% (0)0 / 243 runsfailed over last 7 days |
1.23% (3)3 / 243 runsflaked over last 7 days |
📄 apps/web/playwright/booking-seats.e2e.ts • 1 Flake
Test Case Results
Test Case | Last 7 days Failures | Last 7 days Flakes |
---|---|---|
Booking with Seats User can create a seated event (2 seats as example)
Retry 1 • Initial Attempt |
1.66% (4)4 / 241 runsfailed over last 7 days |
35.27% (85)85 / 241 runsflaked over last 7 days |
📄 apps/web/playwright/locale.e2e.ts • 13 Flakes
Top 1 Common Error Messages
|
13 Test Cases Affected |
Test Case Results
Test Case | Last 7 days Failures | Last 7 days Flakes |
---|---|---|
unauthorized user sees correct translations (de) should use correct translations and html attributes
Retry 1 • Initial Attempt |
-79.53% (-202)-202 / 254 runsfailed over last 7 days |
80.71% (205)205 / 254 runsflaked over last 7 days |
unauthorized user sees correct translations (ar) should use correct translations and html attributes
Retry 1 • Initial Attempt |
-81.27% (-204)-204 / 251 runsfailed over last 7 days |
81.67% (205)205 / 251 runsflaked over last 7 days |
unauthorized user sees correct translations (zh) should use correct translations and html attributes
Retry 1 • Initial Attempt |
-82% (-205)-205 / 250 runsfailed over last 7 days |
82% (205)205 / 250 runsflaked over last 7 days |
unauthorized user sees correct translations (zh-CN) should use correct translations and html attributes
Retry 1 • Initial Attempt |
-82% (-205)-205 / 250 runsfailed over last 7 days |
82% (205)205 / 250 runsflaked over last 7 days |
unauthorized user sees correct translations (zh-TW) should use correct translations and html attributes
Retry 1 • Initial Attempt |
-81.60% (-204)-204 / 250 runsfailed over last 7 days |
82% (205)205 / 250 runsflaked over last 7 days |
unauthorized user sees correct translations (pt) should use correct translations and html attributes
Retry 1 • Initial Attempt |
-82.33% (-205)-205 / 249 runsfailed over last 7 days |
82.33% (205)205 / 249 runsflaked over last 7 days |
unauthorized user sees correct translations (pt-br) should use correct translations and html attributes
Retry 1 • Initial Attempt |
-82.33% (-205)-205 / 249 runsfailed over last 7 days |
82.33% (205)205 / 249 runsflaked over last 7 days |
unauthorized user sees correct translations (es-419) should use correct translations and html attributes
Retry 1 • Initial Attempt |
-82.33% (-205)-205 / 249 runsfailed over last 7 days |
82.33% (205)205 / 249 runsflaked over last 7 days |
authorized user sees correct translations (de) should return correct translations and html attributes
Retry 1 • Initial Attempt |
-81.12% (-202)-202 / 249 runsfailed over last 7 days |
82.33% (205)205 / 249 runsflaked over last 7 days |
authorized user sees correct translations (pt-br) should return correct translations and html attributes
Retry 1 • Initial Attempt |
-82.93% (-204)-204 / 246 runsfailed over last 7 days |
83.33% (205)205 / 246 runsflaked over last 7 days |
authorized user sees correct translations (ar) should return correct translations and html attributes
Retry 1 • Initial Attempt |
-82.86% (-203)-203 / 245 runsfailed over last 7 days |
83.67% (205)205 / 245 runsflaked over last 7 days |
authorized user sees changed translations (de->ar) should return correct translations and html attributes
Retry 1 • Initial Attempt |
-23.87% (-58)-58 / 243 runsfailed over last 7 days |
55.97% (136)136 / 243 runsflaked over last 7 days |
authorized user sees changed translations (de->pt-BR) [locale1] should return correct translations and html attributes
Retry 1 • Initial Attempt |
-29.27% (-48)-48 / 164 runsfailed over last 7 days |
59.15% (97)97 / 164 runsflaked over last 7 days |
📄 apps/web/playwright/onboarding.e2e.ts • 1 Flake
Test Case Results
Test Case | Last 7 days Failures | Last 7 days Flakes |
---|---|---|
Onboarding Onboarding v2 Onboarding Flow
Retry 1 • Initial Attempt |
1.10% (3)3 / 273 runsfailed over last 7 days |
0.73% (2)2 / 273 runsflaked over last 7 days |
📄 apps/web/playwright/booking/longTextQuestion.e2e.ts • 1 Flake
Test Case Results
Test Case | Last 7 days Failures | Last 7 days Flakes |
---|---|---|
Booking With Long Text Question and Each Other Question Booking With Long Text Question and select Question Long Text and select required
Retry 1 • Initial Attempt |
0.41% (1)1 / 245 runfailed over last 7 days |
0.82% (2)2 / 245 runsflaked over last 7 days |
📄 apps/web/playwright/organization/organization-creation.e2e.ts • 1 Flake
Test Case Results
Test Case | Last 7 days Failures | Last 7 days Flakes |
---|---|---|
Organization should be able to create an organization and complete onboarding
Retry 2 • Retry 1 • Initial Attempt |
23.25% (63)63 / 271 runsfailed over last 7 days |
54.24% (147)147 / 271 runsflaked over last 7 days |
📄 apps/web/playwright/login.2fa.e2e.ts • 1 Flake
Test Case Results
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 |
1.57% (4)4 / 255 runsfailed over last 7 days |
25.88% (66)66 / 255 runsflaked over last 7 days |
📄 apps/web/playwright/event-types.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 |
---|---|---|
Event Types tests user -- future can add multiple organizer address
Retry 1 • Initial Attempt |
3.13% (8)8 / 256 runsfailed over last 7 days |
11.72% (30)30 / 256 runsflaked over last 7 days |
Event Types tests user -- future Different Locations Tests can add Attendee Phone Number location and book with it
Retry 1 • Initial Attempt |
3.13% (8)8 / 256 runsfailed over last 7 days |
9.77% (25)25 / 256 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 - Org Can create a booking for Collective EventType
Retry 1 • Initial Attempt |
3.52% (9)9 / 256 runsfailed over last 7 days |
0.39% (1)1 / 256 runflaked over last 7 days |
📄 apps/web/playwright/reschedule.e2e.ts • 1 Flake
Test Case Results
Test Case | Last 7 days Failures | Last 7 days Flakes |
---|---|---|
Reschedule Tests Paid rescheduling should go to success page
Retry 1 • Initial Attempt |
0% (0)0 / 257 runsfailed over last 7 days |
0.78% (2)2 / 257 runsflaked over last 7 days |
📄 apps/web/playwright/team/team-invitation.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 |
---|---|---|
Team Invitation (non verified)
Retry 1 • Initial Attempt |
2.35% (6)6 / 255 runsfailed over last 7 days |
41.57% (106)106 / 255 runsflaked over last 7 days |
Team Invitation (verified)
Retry 1 • Initial Attempt |
0% (0)0 / 255 runsfailed over last 7 days |
12.94% (33)33 / 255 runsflaked over last 7 days |
📄 packages/embeds/embed-core/playwright/tests/preview.e2e.ts • 1 Flake
Test Case Results
Test Case | Last 7 days Failures | Last 7 days Flakes |
---|---|---|
Preview Preview - embed-core should load
Retry 1 • Initial Attempt |
0% (0)0 / 265 runsfailed over last 7 days |
21.51% (57)57 / 265 runsflaked over last 7 days |
📄 packages/embeds/embed-core/playwright/tests/action-based.e2e.ts • 3 Flakes
Top 1 Common Error Messages
|
3 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 |
7.14% (19)19 / 266 runsfailed over last 7 days |
87.59% (233)233 / 266 runsflaked over last 7 days |
Popup Tests Floating Button Popup Pro User - Configured in App with default setting of system theme should open embed iframe according to system theme when no theme is configured through Embed API
Retry 1 • Initial Attempt |
3.38% (9)9 / 266 runsfailed over last 7 days |
76.32% (203)203 / 266 runsflaked over last 7 days |
Popup Tests should open Routing Forms embed on click
Retry 1 • Initial Attempt |
1.89% (5)5 / 265 runsfailed over last 7 days |
41.51% (110)110 / 265 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 |
3.40% (9)9 / 265 runsfailed over last 7 days |
33.96% (90)90 / 265 runsflaked over last 7 days |
const { usernameList, ...rest } = req.query; | ||
let slugs = usernameList; | ||
if (!Array.isArray(usernameList)) { | ||
slugs = usernameList ? [usernameList] : []; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
handles usernameList when only one user slug is provided. It was essential otherwise to provide an extra usernameList query parameter (empty) to satisfy the validation, as well as then had a side-effect of it being considered as a dynamic event
const timeZoneSupported = input.timeZone ? isSupportedTimeZone(input.timeZone) : false; | ||
const availableSlots = await getAvailableSlots({ ctx: await createContext({ req, res }), input }); | ||
const slotsInProvidedTimeZone = timeZoneSupported | ||
? Object.keys(availableSlots.slots).reduce( | ||
(acc: Record<string, { time: string; attendees?: number; bookingUid?: string }[]>, date) => { | ||
acc[date] = availableSlots.slots[date].map((slot) => ({ | ||
...slot, | ||
time: dayjs(slot.time).tz(input.timeZone).format(), | ||
})); | ||
return acc; | ||
}, | ||
{} | ||
) | ||
: availableSlots; | ||
|
||
return slotsInProvidedTimeZone; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We confirm if provided timezone is supported, and if it is, we convert the slots to the provided timezone. The timezone was not being considered otherwise as the slots would always be in Zulu.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice find @alishaz-polymath 🙏🏽
What does this PR do?
Fixes the slots endpoint issues:
Fixes # (issue)
Requirement/Documentation
Type of change
How should this be tested?
Mandatory Tasks
Checklist