-
Notifications
You must be signed in to change notification settings - Fork 12
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(components): separate a11y tests (VIV-2312) #2124
base: main
Are you sure you want to change the base?
Conversation
This reverts commit 37666d8.
…e/vivid-3 into VIV-2301-upgrade-to-vitest
…e/vivid-3 into VIV-2301-upgrade-to-vitest
Prevents issues with popup
…e/vivid-3 into VIV-2301-upgrade-to-vitest
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2124 +/- ##
============================================
Coverage 100.00% 100.00%
============================================
Files 123 373 +250
Lines 1562 16101 +14539
Branches 108 2915 +2807
============================================
+ Hits 1562 16101 +14539
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
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.
There's one issue I found with the banner
in which the tests were removed and not moved, and it caused the coverage to drop (it caught a true positive :) ).
I believe all the places where there were non-axe tests should be checked and make sure they were not removed.
In addition, there's now an issue with listbox.length
. Because we don't have tests for our foundation
, we need to at least test this API through its extenders (our components), so we need to find who's extending foundation/listbox
and make sure there's a test for length
.
We are already supposed to take care of foundation during our tech debt tasks, so no need for a overhaul (the PR is already huge as is).
it('should change role to role text', async function () { | ||
element.role = 'alert'; | ||
await elementUpdated(element); | ||
const role = getBannerMessageAttribute(element, 'role'); | ||
expect(role).toEqual('alert'); | ||
expect(await axe(element)).toHaveNoViolations(); | ||
}); | ||
|
||
it('should change role when role attribute is set', async function () { | ||
element.setAttribute('role', 'alert'); | ||
await elementUpdated(element); | ||
const role = getBannerMessageAttribute(element, 'role'); | ||
expect(role).toEqual('alert'); | ||
expect(await axe(element)).toHaveNoViolations(); | ||
}); |
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.
Were these moved someplace? It seems like they were deleted, even though the functionality is still there (hence the coverage is reduced).
npm run test:a11y
ornpx nx run components:a11y