Skip to content

Commit

Permalink
Maintenance: Add a11y frontend integration test for the new out of of…
Browse files Browse the repository at this point in the history
…fice personal settings.
  • Loading branch information
dominikklein committed Apr 19, 2024
1 parent a8280a9 commit f09d27e
Showing 1 changed file with 30 additions and 0 deletions.
@@ -0,0 +1,30 @@
// Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/

import { axe } from 'vitest-axe'
import { visitView } from '#tests/support/components/visitView.ts'
import { mockAccount } from '#tests/support/mock-account.ts'
import { convertToGraphQLId } from '#shared/graphql/utils.ts'

describe('testing out of office a11y view', async () => {
beforeEach(() => {
mockAccount({
firstname: 'John',
lastname: 'Doe',
outOfOffice: true,
preferences: { out_of_office_text: 'OOF holiday' },
outOfOfficeStartAt: '2024-03-01',
outOfOfficeEndAt: '2024-04-01',
outOfOfficeReplacement: {
id: convertToGraphQLId('User', 256),
internalId: 256,
fullname: 'Example Agent',
},
})
})

it('has no accessibility violations', async () => {
const view = await visitView('/personal-setting/out-of-office')
const results = await axe(view.html())
expect(results).toHaveNoViolations()
})
})

0 comments on commit f09d27e

Please sign in to comment.