Skip to content

test: Create unit tests for react components in packages/ui/components/button#10045

Merged
keithwillcode merged 6 commits intomainfrom
CALCOM-615
Jul 27, 2023
Merged

test: Create unit tests for react components in packages/ui/components/button#10045
keithwillcode merged 6 commits intomainfrom
CALCOM-615

Conversation

@gitstart-calcom
Copy link
Copy Markdown
Contributor

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

DEMO

Run

yarn test button

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 Mar 19, 2024 3:06pm
cal-demo ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 19, 2024 3:06pm
cal-staging ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 19, 2024 3:06pm
ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 19, 2024 3:06pm
3 Ignored Deployments
Name Status Preview Comments Updated (UTC)
cal ⬜️ Ignored (Inspect) Visit Preview Mar 19, 2024 3:06pm
dev ⬜️ Ignored (Inspect) Visit Preview Mar 19, 2024 3:06pm
qa ⬜️ Ignored (Inspect) Mar 19, 2024 3:06pm

@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

✅ 74 Passing - ⚠️ 1 Flaky

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

(Last updated on 07/24/2023 09:23:08pm UTC)

Run Details

Running Workflow PR Update on Github Actions

Commit: df689ef

Started: 07/24/2023 09:21:23pm 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 1Initial Attempt
9.97% (31) 31 / 311 runs
failed over last 7 days
36.01% (112) 112 / 311 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:53
@PeerRich PeerRich added the Low priority Created by Linear-GitHub Sync label Jul 10, 2023
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

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?

@alwaysmeticulous
Copy link
Copy Markdown

alwaysmeticulous bot commented Jul 12, 2023

🤖 Meticulous spotted visual differences in 36 of 161 screens tested: view and approve differences detected.

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

@gitstart-calcom gitstart-calcom changed the title test: Create unit tests for react components in packages/ui/components/button (CALCOM-615) test: Create unit tests for react components in packages/ui/components/button Jul 20, 2023
@keithwillcode keithwillcode added the automated-tests area: unit tests, e2e tests, playwright label Jul 21, 2023
Copy link
Copy Markdown
Member

@sean-brydon sean-brydon left a comment

Choose a reason for hiding this comment

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

Great work! Happy with this!

@keithwillcode keithwillcode merged commit a1e6e8f into main Jul 27, 2023
@keithwillcode keithwillcode deleted the CALCOM-615 branch July 27, 2023 13:47
@keithwillcode keithwillcode added this to the v3.2 milestone Jul 27, 2023
sean-brydon pushed a commit that referenced this pull request Jul 31, 2023
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

automated-tests area: unit tests, e2e tests, playwright 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.

7 participants