Skip to content

test: Create unit tests for react components in packages/ui/components/credits#10044

Merged
keithwillcode merged 5 commits intomainfrom
CALCOM-618
Jul 21, 2023
Merged

test: Create unit tests for react components in packages/ui/components/credits#10044
keithwillcode merged 5 commits intomainfrom
CALCOM-618

Conversation

@gitstart-calcom
Copy link
Copy Markdown
Contributor

@gitstart-calcom gitstart-calcom commented Jul 10, 2023

DEMO

Run

yarn test credits

image

@vercel
Copy link
Copy Markdown

vercel bot commented Jul 10, 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 Jul 19, 2023 9:03pm
cal-demo ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 19, 2023 9:03pm
cal-staging ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 19, 2023 9:03pm
dev ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 19, 2023 9:03pm
ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 19, 2023 9:03pm
2 Ignored Deployments
Name Status Preview Comments Updated (UTC)
cal ⬜️ Ignored (Inspect) Visit Preview Jul 19, 2023 9:03pm
qa ⬜️ Ignored (Inspect) Jul 19, 2023 9:03pm

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jul 10, 2023

Thank you for following the naming conventions! 🙏

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jul 10, 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! 🙌

@deploysentinel
Copy link
Copy Markdown

deploysentinel bot commented Jul 10, 2023

Current Playwright Test Results Summary

✅ 71 Passing - ⚠️ 2 Flaky

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

(Last updated on 07/19/2023 09:01:03pm UTC)

Run Details

Running Workflow PR Update on Github Actions

Commit: c03fc2e

Started: 07/19/2023 08:58:36pm UTC

⚠️ Flakes

📄   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 2Retry 1Initial Attempt
15.85% (52) 52 / 328 runs
failed over last 7 days
26.22% (86) 86 / 328 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 can add multiple organizer address
Retry 1Initial Attempt
0.58% (2) 2 / 342 runs
failed over last 7 days
10.82% (37) 37 / 342 runs
flaked over last 7 days

View Detailed Build Results


@gitstart-calcom gitstart-calcom marked this pull request as ready for review July 10, 2023 18:51
@PeerRich PeerRich added the Low priority Created by Linear-GitHub Sync label Jul 10, 2023
@alwaysmeticulous
Copy link
Copy Markdown

alwaysmeticulous bot commented Jul 11, 2023

🤖 Meticulous spotted visual differences in 75 of 203 screens tested: view and approve differences detected.

Last updated for commit 90a304e. This comment will update as new commits are pushed.

Copy link
Copy Markdown
Contributor

@ericrommel ericrommel left a comment

Choose a reason for hiding this comment

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

Hey @gitstart-calcom, sorry, but unit testing for ui components from a third-party library doesn't make any sense. Can you elaborate on how valuable for us to test them? unit tests are linked to actions on our behaviours, not from external components. We can achieve UI behavioural expectations from the high-level testing part, like UI Testing, Acceptance testing and others that can be even automated. What do you think to discuss about it (if needed)?

@gitstart-calcom
Copy link
Copy Markdown
Contributor Author

gitstart-calcom commented Jul 12, 2023

Hi @ericrommel, how are you? 😄
It was discussed in our Slack group about creating these tests and we were allowed to create these PRs, unit tests for UI components offer valuable benefits, even if they come from a third-party library. here are some points that you should consider:

  • They allow isolated testing of internal logic and behavior specific to the components.
  • Unit tests provide a faster feedback loop, helping identify and address component-specific issues promptly.
  • They contribute to overall test coverage and enhance confidence in the codebase's stability and reliability.
  • Unit tests for UI components complement high-level testing approaches, focusing on internal behaviors.

In summary, incorporating unit tests for UI components in the calcom brings advantages in terms of isolated testing, faster feedback, improved test coverage, and enhanced confidence. What do you think?

@gitstart-calcom gitstart-calcom changed the title test: Create unit tests for react components in packages/ui/components/credits (CALCOM-618) test: Create unit tests for react components in packages/ui/components/credits Jul 20, 2023
@keithwillcode keithwillcode merged commit 85c3c6d into main Jul 21, 2023
@keithwillcode keithwillcode deleted the CALCOM-618 branch July 21, 2023 16:44
fritterhoff pushed a commit to hm-edu/cal.com that referenced this pull request Jul 25, 2023
…s/credits (calcom#10044)

Co-authored-by: gitstart-calcom <gitstart@users.noreply.github.com>
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 Low priority Created by Linear-GitHub Sync

Projects

No open projects
Status: No status

Development

Successfully merging this pull request may close these issues.

6 participants