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: Update Event Type Pricing For Multiple Installed Payment Apps #12272

Merged
merged 49 commits into from
Dec 20, 2023

Conversation

joeauyeung
Copy link
Contributor

What does this PR do?

This PR fixes a bug when a user had multiple payment apps installed, the pricing was not being updated on the event type when the payment apps settings were changed.

Fixes # (issue)

Requirement/Documentation

  • If there is a requirement document, please, share it here.
  • If there is ab UI/UX design document, please, share it here.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How should this be tested?

  • Install Stripe and Paypal
  • Enable one payment app on the event type and save
  • Now enable the second payment app with a new price and save
    • The price should be updated
  • Try enabling both payment apps
    • An error should be displayed

Mandatory Tasks

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

Checklist

  • I haven't added tests that prove my fix is effective or that my feature works
  • I haven't checked if new and existing unit tests pass locally with my changes

Copy link

vercel bot commented Nov 7, 2023

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

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

Copy link
Contributor

github-actions bot commented Nov 7, 2023

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

@zomars zomars added the core area: core, team members only label Nov 7, 2023
Copy link
Contributor

github-actions bot commented Nov 7, 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 Nov 7, 2023

Current Playwright Test Results Summary

✅ 344 Passing - ❌ 1 Failing - ⚠️ 17 Flaky

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

(Last updated on 12/18/2023 05:36:37pm UTC)

Run Details

Running Workflow PR Update on Github Actions

Commit: 2dc7dc2

Started: 12/18/2023 05:27:22pm UTC

❌ Failures

📄   apps/web/playwright/organization/organization-creation.e2e.ts • 1 Failure

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 2Retry 1Initial Attempt
Error: expect(received).toBe(expected) // Object.is equality...
expect(received).toBe(expected) // Object.is equality

Expected: 1
Received: 0
15.41% (43) 43 / 279 runs
failed over last 7 days
50.18% (140) 140 / 279 runs
flaked over last 7 days

⚠️ Flakes

📄   apps/web/playwright/integrations-stripe.e2e.ts • 3 Flakes

Top 1 Common Error Messages

null

3 Test Cases Affected

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Stripe integration Pending payment booking should not be confirmed by default
Retry 1Initial Attempt
2.89% (7) 7 / 242 runs
failed over last 7 days
1.65% (4) 4 / 242 runs
flaked over last 7 days
Stripe integration Paid booking should be able to be rescheduled
Retry 2Retry 1Initial Attempt
1.27% (3) 3 / 236 runs
failed over last 7 days
2.12% (5) 5 / 236 runs
flaked over last 7 days
Stripe integration Paid booking should be able to be cancelled
Retry 1Initial Attempt
0.42% (1) 1 / 236 run
failed over last 7 days
3.81% (9) 9 / 236 runs
flaked over last 7 days

📄   apps/web/playwright/organization/organization-invitation.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
Organization Email not matching orgAutoAcceptEmail Org Invitation
Retry 2Retry 1Initial Attempt
-100% (-16) -16 / 16 runs
failed over last 7 days
106.25% (17) 17 / 16 runs
flaked over last 7 days
Organization Email not matching orgAutoAcceptEmail Team invitation
Retry 2Retry 1Initial Attempt
-53.33% (-8) -8 / 15 runs
failed over last 7 days
86.67% (13) 13 / 15 runs
flaked over last 7 days
Organization Email matching orgAutoAcceptEmail and a Verified Organization Org Invitation
Retry 2Retry 1Initial Attempt
-80% (-8) -8 / 10 runs
failed over last 7 days
100% (10) 10 / 10 runs
flaked over last 7 days
Organization Email matching orgAutoAcceptEmail and a Verified Organization Team Invitation
Retry 2Retry 1Initial Attempt
-50% (-4) -4 / 8 runs
failed over last 7 days
87.50% (7) 7 / 8 runs
flaked over last 7 days

📄   apps/web/playwright/insights.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
Insights should be able to go to insights as members
Retry 1Initial Attempt
0.80% (2) 2 / 251 runs
failed over last 7 days
4.38% (11) 11 / 251 runs
flaked over last 7 days
Insights should test download button
Retry 1Initial Attempt
0.80% (2) 2 / 251 runs
failed over last 7 days
5.18% (13) 13 / 251 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 (verified)
Retry 1Initial Attempt
0% (0) 0 / 273 runs
failed over last 7 days
94.87% (259) 259 / 273 runs
flaked over last 7 days
Team Invitation (non verified)
Retry 2Retry 1Initial Attempt
4.03% (11) 11 / 273 runs
failed over last 7 days
93.41% (255) 255 / 273 runs
flaked 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 -- legacy can add multiple organizer address
Retry 1Initial Attempt
0.40% (1) 1 / 251 run
failed over last 7 days
2.39% (6) 6 / 251 runs
flaked over last 7 days

📄   packages/embeds/embed-core/playwright/tests/action-based.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
Popup Tests should be able to reschedule
Retry 1Initial Attempt
14.03% (39) 39 / 278 runs
failed over last 7 days
79.86% (222) 222 / 278 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.36% (1) 1 / 278 run
failed over last 7 days
84.17% (234) 234 / 278 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 / 275 runs
failed over last 7 days
23.27% (64) 64 / 275 runs
flaked 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 1Initial Attempt
0.73% (2) 2 / 274 runs
failed over last 7 days
32.85% (90) 90 / 274 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.36% (1) 1 / 275 run
failed over last 7 days
44% (121) 121 / 275 runs
flaked over last 7 days

View Detailed Build Results


ThyMinimalDev
ThyMinimalDev previously approved these changes Nov 8, 2023
apps/web/pages/event-types/[type]/index.tsx Outdated Show resolved Hide resolved
apps/web/pages/event-types/[type]/index.tsx Outdated Show resolved Hide resolved
@ThyMinimalDev ThyMinimalDev self-requested a review November 8, 2023 09:11
@@ -473,6 +473,19 @@ const EventTypePage = (props: EventTypeSetupProps) => {
}
}

// Prevent two payment apps to be enabled
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is repeated because there are two handleSubmit functions for normal event types and managed event types

apps/web/pages/event-types/[type]/index.tsx Outdated Show resolved Hide resolved
@joeauyeung
Copy link
Contributor Author

Tests related to this PR are now passing

@keithwillcode keithwillcode merged commit d07e86e into main Dec 20, 2023
23 checks passed
@keithwillcode keithwillcode deleted the fix/update-eventype-price branch December 20, 2023 18:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
admin 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

7 participants