-
Notifications
You must be signed in to change notification settings - Fork 8.8k
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: Create unit tests for react components in packages/ui/components/alert (tests-alert-component) #9897
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Thank you for following the naming conventions! 🙏 |
No top level dependency changes detected. Learn more about Socket for GitHub ↗︎ |
📦 Next.js Bundle Analysis for @calcom/webThis analysis was generated by the Next.js Bundle Analysis action. 🤖 This PR introduced no changes to the JavaScript bundle! 🙌 |
Current Playwright Test Results Summary✅ 71 Passing - Run may still be in progress, this comment will be updated as current testing workflow or job completes... (Last updated on 07/19/2023 12:00:11pm UTC) Run DetailsRunning Workflow PR Update on Github Actions Commit: b3c89f4 Started: 07/19/2023 11:56:34am UTC
|
Test Case | Last 7 days Failures | Last 7 days Flakes |
---|---|---|
pro user Can cancel the recently created booking and rebook the same timeslot
Retry 1 • Initial Attempt |
0% (0)0 / 307 runsfailed over last 7 days |
2.61% (8)8 / 307 runsflaked over last 7 days |
📄 apps/web/playwright/reschedule.e2e.ts • 1 Flake
Test Case Results
Test Case | Last 7 days Failures | Last 7 days Flakes |
---|---|---|
Reschedule Tests Should display former time when rescheduling availability
Retry 1 • Initial Attempt |
0.32% (1)1 / 309 runfailed over last 7 days |
2.91% (9)9 / 309 runsflaked 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 Pending payment booking should not be confirmed by default
Retry 1 • Initial Attempt |
1.28% (4)4 / 313 runsfailed over last 7 days |
9.90% (31)31 / 313 runsflaked over last 7 days |
@@ -77,6 +77,7 @@ | |||
"@deploysentinel/playwright": "^0.3.3", | |||
"@playwright/test": "^1.31.2", | |||
"@snaplet/copycat": "^0.3.0", | |||
"@testing-library/jest-dom": "^5.16.5", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why are we adding a new testing library? We already have playwright
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @PeerRich! We are using vitest to make the tests (a lib already installed on the project), we are just using the RTL to render the components. We can try to use only playwright for it but this lib is used to test pages instead only specifc components, but this can be more complicated
🤖 Meticulous spotted visual differences in 33 of 169 screens tested: view and approve differences detected. Last updated for commit b3c89f4. This comment will update as new commits are pushed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall, I like these since they test the inner logic around severity controlling what is rendered.
In regards to asserting specific classes though, I'm in favor of not adding tests like those due to the brittle nature it brings to the test.
Hi @keithwillcode we made the requested changes now, thanks for the feedback! 😄 |
…s/alert (tests-alert-component) (calcom#9897) Co-authored-by: gitstart-calcom <[email protected]>
Here is the GitStart Ticket for this pull request: feat:tests-alert-component
What does this PR do?
This PR is part of a larger task, with the objective of creating unit tests for components present in the
packages/ui/components/
folder. In addition, in this PR we are setting up thevitest
for this folder, to be used in the next PRsDemo