@@ -81,6 +81,8 @@ import PackageAccessControls from '~/components/PackageAccessControls.vue'
8181import OrgMembersPanel from '~/components/OrgMembersPanel.vue'
8282import OrgTeamsPanel from '~/components/OrgTeamsPanel.vue'
8383import CodeMobileTreeDrawer from '~/components/CodeMobileTreeDrawer.vue'
84+ import PackageVulnerabilityTree from '~/components/PackageVulnerabilityTree.vue'
85+ import DependencyPathPopup from '~/components/DependencyPathPopup.vue'
8486
8587describe ( 'component accessibility audits' , ( ) => {
8688 describe ( 'DateTime' , ( ) => {
@@ -879,4 +881,39 @@ describe('component accessibility audits', () => {
879881 expect ( results . violations ) . toEqual ( [ ] )
880882 } )
881883 } )
884+
885+ describe ( 'PackageVulnerabilityTree' , ( ) => {
886+ it ( 'should have no accessibility violations in idle state' , async ( ) => {
887+ const component = await mountSuspended ( PackageVulnerabilityTree , {
888+ props : {
889+ packageName : 'vue' ,
890+ version : '3.5.0' ,
891+ } ,
892+ } )
893+ const results = await runAxe ( component )
894+ expect ( results . violations ) . toEqual ( [ ] )
895+ } )
896+ } )
897+
898+ describe ( 'DependencyPathPopup' , ( ) => {
899+ it ( 'should have no accessibility violations with short path' , async ( ) => {
900+ const component = await mountSuspended ( DependencyPathPopup , {
901+ props : {
902+ path : [ 'root@1.0.0' , 'vuln-dep@2.0.0' ] ,
903+ } ,
904+ } )
905+ const results = await runAxe ( component )
906+ expect ( results . violations ) . toEqual ( [ ] )
907+ } )
908+
909+ it ( 'should have no accessibility violations with deep path' , async ( ) => {
910+ const component = await mountSuspended ( DependencyPathPopup , {
911+ props : {
912+ path : [ 'root@1.0.0' , 'dep-a@1.0.0' , 'dep-b@2.0.0' , 'dep-c@3.0.0' , 'vulnerable-pkg@4.0.0' ] ,
913+ } ,
914+ } )
915+ const results = await runAxe ( component )
916+ expect ( results . violations ) . toEqual ( [ ] )
917+ } )
918+ } )
882919} )
0 commit comments