home-a11y.spec.ts 895 B

1234567891011121314151617181920212223242526
  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 { mockUserCurrent } from '#tests/support/mock-userCurrent.ts'
  5. import { mockTicketOverviews } from '#tests/support/mocks/ticket-overviews.ts'
  6. describe('testing home a11y', () => {
  7. beforeEach(() => {
  8. mockUserCurrent({ 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/ticket-overviews/edit')
  18. const results = await axe(view.html())
  19. expect(results).toHaveNoViolations()
  20. })
  21. })