Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ jobs:
repository: ${{ env.TESTING_REPOSITORY }}
token: ${{ secrets.GH_TOKEN }}
cache_key: ${{ steps.cache_key.outputs.cache_key }}
scans: '["axe", "reflow-scan"]'
scans: '["axe", "reflow-scan", "accesslint"]'
Comment thread
helen marked this conversation as resolved.
Resolved
Comment thread
helen marked this conversation as resolved.
Resolved
Comment thread
helen marked this conversation as resolved.
Resolved

- name: Retrieve cached results
uses: ./.github/actions/gh-cache/restore
Expand Down
12 changes: 8 additions & 4 deletions tests/site-with-errors.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,12 +128,14 @@ describe('site-with-errors', () => {
},
]
// Check that:
// - every expected object exists (no more and no fewer), and
// - every expected Axe and reflow-scan object exists (no more and no fewer), and
// - each object has all fields, and
// - field values match expectations exactly
// A specific order is _not_ enforced.
expect(actual).toHaveLength(expected.length)
expect(actual).toEqual(expect.arrayContaining(expected))
const actualWithoutAccesslint = actual.filter(({scannerType}) => scannerType !== 'accesslint')
expect(actualWithoutAccesslint).toHaveLength(expected.length)
expect(actualWithoutAccesslint).toEqual(expect.arrayContaining(expected))
expect(actual.some(({scannerType}) => scannerType === 'accesslint')).toBe(true)
})

it('GITHUB_TOKEN environment variable is set', () => {
Expand Down Expand Up @@ -164,7 +166,9 @@ describe('site-with-errors', () => {
})

it('issues exist and have expected title, state, and assignee', async () => {
const actualTitles = issues.map(({title}) => title)
const actualTitles = issues
.filter((_, index) => results[index].findings[0].scannerType !== 'accesslint')
.map(({title}) => title)
const expectedTitles = [
'Accessibility issue: Elements must meet minimum color contrast ratio thresholds on /',
'Accessibility issue: Page should contain a level-one heading on /',
Expand Down
Loading