Skip to content
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: Dynamic Group Booking link for organization #12825

Merged
merged 3 commits into from
Dec 19, 2023

Conversation

hariombalhara
Copy link
Member

@hariombalhara hariombalhara commented Dec 16, 2023

What does this PR do?

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • Tests (Unit/Integration/E2E or any other test)

How should this be tested?

  • Simply create 2 users in an organization(org1)
  • Got to org1.cal.local:3000/user1+user2
  • You should be able to book through that.

Mandatory Tasks

  • Make sure you have self-reviewed the code. A decent size PR without self-review might be rejected.

Copy link

vercel bot commented Dec 16, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
api ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 19, 2023 5:45pm
dev ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 19, 2023 5:45pm
qa 🔄 Building (Inspect) Visit Preview 💬 Add feedback Dec 19, 2023 5:45pm
ui 🔄 Building (Inspect) Visit Preview 💬 Add feedback Dec 19, 2023 5:45pm
3 Ignored Deployments
Name Status Preview Comments Updated (UTC)
ai ⬜️ Ignored (Inspect) Visit Preview Dec 19, 2023 5:45pm
cal ⬜️ Ignored (Inspect) Visit Preview Dec 19, 2023 5:45pm
cal-demo ⬜️ Ignored (Inspect) Visit Preview Dec 19, 2023 5:45pm

@hariombalhara
Copy link
Member Author

Current dependencies on/for this PR:

This stack of pull requests is managed by Graphite.

Copy link
Contributor

github-actions bot commented Dec 16, 2023

Thank you for following the naming conventions! 🙏 Feel free to join our discord and post your PR link.

Copy link
Contributor

github-actions bot commented Dec 16, 2023

📦 Next.js Bundle Analysis for @calcom/web

This analysis was generated by the Next.js Bundle Analysis action. 🤖

This PR introduced no changes to the JavaScript bundle! 🙌

Copy link

deploysentinel bot commented Dec 16, 2023

Current Playwright Test Results Summary

✅ 333 Passing - ⚠️ 23 Flaky

Run may still be in progress, this comment will be updated as current testing workflow or job completes...

(Last updated on 12/16/2023 07:05:29am UTC)

Run Details

Running Workflow PR Update on Github Actions

Commit: 302cc6e

Started: 12/16/2023 06:58:34am UTC

⚠️ Flakes

📄   apps/web/playwright/locale.e2e.ts • 13 Flakes

Top 1 Common Error Messages

null

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 1Initial Attempt
-13.28% (-34) -34 / 256 runs
failed over last 7 days
13.28% (34) 34 / 256 runs
flaked over last 7 days
unauthorized user sees correct translations (ar) should use correct translations and html attributes
Retry 1Initial Attempt
-13.28% (-34) -34 / 256 runs
failed over last 7 days
13.28% (34) 34 / 256 runs
flaked over last 7 days
unauthorized user sees correct translations (zh) should use correct translations and html attributes
Retry 1Initial Attempt
-13.28% (-34) -34 / 256 runs
failed over last 7 days
13.28% (34) 34 / 256 runs
flaked over last 7 days
unauthorized user sees correct translations (zh-CN) should use correct translations and html attributes
Retry 1Initial Attempt
-13.28% (-34) -34 / 256 runs
failed over last 7 days
13.28% (34) 34 / 256 runs
flaked over last 7 days
unauthorized user sees correct translations (zh-TW) should use correct translations and html attributes
Retry 1Initial Attempt
-13.28% (-34) -34 / 256 runs
failed over last 7 days
13.28% (34) 34 / 256 runs
flaked over last 7 days
unauthorized user sees correct translations (pt) should use correct translations and html attributes
Retry 1Initial Attempt
-13.28% (-34) -34 / 256 runs
failed over last 7 days
13.28% (34) 34 / 256 runs
flaked over last 7 days
unauthorized user sees correct translations (pt-br) should use correct translations and html attributes
Retry 1Initial Attempt
-13.28% (-34) -34 / 256 runs
failed over last 7 days
13.28% (34) 34 / 256 runs
flaked over last 7 days
unauthorized user sees correct translations (es-419) should use correct translations and html attributes
Retry 1Initial Attempt
-13.28% (-34) -34 / 256 runs
failed over last 7 days
13.28% (34) 34 / 256 runs
flaked over last 7 days
authorized user sees correct translations (de) should return correct translations and html attributes
Retry 1Initial Attempt
-13.28% (-34) -34 / 256 runs
failed over last 7 days
13.28% (34) 34 / 256 runs
flaked over last 7 days
authorized user sees correct translations (pt-br) should return correct translations and html attributes
Retry 1Initial Attempt
-13.28% (-34) -34 / 256 runs
failed over last 7 days
13.28% (34) 34 / 256 runs
flaked over last 7 days
authorized user sees correct translations (ar) should return correct translations and html attributes
Retry 1Initial Attempt
-13.28% (-34) -34 / 256 runs
failed over last 7 days
13.28% (34) 34 / 256 runs
flaked over last 7 days
authorized user sees changed translations (de->ar) should return correct translations and html attributes
Retry 1Initial Attempt
-3.13% (-8) -8 / 256 runs
failed over last 7 days
11.72% (30) 30 / 256 runs
flaked over last 7 days
authorized user sees changed translations (de->pt-BR) [locale1] should return correct translations and html attributes
Retry 1Initial Attempt
-8.55% (-20) -20 / 234 runs
failed over last 7 days
11.97% (28) 28 / 234 runs
flaked 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 1Initial Attempt
0% (0) 0 / 254 runs
failed over last 7 days
21.65% (55) 55 / 254 runs
flaked 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 1Initial Attempt
0.39% (1) 1 / 255 run
failed over last 7 days
24.31% (62) 62 / 255 runs
flaked over last 7 days

📄   packages/embeds/embed-core/playwright/tests/action-based.e2e.ts • 4 Flakes

Top 1 Common Error Messages

null

4 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 2Retry 1Initial Attempt
1.16% (3) 3 / 259 runs
failed over last 7 days
59.46% (154) 154 / 259 runs
flaked 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 1Initial Attempt
0.39% (1) 1 / 258 run
failed over last 7 days
81.78% (211) 211 / 258 runs
flaked over last 7 days
Popup Tests should open Routing Forms embed on click
Retry 1Initial Attempt
0.39% (1) 1 / 258 run
failed over last 7 days
48.06% (124) 124 / 258 runs
flaked over last 7 days
Popup Tests should be able to reschedule
Retry 1Initial Attempt
11.20% (29) 29 / 259 runs
failed over last 7 days
84.17% (218) 218 / 259 runs
flaked 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 1Initial Attempt
0.39% (1) 1 / 255 run
failed over last 7 days
43.53% (111) 111 / 255 runs
flaked 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 1Initial Attempt
18.85% (49) 49 / 260 runs
failed over last 7 days
47.69% (124) 124 / 260 runs
flaked over last 7 days

📄   apps/web/playwright/team/team-invitation.e2e.ts • 2 Flakes

Top 1 Common Error Messages

null

2 Test Cases Affected

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Team Invitation (non verified)
Retry 2Retry 1Initial Attempt
3.92% (10) 10 / 255 runs
failed over last 7 days
92.94% (237) 237 / 255 runs
flaked over last 7 days
Team Invitation (verified)
Retry 1Initial Attempt
0.39% (1) 1 / 255 run
failed over last 7 days
94.12% (240) 240 / 255 runs
flaked over last 7 days

View Detailed Build Results


@@ -47,7 +47,7 @@ export const getServerSideProps = async (ctx: GetServerSidePropsContext) => {
},
});
}
const params = { user: teamOrUserSlug, type };
const params = { user: teamOrUserSlugOrDynamicGroup, type };
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't send slugified value as that would slugify + as well and then further dynamic group booking logic would break

// --- fill form
await page.fill('[name="name"]', opts?.name ?? testName);
await page.fill('[name="email"]', opts?.email ?? testEmail);
if (opts?.title) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Support filling dynamic group booking title.

export function userOrgQuery(hostname: string, fallback?: string | string[]) {
const { currentOrgDomain, isValidOrgDomain } = getOrgDomainConfigFromHostname({ hostname, fallback });
export function userOrgQuery(req: IncomingMessage | undefined, fallback?: string | string[]) {
const { currentOrgDomain, isValidOrgDomain } = orgDomainConfig(req, fallback);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Support running tests with custom org slug. orgDomainConfig has the support

exception
exception previously approved these changes Dec 19, 2023
packages/features/bookings/lib/handleNewBooking.ts Outdated Show resolved Hide resolved
Co-authored-by: Erik <erik@erosemberg.com>
Copy link
Member

@zomars zomars left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@zomars zomars added the High priority Created by Linear-GitHub Sync label Dec 19, 2023
@zomars zomars enabled auto-merge (squash) December 19, 2023 17:37
@zomars zomars merged commit a8975f5 into main Dec 19, 2023
22 of 23 checks passed
@zomars zomars deleted the 12-16-fix_Dynamic_Group_Booking_link_for_organization branch December 19, 2023 17:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core area: core, team members only High priority Created by Linear-GitHub Sync
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants