user-a11y.spec.ts 711 B

123456789101112131415161718192021
  1. // Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. import { axe } from 'vitest-axe'
  3. import { visitView } from '#tests/support/components/visitView.ts'
  4. import { waitUntilApisResolved } from '#tests/support/utils.ts'
  5. import { mockUserDetailsApis } from '#mobile/entities/user/__tests__/mocks/user-mocks.ts'
  6. describe('testing user a11y', () => {
  7. it('has no accessibility violations', async () => {
  8. const { mockUser, mockAttributes, user } = mockUserDetailsApis()
  9. const view = await visitView(`/users/${user.internalId}`)
  10. await waitUntilApisResolved(mockUser, mockAttributes)
  11. const results = await axe(view.html())
  12. expect(results).toHaveNoViolations()
  13. })
  14. })