personal-setting-calendar-a11y.spec.ts 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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 { mockPermissions } from '#tests/support/mock-permissions.ts'
  5. import { mockUserCurrentCalendarSubscriptionList } from '../graphql/queries/userCurrentCalendarSubscriptionList.mocks.ts'
  6. describe('testing password a11y view', async () => {
  7. beforeEach(() => {
  8. mockPermissions(['user_preferences.notifications'])
  9. mockUserCurrentCalendarSubscriptionList({
  10. userCurrentCalendarSubscriptionList: {
  11. combinedUrl: 'https://zammad.example.com/ical/tickets',
  12. globalOptions: {
  13. alarm: false,
  14. },
  15. escalation: {
  16. url: 'https://zammad.example.com/ical/tickets/escalation',
  17. options: {
  18. own: true,
  19. notAssigned: false,
  20. },
  21. },
  22. newOpen: {
  23. url: 'https://zammad.example.com/ical/tickets/new_open',
  24. options: {
  25. own: false,
  26. notAssigned: true,
  27. },
  28. },
  29. pending: {
  30. url: 'https://zammad.example.com/ical/tickets/pending',
  31. options: {
  32. own: false,
  33. notAssigned: false,
  34. },
  35. },
  36. },
  37. })
  38. })
  39. it('has no accessibility violations', async () => {
  40. const view = await visitView('/personal-setting/calendar-subscriptions')
  41. const results = await axe(view.html())
  42. expect(results).toHaveNoViolations()
  43. })
  44. })