cal.com icon indicating copy to clipboard operation
cal.com copied to clipboard

refactor: Canceling Seats

Open joeauyeung opened this issue 1 year ago • 5 comments

Stacked on #12905

What does this PR do?

This PR refactors the logic of cancelling an attendee seat out of handleCancelBooking. The logic for when an owner of the event is the same as normal bookings so it's staying as is handleCancelbooking.

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

  • Chore (refactoring code, technical debt, workflow improvements)
  • Tests (Unit/Integration/E2E or any other test)

How should this be tested?

  • Run handleSeats tests for cancelling

Mandatory Tasks

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

Checklist

  • I haven't checked if new and existing unit tests pass locally with my changes

joeauyeung avatar Jan 09 '24 21:01 joeauyeung

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 Jan 19, 2024 3:50am
cal-demo 🔄 Building (Inspect) Visit Preview 💬 Add feedback Jan 19, 2024 3:50am
dev ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 19, 2024 3:50am
4 Ignored Deployments
Name Status Preview Comments Updated (UTC)
ai ⬜️ Ignored (Inspect) Visit Preview Jan 19, 2024 3:50am
cal ⬜️ Ignored (Inspect) Visit Preview Jan 19, 2024 3:50am
qa ⬜️ Ignored (Inspect) Visit Preview Jan 19, 2024 3:50am
ui ⬜️ Ignored (Inspect) Visit Preview Jan 19, 2024 3:50am

vercel[bot] avatar Jan 09 '24 21:01 vercel[bot]

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

github-actions[bot] avatar Jan 09 '24 21:01 github-actions[bot]

Current Playwright Test Results Summary

✅ 399 Passing - ⚠️ 16 Flaky

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

(Last updated on 01/19/2024 03:58:23am UTC)

Run Details

Running Workflow PR Update on Github Actions

Commit: 5fc717192068886dd2ab19151a12dcbd26ad69d0

Started: 01/19/2024 03:49:23am UTC

⚠️ Flakes

📄   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 Radio group Question Long Text required and Radio group not required
Retry 1Initial Attempt
0.37% (1) 1 / 271 run
failed over last 7 days
4.43% (12) 12 / 271 runs
flaked over last 7 days

📄   apps/web/playwright/booking/availability.e2e.ts • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Check availability tab in a event-type Check availability in event type
Retry 1Initial Attempt
32.61% (45) 45 / 138 runs
failed over last 7 days
24.64% (34) 34 / 138 runs
flaked over last 7 days

📄   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 cancelled
Retry 1Initial Attempt
1.45% (5) 5 / 346 runs
failed over last 7 days
9.25% (32) 32 / 346 runs
flaked over last 7 days

📄   apps/web/playwright/webhook.e2e.ts • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
FORM_SUBMITTED on submitting user form, triggers user webhook
Retry 1Initial Attempt
0% (0) 0 / 379 runs
failed over last 7 days
5.80% (22) 22 / 379 runs
flaked over last 7 days

📄   apps/web/playwright/booking/addressQuestione2e/addressQuestion.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
Booking With Address Question and Each Other Question Booking With Address Question and Checkbox Group Question Address required and checkbox group required
Retry 1Initial Attempt
3.65% (14) 14 / 384 runs
failed over last 7 days
2.08% (8) 8 / 384 runs
flaked over last 7 days
Booking With Address Question and Each Other Question Booking With Address Question and Phone Question Address and Phone not required
Retry 1Initial Attempt
0.62% (2) 2 / 321 runs
failed over last 7 days
1.56% (5) 5 / 321 runs
flaked over last 7 days

📄   apps/web/playwright/booking/multipleEmailQuestion.e2e.ts • 1 Flake

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 Radio group Question Booking With Multiple Email Question and Short text question Multiple Email required and Short text required
Retry 1Initial Attempt
0% (0) 0 / 354 runs
failed over last 7 days
1.69% (6) 6 / 354 runs
flaked over last 7 days

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

Top 1 Common Error Messages

null

8 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 1Initial Attempt
2.06% (8) 8 / 389 runs
failed over last 7 days
55.53% (216) 216 / 389 runs
flaked over last 7 days
Popup Tests should be able to reschedule
Retry 1Initial Attempt
-8.13% (-26) -26 / 320 runs
failed over last 7 days
88.75% (284) 284 / 320 runs
flaked over last 7 days
Popup Tests should open Routing Forms embed on click
Retry 1Initial Attempt
-20.38% (-65) -65 / 319 runs
failed over last 7 days
53.92% (172) 172 / 319 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
-15.99% (-51) -51 / 319 runs
failed over last 7 days
79.94% (255) 255 / 319 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 configured with 'auto' theme using Embed API
Retry 1Initial Attempt
-18.81% (-60) -60 / 319 runs
failed over last 7 days
20.38% (65) 65 / 319 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(Booker Profile Page) with dark theme when configured with dark theme using Embed API
Retry 1Initial Attempt
-19.18% (-61) -61 / 318 runs
failed over last 7 days
20.13% (64) 64 / 318 runs
flaked over last 7 days
Popup Tests prendered embed should be loaded and apply the config given to it
Retry 1Initial Attempt
-19.11% (-60) -60 / 314 runs
failed over last 7 days
20.38% (64) 64 / 314 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(Event Booking Page) with dark theme when configured with dark theme using Embed API
Retry 1Initial Attempt
-17.92% (-57) -57 / 318 runs
failed over last 7 days
20.13% (64) 64 / 318 runs
flaked 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 token & refresh token for team
Retry 1Initial Attempt
0% (0) 0 / 385 runs
failed over last 7 days
38.18% (147) 147 / 385 runs
flaked over last 7 days

View Detailed Build Results


deploysentinel[bot] avatar Jan 09 '24 21:01 deploysentinel[bot]

@joeauyeung Can you get this branch up-to-date before we start reviewing? A lot of conflicts right now

CarinaWolli avatar Jan 16 '24 16:01 CarinaWolli

📦 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! 🙌

github-actions[bot] avatar Jan 17 '24 20:01 github-actions[bot]