Skip to content

Commit 481fc12

Browse files
test: add a11y check
1 parent a96417e commit 481fc12

1 file changed

Lines changed: 28 additions & 0 deletions

File tree

test/nuxt/a11y.spec.ts

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,8 @@ import {
208208
DiffSkipBlock,
209209
DiffTable,
210210
DiffViewerPanel,
211+
PackageActionBar,
212+
PackageSelectionView,
211213
} from '#components'
212214

213215
// Server variant components must be imported directly to test the server-side render
@@ -3317,6 +3319,32 @@ describe('component accessibility audits', () => {
33173319
expect(results.violations).toEqual([])
33183320
})
33193321
})
3322+
3323+
describe('PackageActionBar', () => {
3324+
it('should have no accessibility violations', async () => {
3325+
const component = await mountSuspended(PackageActionBar)
3326+
const results = await runAxe(component)
3327+
expect(results.violations).toEqual([])
3328+
})
3329+
})
3330+
3331+
describe('PackageSelectionView', () => {
3332+
it('should have no accessibility violations', async () => {
3333+
const component = await mountSuspended(PackageSelectionView)
3334+
const results = await runAxe(component)
3335+
expect(results.violations).toEqual([])
3336+
})
3337+
3338+
it('should have no accessibility violations changing view mode', async () => {
3339+
const component = await mountSuspended(PackageSelectionView, {
3340+
props: {
3341+
viewMode: 'table',
3342+
},
3343+
})
3344+
const results = await runAxe(component)
3345+
expect(results.violations).toEqual([])
3346+
})
3347+
})
33203348
})
33213349

33223350
function applyTheme(colorMode: string, bgTheme: string | null) {

0 commit comments

Comments
 (0)