Skip to content

Commit 4a746d6

Browse files
fix: a11y test
1 parent b972f7b commit 4a746d6

1 file changed

Lines changed: 26 additions & 0 deletions

File tree

test/nuxt/a11y.spec.ts

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,7 @@ import {
210210
DiffViewerPanel,
211211
PackageActionBar,
212212
PackageSelectionView,
213+
PackageSelectionCheckbox,
213214
} from '#components'
214215

215216
// Server variant components must be imported directly to test the server-side render
@@ -3356,6 +3357,31 @@ describe('component accessibility audits', () => {
33563357
expect(results.violations).toEqual([])
33573358
})
33583359
})
3360+
3361+
describe('PackageSelectionCheckbox', () => {
3362+
it('should have no accessibility violations', async () => {
3363+
const component = await mountSuspended(PackageSelectionCheckbox, {
3364+
props: {
3365+
packageName: 'nuxt',
3366+
checked: false,
3367+
},
3368+
})
3369+
const results = await runAxe(component)
3370+
expect(results.violations).toEqual([])
3371+
})
3372+
3373+
it('should have no accessibility violations when disabled', async () => {
3374+
const component = await mountSuspended(PackageSelectionCheckbox, {
3375+
props: {
3376+
packageName: 'nuxt',
3377+
checked: false,
3378+
disabled: true,
3379+
},
3380+
})
3381+
const results = await runAxe(component)
3382+
expect(results.violations).toEqual([])
3383+
})
3384+
})
33593385
})
33603386

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

0 commit comments

Comments
 (0)