-
Notifications
You must be signed in to change notification settings - Fork 8.5k
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: Correctly prefill username in case of non-org email invite in an org #12854
fix: Correctly prefill username in case of non-org email invite in an org #12854
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
5 Ignored Deployments
|
Current dependencies on/for this PR: This stack of pull requests is managed by Graphite. |
Thank you for following the naming conventions! 🙏 Feel free to join our discord and post your PR link. |
@@ -74,7 +74,8 @@ const PremiumTextfield = (props: ICustomUsernameProps) => { | |||
const debouncedApiCall = useMemo( | |||
() => | |||
debounce(async (username: string) => { | |||
const { data } = await fetchUsername(username); | |||
// TODO: Support orgSlug | |||
const { data } = await fetchUsername(username, null); |
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 should read the orgSlug here from the correct place and pass that on.
📦 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! 🙌 |
f15b504
to
6cbe72f
Compare
6cbe72f
to
37c297f
Compare
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.
Self review done
// Detect if the team is an org by either the metadata flag or if it has a parent team | ||
const isOrganization = tokenTeam.metadata?.isOrganization || tokenTeam?.parentId !== null; |
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.
Better naming
@@ -632,7 +637,14 @@ export const getServerSideProps = async (ctx: GetServerSidePropsContext) => { | |||
prepopulateFormValues: !isOrgInviteByLink | |||
? { | |||
email: verificationToken.identifier, | |||
username: slugify(username), | |||
username: isOrganizationOrATeamInOrganization |
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.
It fixes the prefilling issue.
Current Playwright Test Results Summary✅ 341 Passing - ❌ 2 Failing - Run may still be in progress, this comment will be updated as current testing workflow or job completes... (Last updated on 12/18/2023 03:17:06pm UTC) Run DetailsRunning Workflow PR Update on Github Actions Commit: 37c297f Started: 12/18/2023 03:07:12pm UTC ❌ Failures📄 apps/web/playwright/organization/organization-invitation.e2e.ts • 1 FailureTest Case Results
📄 packages/embeds/embed-core/playwright/tests/action-based.e2e.ts • 1 FailureTest Case Results
|
|
2 Test Cases Affected |
Test Case Results
Test Case | Last 7 days Failures | Last 7 days Flakes |
---|---|---|
Organization Email not matching orgAutoAcceptEmail Org Invitation
Retry 2 • Retry 1 • Initial Attempt |
-112.50% (-9)-9 / 8 runsfailed over last 7 days |
112.50% (9)9 / 8 runsflaked over last 7 days |
Organization Email not matching orgAutoAcceptEmail Team invitation
Retry 2 • Retry 1 • Initial Attempt |
-62.50% (-5)-5 / 8 runsfailed over last 7 days |
100% (8)8 / 8 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 2 • Retry 1 • Initial Attempt |
3.77% (10)10 / 265 runsfailed over last 7 days |
93.58% (248)248 / 265 runsflaked over last 7 days |
Team Invitation (verified)
Retry 1 • Initial Attempt |
0% (0)0 / 265 runsfailed over last 7 days |
94.72% (251)251 / 265 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 teams via Wizard
Retry 1 • Initial Attempt |
1.50% (4)4 / 267 runsfailed over last 7 days |
14.98% (40)40 / 267 runsflaked over last 7 days |
📄 apps/web/playwright/login.e2e.ts • 1 Flake
Test Case Results
Test Case | Last 7 days Failures | Last 7 days Flakes |
---|---|---|
user can login & logout succesfully login flow user & logout using dashboard
Retry 1 • Initial Attempt |
0.37% (1)1 / 267 runfailed over last 7 days |
23.22% (62)62 / 267 runsflaked over last 7 days |
📄 apps/web/playwright/settings/upload-avatar.e2e.ts • 1 Flake
Test Case Results
Test Case | Last 7 days Failures | Last 7 days Flakes |
---|---|---|
UploadAvatar can upload an image
Retry 1 • Initial Attempt |
0.37% (1)1 / 268 runfailed over last 7 days |
5.22% (14)14 / 268 runsflaked over last 7 days |
📄 apps/web/playwright/oauth-provider.e2e.ts • 1 Flake
Test Case Results
Test Case | Last 7 days Failures | Last 7 days Flakes |
---|---|---|
OAuth Provider should create valid access toke & refresh token for team
Retry 1 • Initial Attempt |
0.36% (1)1 / 274 runfailed over last 7 days |
46.72% (128)128 / 274 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 / 267 runsfailed over last 7 days |
23.22% (62)62 / 267 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 open embed iframe on click - Configured with light theme
Retry 1 • Initial Attempt |
1.11% (3)3 / 270 runsfailed over last 7 days |
61.11% (165)165 / 270 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 |
0.37% (1)1 / 270 runfailed over last 7 days |
83.70% (226)226 / 270 runsflaked over last 7 days |
Popup Tests should open Routing Forms embed on click
Retry 1 • Initial Attempt |
0.37% (1)1 / 270 runfailed over last 7 days |
50.37% (136)136 / 270 runsflaked over last 7 days |
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.
LGTM
…_of_non-org_email_invite_in_an_org
What does this PR do?
abc
instead ofabc-gmail
- This issue is fixed now. It fixes the issue reported here fix: A user joining from invite link of a team doesn't automatically become member of the org #12774 (comment)Type of change
How should this be tested?
See #12774 (comment) for more details.
Mandatory Tasks