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

test: add unit tests for sms sending #14737

Merged
merged 15 commits into from May 2, 2024
Merged

test: add unit tests for sms sending #14737

merged 15 commits into from May 2, 2024

Conversation

CarinaWolli
Copy link
Member

@CarinaWolli CarinaWolli commented Apr 24, 2024

What does this PR do?

Adds units tests for SMS sending when an event type with an active SMS workflow is booked. Also tests that SMS are not sent if user or team is locked for SMS sending.

Run yarn test workflow-notifications.test.ts

Fixes #14726

Copy link
Contributor

github-actions bot commented Apr 24, 2024

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

@github-actions github-actions bot added the automated-tests area: unit tests, e2e tests, playwright label Apr 24, 2024
@keithwillcode keithwillcode added consumer core area: core, team members only labels Apr 24, 2024
Copy link

vercel bot commented Apr 24, 2024

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 May 2, 2024 1:32pm
platform-starter-kit ❌ Failed (Inspect) May 2, 2024 1:32pm
2 Ignored Deployments
Name Status Preview Comments Updated (UTC)
cal ⬜️ Ignored (Inspect) Visit Preview May 2, 2024 1:32pm
calcom-web-canary ⬜️ Ignored (Inspect) Visit Preview May 2, 2024 1:32pm

Copy link
Contributor

github-actions bot commented Apr 24, 2024

📦 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 Apr 24, 2024

Current Playwright Test Results Summary

✅ 315 Passing - ⚠️ 18 Flaky

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

(Last updated on 05/02/2024 01:48:08pm UTC)

Run Details

Running Workflow PR Update on Github Actions

Commit: 4a1a1df

Started: 05/02/2024 01:42:59pm UTC

⚠️ 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 Pending payment booking should not be confirmed by default
Retry 1Initial Attempt
0.82% (2) 2 / 244 runs
failed over last 7 days
21.31% (52) 52 / 244 runs
flaked over last 7 days

📄   apps/web/playwright/event-types.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
Event Types tests -- future user Different Locations Tests can add Attendee Phone Number location and book with it
Retry 1Initial Attempt
0% (0) 0 / 262 runs
failed over last 7 days
10.31% (27) 27 / 262 runs
flaked over last 7 days
Event Types tests -- legacy user Different Locations Tests Can remove location from multiple locations that are saved
Retry 1Initial Attempt
2.21% (5) 5 / 226 runs
failed over last 7 days
15.04% (34) 34 / 226 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
BOOKING_RESCHEDULED when rescheduling to a booking that already exists, should send a booking rescheduled event with the existant booking uid
Retry 2Retry 1Initial Attempt
10.27% (23) 23 / 224 runs
failed over last 7 days
46.88% (105) 105 / 224 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 / 243 runs
failed over last 7 days
44.86% (109) 109 / 243 runs
flaked over last 7 days

📄   apps/web/playwright/managedBooking/advancedOptions.e2e.ts • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Check advanced options in a managed team event type Check advanced options in a managed team event type without offer seats
Retry 1Initial Attempt
0% (0) 0 / 217 runs
failed over last 7 days
5.99% (13) 13 / 217 runs
flaked over last 7 days

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

Top 1 Common Error Messages

null

9 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
14.01% (36) 36 / 257 runs
failed over last 7 days
48.64% (125) 125 / 257 runs
flaked over last 7 days
Popup Tests should be able to reschedule
Retry 1Initial Attempt
-130.21% (-125) -125 / 96 runs
failed over last 7 days
130.21% (125) 125 / 96 runs
flaked over last 7 days
Popup Tests should open Routing Forms embed on click
Retry 1Initial Attempt
-131.58% (-125) -125 / 95 runs
failed over last 7 days
131.58% (125) 125 / 95 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
-129.47% (-123) -123 / 95 runs
failed over last 7 days
129.47% (123) 123 / 95 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
-129.47% (-123) -123 / 95 runs
failed over last 7 days
129.47% (123) 123 / 95 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
-129.47% (-123) -123 / 95 runs
failed over last 7 days
129.47% (123) 123 / 95 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
-129.47% (-123) -123 / 95 runs
failed over last 7 days
129.47% (123) 123 / 95 runs
flaked over last 7 days
Popup Tests should open on clicking child element
Retry 1Initial Attempt
-132.86% (-93) -93 / 70 runs
failed over last 7 days
132.86% (93) 93 / 70 runs
flaked over last 7 days
Popup Tests prendered embed should be loaded and apply the config given to it
Retry 1Initial Attempt
-129.47% (-123) -123 / 95 runs
failed over last 7 days
129.47% (123) 123 / 95 runs
flaked 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 -- future Can create a booking for Round Robin EventType
Retry 1Initial Attempt
17.80% (47) 47 / 264 runs
failed over last 7 days
22.35% (59) 59 / 264 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 -- future login flow user & logout using dashboard
Retry 1Initial Attempt
7.84% (20) 20 / 255 runs
failed over last 7 days
34.51% (88) 88 / 255 runs
flaked 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 1Initial Attempt
0.43% (1) 1 / 232 run
failed over last 7 days
9.48% (22) 22 / 232 runs
flaked over last 7 days

View Detailed Build Results


@graphite-app graphite-app bot requested a review from a team April 25, 2024 01:31
@dosubot dosubot bot added bookings area: bookings, availability, timezones, double booking workflows area: workflows, automations labels Apr 25, 2024
Copy link

graphite-app bot commented Apr 25, 2024

Graphite Automations

"Add consumer team as reviewer" took an action on this PR • (04/25/24)

1 reviewer was added to this PR based on Keith Williams's automation.

Copy link
Contributor

@joeauyeung joeauyeung left a comment

Choose a reason for hiding this comment

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

Heads up I'm seeing two errors popping up for tests
image
image

Copy link
Contributor

@Udit-takkar Udit-takkar left a comment

Choose a reason for hiding this comment

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

LGTM. worked fine for me

Screenshot 2024-04-26 at 9 04 50 PM

@CarinaWolli
Copy link
Member Author

@joeauyeung did you run migrations?

Copy link
Member

@hariombalhara hariombalhara left a comment

Choose a reason for hiding this comment

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

Nice work @CarinaWolli !!

@hariombalhara hariombalhara enabled auto-merge (squash) May 2, 2024 13:30
@CarinaWolli CarinaWolli dismissed joeauyeung’s stale review May 2, 2024 14:42

looks like migration were not ran

@hariombalhara hariombalhara merged commit 0391bfe into main May 2, 2024
39 of 40 checks passed
@hariombalhara hariombalhara deleted the tests/sms-locking branch May 2, 2024 14:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automated-tests area: unit tests, e2e tests, playwright bookings area: bookings, availability, timezones, double booking consumer core area: core, team members only High priority Created by Linear-GitHub Sync workflows area: workflows, automations
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[CAL-3522] Tests to verify SMS locking logic
5 participants