-
Notifications
You must be signed in to change notification settings - Fork 138
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
Feat: Add Playwright tests for components #3382
base: main
Are you sure you want to change the base?
Conversation
@carwack is attempting to deploy a commit to the Chakra UI Team on Vercel. A member of the Team first needs to authorize it. |
commit: |
Thanks for working on this! Looking at the PR, my main concern is that we'd be using both Histoire and Storybook for the Vue project, which feels like overkill. In my mind, we should first migrate from Histoire to Storybook. What do you think? |
@cschroeter |
I don’t have a strong opinion on structuring this workflow. However, replacing Histoire with Storybook would be a huge improvement—it would streamline our setup significantly. After that, we’d likely want a separate PR to set up Playwright, then gradually add more Playwright tests over time. |
This PR sets up Playwright for end-to-end (E2E) and visual testing, ensuring improved test coverage for the components. Thanks to GitHub Actions, tests are automatically triggered on commit push. The tests focus on simulating real user interactions and include Axe Core accessibility checks to guarantee a11y compliance.
The current setup supports both React and Vue components through Storybook integration. Svelte and Solid are not yet supported due to incomplete Storybook setups.
The tests are organized under a dedicated
tests
folder, following the monorepo structure by mirroring the existing package layout (e.g.,packages/components
). Each component has a single test file that covers all supported frameworks.To run the tests, use:
or
This PR specifically adds tests for the Avatar component in Vue and React. Let me know if you need any adjustments!