diff --git a/ui/tests/acceptance/job-definition-test.js b/ui/tests/acceptance/job-definition-test.js index 59b60981ec1..e0259ea59ee 100644 --- a/ui/tests/acceptance/job-definition-test.js +++ b/ui/tests/acceptance/job-definition-test.js @@ -21,7 +21,7 @@ module('Acceptance | job definition', function(hooks) { }); test('it passes an accessibility audit', async function(assert) { - await a11yAudit(); + await a11yAudit('scrollable-region-focusable'); assert.ok(true, 'a11y audit passes'); }); diff --git a/ui/tests/helpers/a11y-audit.js b/ui/tests/helpers/a11y-audit.js index 5792db98f33..c6f5394618a 100644 --- a/ui/tests/helpers/a11y-audit.js +++ b/ui/tests/helpers/a11y-audit.js @@ -1,17 +1,16 @@ import a11yAudit from 'ember-a11y-testing/test-support/audit'; -export default async function defaultA11yAudit() { - await a11yAudit({ - rules: { - 'color-contrast': { - enabled: false - }, - 'heading-order': { - enabled: false - }, - 'scrollable-region-focusable': { - enabled: false - }, +export default async function defaultA11yAudit(...overriddenRules) { + const rules = { + 'color-contrast': { + enabled: false + }, + 'heading-order': { + enabled: false } - }); + }; + + overriddenRules.forEach(rule => rules[rule] = { enabled: false }); + + await a11yAudit({rules}); }