1- import type { AxeResults , RunOptions } from 'axe-core'
2- import type { VueWrapper } from '@vue/test-utils'
31import type { ColumnConfig , FilterChip } from '#shared/types/preferences'
2+ import { mountSuspended } from '@nuxt/test-utils/runtime'
3+ import type { VueWrapper } from '@vue/test-utils'
44import 'axe-core'
5+ import type { AxeResults , RunOptions } from 'axe-core'
56import { afterEach , describe , expect , it } from 'vitest'
6- import { mountSuspended } from '@nuxt/test-utils/runtime'
77
88// axe-core is a UMD module that exposes itself as window.axe in the browser
99declare const axe : {
@@ -58,7 +58,6 @@ import {
5858 AppFooter ,
5959 AppHeader ,
6060 BaseCard ,
61- UserAvatar ,
6261 BuildEnvironment ,
6362 CallToAction ,
6463 CodeDirectoryListing ,
@@ -67,30 +66,33 @@ import {
6766 CodeViewer ,
6867 CollapsibleSection ,
6968 ColumnPicker ,
69+ CompareComparisonGrid ,
7070 CompareFacetCard ,
7171 CompareFacetRow ,
7272 CompareFacetSelector ,
73- CompareComparisonGrid ,
7473 ComparePackageSelector ,
7574 DateTime ,
7675 DependencyPathPopup ,
7776 FilterChips ,
7877 FilterPanel ,
7978 HeaderAccountMenu ,
79+ HeaderConnectorModal ,
80+ HeaderSearchBox ,
8081 LicenseDisplay ,
8182 LoadingSpinner ,
82- PackageChartModal ,
83- PackageClaimPackageModal ,
84- HeaderConnectorModal ,
8583 OrgMembersPanel ,
8684 OrgOperationsQueue ,
8785 OrgTeamsPanel ,
8886 PackageAccessControls ,
8987 PackageCard ,
88+ PackageChartModal ,
89+ PackageClaimPackageModal ,
90+ PackageCompatibility ,
9091 PackageDependencies ,
9192 PackageDeprecatedTree ,
9293 PackageDownloadAnalytics ,
9394 PackageInstallScripts ,
95+ PackageKeywords ,
9496 PackageList ,
9597 PackageListControls ,
9698 PackageListToolbar ,
@@ -108,6 +110,7 @@ import {
108110 PaginationControls ,
109111 ProvenanceBadge ,
110112 Readme ,
113+ SearchSuggestionCard ,
111114 SettingsAccentColorPicker ,
112115 SettingsBgThemePicker ,
113116 SettingsToggle ,
@@ -118,8 +121,7 @@ import {
118121 TooltipAnnounce ,
119122 TooltipApp ,
120123 TooltipBase ,
121- HeaderSearchBox ,
122- SearchSuggestionCard ,
124+ UserAvatar ,
123125 VersionSelector ,
124126 ViewModeToggle ,
125127} from '#components'
@@ -650,6 +652,49 @@ describe('component accessibility audits', () => {
650652 } )
651653 } )
652654
655+ describe ( 'PackageCompatibility' , ( ) => {
656+ it ( 'should have no accessibility violations without engines' , async ( ) => {
657+ const component = await mountSuspended ( PackageCompatibility , {
658+ props : { } ,
659+ } )
660+ const results = await runAxe ( component )
661+ expect ( results . violations ) . toEqual ( [ ] )
662+ } )
663+
664+ it ( 'should have no accessibility violations with engines' , async ( ) => {
665+ const component = await mountSuspended ( PackageCompatibility , {
666+ props : {
667+ engines : {
668+ node : '>=14' ,
669+ npm : '>=10' ,
670+ } ,
671+ } ,
672+ } )
673+ const results = await runAxe ( component )
674+ expect ( results . violations ) . toEqual ( [ ] )
675+ } )
676+ } )
677+
678+ describe ( 'PackageKeywords' , ( ) => {
679+ it ( 'should have no accessibility violations without keywords' , async ( ) => {
680+ const component = await mountSuspended ( PackageKeywords , {
681+ props : { } ,
682+ } )
683+ const results = await runAxe ( component )
684+ expect ( results . violations ) . toEqual ( [ ] )
685+ } )
686+
687+ it ( 'should have no accessibility violations with keywords' , async ( ) => {
688+ const component = await mountSuspended ( PackageKeywords , {
689+ props : {
690+ keywords : [ 'keyword1' , 'keyword2' ] ,
691+ } ,
692+ } )
693+ const results = await runAxe ( component )
694+ expect ( results . violations ) . toEqual ( [ ] )
695+ } )
696+ } )
697+
653698 describe ( 'CodeViewer' , ( ) => {
654699 it ( 'should have no accessibility violations' , async ( ) => {
655700 const component = await mountSuspended ( CodeViewer , {
0 commit comments