-
Notifications
You must be signed in to change notification settings - Fork 137
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
fix: update toHaveNoAxeViolations and remove skips #5955
fix: update toHaveNoAxeViolations and remove skips #5955
Conversation
✅ Deploy Preview for carbon-for-ibm-products ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
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.
LGTM
@elycheea , @lee-chase
Looks like we have not added await
in most of our accessibility test cases across components (eg: AboutModal.test, AddSelect.test ...)
Do we need to create an new issue to add await
?
it('has no accessibility violations', async () => {
const { container } = render(<AddSelect {...defaultProps} />);
expect(container).toBeAccessible(componentName);
expect(container).toHaveNoAxeViolations();
});
@amal-k-joy it only seems to be needed if you want to run multiple accessibility tests from within the same module. |
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.
Thank you for cleaning up those .skip()
s! 🙏
694128b
Updates toHaveNoAxeViolations and fixes a small number of use cases.
What did you change?
The function was creating a new Promise which is not necessary, refactored.
Not entirely sure the async/await is doing much in the tests that were refactored, but with async tests the accessible checks need to be waited for when there are multiple uses of the accessible matchers.
How did you test and verify your work?
Ran the tests.