|
| 1 | +import type { ComparisonFacet } from '#shared/types/comparison' |
| 2 | +import { CATEGORY_ORDER, FACET_INFO, FACETS_BY_CATEGORY } from '#shared/types/comparison' |
| 3 | +import FacetSelector from '~/components/compare/FacetSelector.vue' |
1 | 4 | import { beforeEach, describe, expect, it, vi } from 'vitest' |
2 | 5 | import { ref } from 'vue' |
3 | 6 | import { mountSuspended } from '@nuxt/test-utils/runtime' |
4 | | -import FacetSelector from '~/components/compare/FacetSelector.vue' |
5 | | -import type { ComparisonFacet } from '../../../../shared/types/comparison' |
6 | | -import { CATEGORY_ORDER, FACET_INFO, FACETS_BY_CATEGORY } from '../../../../shared/types/comparison' |
7 | 7 |
|
8 | 8 | // Mock useFacetSelection |
9 | 9 | const mockSelectedFacets = ref<string[]>(['downloads', 'types']) |
@@ -219,39 +219,6 @@ describe('FacetSelector', () => { |
219 | 219 | }) |
220 | 220 | }) |
221 | 221 |
|
222 | | - describe('accessibility', () => { |
223 | | - it('has role=group on main container', async () => { |
224 | | - const component = await mountSuspended(FacetSelector) |
225 | | - |
226 | | - expect(component.find('[role="group"]').exists()).toBe(true) |
227 | | - }) |
228 | | - |
229 | | - it('has aria-label on facet group', async () => { |
230 | | - const component = await mountSuspended(FacetSelector) |
231 | | - |
232 | | - const groups = component.findAll('[role="group"]') |
233 | | - expect(groups.length).toBeGreaterThan(0) |
234 | | - }) |
235 | | - |
236 | | - it('facet buttons have aria-label', async () => { |
237 | | - const component = await mountSuspended(FacetSelector) |
238 | | - |
239 | | - const facetButtons = component.findAll('button[aria-pressed]') |
240 | | - for (const button of facetButtons) { |
241 | | - expect(button.attributes('aria-label')).toBeTruthy() |
242 | | - } |
243 | | - }) |
244 | | - |
245 | | - it('category buttons have aria-label', async () => { |
246 | | - const component = await mountSuspended(FacetSelector) |
247 | | - |
248 | | - const allButtons = component.findAll('button').filter(b => b.text() === 'all') |
249 | | - for (const button of allButtons) { |
250 | | - expect(button.attributes('aria-label')).toBeTruthy() |
251 | | - } |
252 | | - }) |
253 | | - }) |
254 | | - |
255 | 222 | describe('styling', () => { |
256 | 223 | it('applies selected styling to selected facets', async () => { |
257 | 224 | mockSelectedFacets.value = ['downloads'] |
|
0 commit comments