Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Maintenance: Add a11y frontend integration test for the new out of of…
…fice personal settings.
- Loading branch information
1 parent
a8280a9
commit f09d27e
Showing
1 changed file
with
30 additions
and
0 deletions.
There are no files selected for viewing
30 changes: 30 additions & 0 deletions
30
...apps/desktop/pages/personal-setting/__tests__/personal-setting-out-of-office-a11y.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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() | ||
}) | ||
}) |