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(tests): add accordion unit tests and snapshots #18780

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

kennylam
Copy link
Member

@kennylam kennylam commented Mar 6, 2025

Closes #18779

Update tests to match React accordion.

Changelog

New

  • add Controlled story to Storybook
  • add additional unit tests
  • update Developer handbook docs with instructions on how to update snapshots

Testing / Reviewing

Run yarn test in packages/web-components to make sure tests pass. (From GH CI workflow)

@kennylam kennylam added the package: @carbon/web-components @carbon/web-components label Mar 6, 2025
@kennylam kennylam requested review from a team as code owners March 6, 2025 20:54
@kennylam kennylam force-pushed the chore/wc-accordion-tests branch from aa672d6 to 6e78399 Compare March 6, 2025 20:58
Copy link

netlify bot commented Mar 6, 2025

Deploy Preview for v11-carbon-web-components ready!

Name Link
🔨 Latest commit aa672d6
🔍 Latest deploy log https://app.netlify.com/sites/v11-carbon-web-components/deploys/67ca0b8f0e62f700088ae59a
😎 Deploy Preview https://deploy-preview-18780--v11-carbon-web-components.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Mar 6, 2025

Deploy Preview for carbon-elements ready!

Name Link
🔨 Latest commit aa672d6
🔍 Latest deploy log https://app.netlify.com/sites/carbon-elements/deploys/67ca0b8f023de30008eb8cf8
😎 Deploy Preview https://deploy-preview-18780--carbon-elements.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Mar 6, 2025

Deploy Preview for v11-carbon-react ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit aa672d6
🔍 Latest deploy log https://app.netlify.com/sites/v11-carbon-react/deploys/67ca0b8fefbdd7000801f622
😎 Deploy Preview https://deploy-preview-18780--v11-carbon-react.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Mar 6, 2025

Deploy Preview for v11-carbon-web-components ready!

Name Link
🔨 Latest commit 915203d
🔍 Latest deploy log https://app.netlify.com/sites/v11-carbon-web-components/deploys/67cce0a065c95f00084b2006
😎 Deploy Preview https://deploy-preview-18780--v11-carbon-web-components.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Mar 6, 2025

Deploy Preview for carbon-elements ready!

Name Link
🔨 Latest commit 915203d
🔍 Latest deploy log https://app.netlify.com/sites/carbon-elements/deploys/67cce0a00c472a0008c41328
😎 Deploy Preview https://deploy-preview-18780--carbon-elements.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Mar 6, 2025

Deploy Preview for v11-carbon-react ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 915203d
🔍 Latest deploy log https://app.netlify.com/sites/v11-carbon-react/deploys/67cce0a0e646c6000801d4c8
😎 Deploy Preview https://deploy-preview-18780--v11-carbon-react.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

codecov bot commented Mar 6, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.29%. Comparing base (95b053a) to head (915203d).
Report is 11 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #18780   +/-   ##
=======================================
  Coverage   84.28%   84.29%           
=======================================
  Files         409      409           
  Lines       14702    14707    +5     
  Branches     4846     4845    -1     
=======================================
+ Hits        12392    12397    +5     
- Misses       2146     2157   +11     
+ Partials      164      153   -11     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

@2nikhiltom 2nikhiltom left a comment

Choose a reason for hiding this comment

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

LGTM

@kennylam kennylam force-pushed the chore/wc-accordion-tests branch from 6e78399 to dc16db4 Compare March 9, 2025 00:23
@kennylam kennylam force-pushed the chore/wc-accordion-tests branch from dc16db4 to 915203d Compare March 9, 2025 00:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package: @carbon/web-components @carbon/web-components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[accordion]: update unit tests to match React
2 participants