cal.com
cal.com copied to clipboard
refactor: organization creation handler
What does this PR do?
This PR refactors the create handler that we use for organizations. We use the same handler in order to create a platform user as well, thats why now we have two different handlers, one that handles the creation of a platform user i.e. createPlatformUser and the other one that handles the creation of an org user i.e. createOrgUser. I've tried to split everything else in smaller and more meaningful functions for better readability and understanding of what piece does what.
Thank you for following the naming conventions! 🙏 Feel free to join our discord and post your PR link.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
3 Ignored Deployments
| Name | Status | Preview | Comments | Updated (UTC) |
|---|---|---|---|---|
| ai | ⬜️ Ignored (Inspect) | Visit Preview | May 17, 2024 8:07am | |
| cal | ⬜️ Ignored (Inspect) | Visit Preview | May 17, 2024 8:07am | |
| calcom-web-canary | ⬜️ Ignored (Inspect) | Visit Preview | May 17, 2024 8:07am |
Graphite Automations
"Add platform team as reviewer" took an action on this PR • (05/07/24)
1 reviewer was added to this PR based on Keith Williams's automation.
📦 Next.js Bundle Analysis for @calcom/web
This analysis was generated by the Next.js Bundle Analysis action. 🤖
Three Pages Changed Size
The following pages changed size from the code in this PR compared to its base branch:
| Page | Size (compressed) | First Load | % of Budget (350 KB) |
|---|---|---|---|
/settings/platform |
261.21 KB |
489.84 KB | 139.95% (🟢 -0.18%) |
/settings/platform/oauth-clients/[clientId]/edit |
259.82 KB |
488.45 KB | 139.56% (🟢 -0.18%) |
/settings/platform/oauth-clients/create |
259.1 KB |
487.73 KB | 139.35% (🟢 -0.18%) |
Details
Only the gzipped size is provided here based on an expert tip.
First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If next/link is used, subsequent page loads would only need to download that page's bundle (the number in the "Size" column), since the global bundle has already been downloaded.
Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis
The "Budget %" column shows what percentage of your performance budget the First Load total takes up. For example, if your budget was 100kb, and a given page's first load size was 10kb, it would be 10% of your budget. You can also see how much this has increased or decreased compared to the base branch of your PR. If this percentage has increased by 20% or more, there will be a red status indicator applied, indicating that special attention should be given to this. If you see "+/-
Current Playwright Test Results Summary
✅ 310 Passing - ❌ 5 Failing - ⚠️ 12 Flaky
Run may still be in progress, this comment will be updated as current testing workflow or job completes...
(Last updated on 05/17/2024 08:23:57am UTC)
Run Details
Running Workflow PR Update on Github Actions
Commit: bee7ff321e6acb7ad4247a79983e3fa93883c6e7
Started: 05/17/2024 08:20:29am UTC
❌ Failures
📄 apps/web/playwright/profile.e2e.ts • 2 Failures
Test Case Results
| Test Case | Last 7 days Failures | Last 7 days Flakes |
|---|---|---|
|
Update Profile Can update a users email (verification enabled)
Retry 2 • Retry 1 • Initial Attempt Error: page.waitForURL: Timeout 30000ms exceeded....
|
39.83% (96)96 / 241 runsfailed over last 7 days |
31.95% (77)77 / 241 runsflaked over last 7 days |
|
Update Profile Can resend verification link if the secondary email is unverified
Retry 2 • Retry 1 • Initial Attempt Error: expect(received).toEqual(expected) // deep equality...
|
12.76% (31)31 / 243 runsfailed over last 7 days |
30.04% (73)73 / 243 runsflaked over last 7 days |
📄 apps/web/playwright/webhook.e2e.ts • 1 Failure
Test Case Results
| Test Case | Last 7 days Failures | Last 7 days Flakes |
|---|---|---|
|
MEETING_ENDED, MEETING_STARTED should create/remove scheduledWebhookTriggers for existing bookings
Retry 1 • Initial Attempt Error: expect(received).toBe(expected) // Object.is equality...
|
4.22% (7)7 / 166 runsfailed over last 7 days |
34.94% (58)58 / 166 runsflaked over last 7 days |
📄 apps/web/playwright/team/team-invitation.e2e.ts • 1 Failure
Test Case Results
| Test Case | Last 7 days Failures | Last 7 days Flakes |
|---|---|---|
|
Team Invitation (non verified)
Retry 2 • Retry 1 • Initial Attempt Error: expect(received).toBe(expected) // Object.is equality...
|
6.99% (16)16 / 229 runsfailed over last 7 days |
4.80% (11)11 / 229 runsflaked over last 7 days |
📄 apps/web/playwright/organization/organization-creation.e2e.ts • 1 Failure
Test Case Results
| Test Case | Last 7 days Failures | Last 7 days Flakes |
|---|---|---|
|
Organization Admin should be able to create an org where an existing user is made an owner
Retry 2 • Retry 1 • Initial Attempt Error: Email with subject Your organization has been created not found
|
100% (6)6 / 6 runsfailed over last 7 days |
0% (0)0 / 6 runsflaked over last 7 days |
⚠️ Flakes
📄 apps/web/playwright/integrations-stripe.e2e.ts • 1 Flake
Test Case Results
| Test Case | Last 7 days Failures | Last 7 days Flakes |
|---|---|---|
|
Stripe integration Paid booking should be able to be rescheduled
Retry 1 • Initial Attempt |
3.03% (6)6 / 198 runsfailed over last 7 days |
14.14% (28)28 / 198 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 -- legacy user Different Locations Tests Can remove location from multiple locations that are saved
Retry 2 • Retry 1 • Initial Attempt |
3.72% (8)8 / 215 runsfailed over last 7 days |
19.53% (42)42 / 215 runsflaked over last 7 days |
|
Event Types tests -- legacy user Different Locations Tests can add single organizer address location without display location public option
Retry 1 • Initial Attempt |
0% (0)0 / 216 runsfailed over last 7 days |
5.09% (11)11 / 216 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 -- legacy Can create a booking for Round Robin EventType
Retry 1 • Initial Attempt |
7.11% (16)16 / 225 runsfailed over last 7 days |
28.89% (65)65 / 225 runsflaked over last 7 days |
📄 apps/web/playwright/team/team-invitation.e2e.ts • 1 Flake
Test Case Results
| Test Case | Last 7 days Failures | Last 7 days Flakes |
|---|---|---|
|
Team Invitation (verified)
Retry 2 • Retry 1 • Initial Attempt |
3.49% (8)8 / 229 runsfailed over last 7 days |
6.99% (16)16 / 229 runsflaked over last 7 days |
📄 packages/embeds/embed-core/playwright/tests/namespacing.e2e.ts • 4 Flakes
Top 1 Common Error Messages
|
|
4 Test Cases Affected |
Test Case Results
| Test Case | Last 7 days Failures | Last 7 days Flakes |
|---|---|---|
|
Namespacing Inline Embed Add inline embed using a namespace without reload
Retry 1 • Initial Attempt |
0.47% (1)1 / 213 runfailed over last 7 days |
60.56% (129)129 / 213 runsflaked over last 7 days |
|
Namespacing Inline Embed Double install Embed Snippet with inline embed using a namespace
Retry 1 • Initial Attempt |
0.47% (1)1 / 213 runfailed over last 7 days |
59.62% (127)127 / 213 runsflaked over last 7 days |
|
Namespacing Inline Embed Double install Embed Snippet with inline embed without a namespace(i.e. default namespace)
Retry 1 • Initial Attempt |
0% (0)0 / 213 runsfailed over last 7 days |
63.38% (135)135 / 213 runsflaked over last 7 days |
|
Namespacing Different namespaces can have different init configs
Retry 1 • Initial Attempt |
0% (0)0 / 211 runsfailed over last 7 days |
60.19% (127)127 / 211 runsflaked over last 7 days |
📄 apps/web/playwright/profile.e2e.ts • 1 Flake
Test Case Results
| Test Case | Last 7 days Failures | Last 7 days Flakes |
|---|---|---|
|
Update Profile Newly added secondary email should show as Unverified
Retry 1 • Initial Attempt |
2.06% (5)5 / 243 runsfailed over last 7 days |
26.75% (65)65 / 243 runsflaked over last 7 days |
📄 packages/app-store/routing-forms/playwright/tests/basic.e2e.ts • 1 Flake
Test Case Results
| Test Case | Last 7 days Failures | Last 7 days Flakes |
|---|---|---|
|
Routing Forms Seeded Routing Form Router URL should work
Retry 1 • Initial Attempt |
0.47% (1)1 / 215 runfailed over last 7 days |
15.35% (33)33 / 215 runsflaked over last 7 days |
📄 apps/web/playwright/organization/booking.e2e.ts • 1 Flake
Test Case Results
| Test Case | Last 7 days Failures | Last 7 days Flakes |
|---|---|---|
|
Bookings Team Event Can create a booking for Round Robin EventType
Retry 1 • Initial Attempt |
8.11% (18)18 / 222 runsfailed over last 7 days |
26.58% (59)59 / 222 runsflaked over last 7 days |
This PR is being marked as stale due to inactivity.
This PR is being closed due to staleness. Please reopen if work is to continue.