home-a11y.spec.ts 882 B

12345678910111213141516171819202122232425
  1. // Copyright (C) 2012-2023 Zammad Foundation, https://zammad-foundation.org/
  2. import { axe } from 'vitest-axe'
  3. import { visitView } from '#tests/support/components/visitView.ts'
  4. import { mockAccount } from '#tests/support/mock-account.ts'
  5. import { mockTicketOverviews } from '#tests/support/mocks/ticket-overviews.ts'
  6. describe('testing home a11y', () => {
  7. beforeEach(() => {
  8. mockAccount({ id: '666' })
  9. mockTicketOverviews()
  10. })
  11. it('home screen has no accessibility violations', async () => {
  12. const view = await visitView('/')
  13. const results = await axe(view.html())
  14. expect(results).toHaveNoViolations()
  15. })
  16. it('favorite ticket overviews screen has no accessibility violations', async () => {
  17. const view = await visitView('/favorite/ticker-overviews/edit')
  18. const results = await axe(view.html())
  19. expect(results).toHaveNoViolations()
  20. })
  21. })