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

chore: Add unit tests event types api #14536

Conversation

keithwillcode
Copy link
Contributor

@keithwillcode keithwillcode commented Apr 11, 2024

Adds unit tests to the GET handler for event-types/[id] in v1 of the API.

This is a WIP because we need to figure out resolving ~/ in vitest. - EDIT @zomars Fixed this

@keithwillcode keithwillcode requested review from a team April 11, 2024 16:37
@keithwillcode keithwillcode added this to the v4.1 milestone Apr 11, 2024
@keithwillcode keithwillcode added the High priority Created by Linear-GitHub Sync label Apr 11, 2024
Copy link
Contributor

github-actions bot commented Apr 11, 2024

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

@keithwillcode keithwillcode added core area: core, team members only foundation labels Apr 11, 2024
@keithwillcode keithwillcode changed the base branch from main to fix/api-event-types-permission-check April 11, 2024 16:38
Copy link

vercel bot commented Apr 11, 2024

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

4 Ignored Deployments
Name Status Preview Comments Updated (UTC)
ai ⬜️ Ignored (Inspect) Visit Preview Apr 11, 2024 6:46pm
cal ⬜️ Ignored (Inspect) Visit Preview Apr 11, 2024 6:46pm
calcom-web-canary ⬜️ Ignored (Inspect) Visit Preview Apr 11, 2024 6:46pm
qa ⬜️ Ignored (Inspect) Visit Preview Apr 11, 2024 6:46pm

Copy link

deploysentinel bot commented Apr 11, 2024

Current Playwright Test Results Summary

✅ 309 Passing - ❌ 1 Failing - ⚠️ 19 Flaky

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

(Last updated on 04/11/2024 04:55:16pm UTC)

Run Details

Running Workflow PR Update on Github Actions

Commit: 3315e94

Started: 04/11/2024 04:51:06pm UTC

❌ Failures

📄   apps/web/playwright/booking-pages.e2e.ts • 1 Failure

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
check SSR and OG - User Event Type
Retry 2Retry 1Initial Attempt
Error: expect(received).toContain(expected) // indexOf...
expect(received).toContain(expected) // indexOf

Expected substring: "Test User"
Received string:    "  |  | Cal.com"
97.73% (43) 43 / 44 runs
failed over last 7 days
0% (0) 0 / 44 runs
flaked over last 7 days

⚠️ Flakes

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

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
prefill -- legacy logged in
Retry 1Initial Attempt
0% (0) 0 / 349 runs
failed over last 7 days
3.15% (11) 11 / 349 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 -- legacy user Different Locations Tests can select 'display on booking page' option when multiple organizer input type are present
Retry 1Initial Attempt
0% (0) 0 / 338 runs
failed over last 7 days
2.07% (7) 7 / 338 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
5.11% (17) 17 / 333 runs
failed over last 7 days
25.83% (86) 86 / 333 runs
flaked over last 7 days

📄   apps/web/playwright/integrations-stripe.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
Stripe integration Can book a paid booking
Retry 1Initial Attempt
2.35% (8) 8 / 341 runs
failed over last 7 days
33.14% (113) 113 / 341 runs
flaked over last 7 days
Stripe integration Change stripe presented currency Should be able to change currency
Retry 1Initial Attempt
0% (0) 0 / 333 runs
failed over last 7 days
1.50% (5) 5 / 333 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
0% (0) 0 / 341 runs
failed over last 7 days
63.34% (216) 216 / 341 runs
flaked over last 7 days
Popup Tests should be able to reschedule
Retry 1Initial Attempt
-172% (-215) -215 / 125 runs
failed over last 7 days
172% (215) 215 / 125 runs
flaked over last 7 days
Popup Tests should open Routing Forms embed on click
Retry 1Initial Attempt
-172% (-215) -215 / 125 runs
failed over last 7 days
172% (215) 215 / 125 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
-170.40% (-213) -213 / 125 runs
failed over last 7 days
172% (215) 215 / 125 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
-174.80% (-215) -215 / 123 runs
failed over last 7 days
174.80% (215) 215 / 123 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
-174.80% (-215) -215 / 123 runs
failed over last 7 days
174.80% (215) 215 / 123 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
-174.80% (-215) -215 / 123 runs
failed over last 7 days
174.80% (215) 215 / 123 runs
flaked over last 7 days
Popup Tests prendered embed should be loaded and apply the config given to it
Retry 1Initial Attempt
-174.80% (-215) -215 / 123 runs
failed over last 7 days
174.80% (215) 215 / 123 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 / 342 runs
failed over last 7 days
37.72% (129) 129 / 342 runs
flaked over last 7 days

📄   packages/app-store/routing-forms/playwright/tests/basic.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
Routing Forms Seeded Routing Form Router URL should work
Retry 1Initial Attempt
0.29% (1) 1 / 341 run
failed over last 7 days
13.78% (47) 47 / 341 runs
flaked over last 7 days
Routing Forms Seeded Routing Form Routing Link should validate fields
Retry 1Initial Attempt
0% (0) 0 / 341 runs
failed over last 7 days
6.16% (21) 21 / 341 runs
flaked over last 7 days
Routing Forms Seeded Routing Form Test preview should return correct route
Retry 1Initial Attempt
0% (0) 0 / 341 runs
failed over last 7 days
33.43% (114) 114 / 341 runs
flaked over last 7 days

📄   apps/web/playwright/bookings-list.e2e.ts • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Bookings Upcoming bookings managed eventType booking should be visible to team admin
Retry 1Initial Attempt
6.45% (4) 4 / 62 runs
failed over last 7 days
22.58% (14) 14 / 62 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.58% (2) 2 / 342 runs
failed over last 7 days
53.80% (184) 184 / 342 runs
flaked over last 7 days

View Detailed Build Results


Copy link
Contributor

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

},
resolve: {
alias: {
"~": new URL("./apps/api/v1", import.meta.url).pathname,
Copy link
Member

Choose a reason for hiding this comment

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

This might be it @keithwillcode

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Beautiful. Thank you, @zomars!

@keithwillcode keithwillcode marked this pull request as ready for review April 11, 2024 18:47
@graphite-app graphite-app bot requested a review from a team April 11, 2024 18:47
@dosubot dosubot bot added the api area: API, enterprise API, access token, OAuth label Apr 11, 2024
@dosubot dosubot bot added automated-tests area: unit tests, e2e tests, playwright event-types area: event types, event-types labels Apr 11, 2024
@zomars zomars merged commit fb18250 into fix/api-event-types-permission-check Apr 11, 2024
15 of 17 checks passed
@zomars zomars deleted the chore/add-unit-tests-event-types-api branch April 11, 2024 18:49
Copy link

graphite-app bot commented Apr 11, 2024

Graphite Automations

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

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

@zomars
Copy link
Member

zomars commented Apr 11, 2024

Merged into #14528

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api area: API, enterprise API, access token, OAuth automated-tests area: unit tests, e2e tests, playwright core area: core, team members only event-types area: event types, event-types foundation High priority Created by Linear-GitHub Sync
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants