Skip to content

Commit

Permalink
Adds acceptance tests for component a11y audits (#1669)
Browse files Browse the repository at this point in the history
  • Loading branch information
MelSumner committed Oct 9, 2023
1 parent 0e0e29b commit 7601d9f
Show file tree
Hide file tree
Showing 86 changed files with 665 additions and 78 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { module, test } from 'qunit';
import { visit } from '@ember/test-helpers';
import { setupApplicationTest } from 'dummy/tests/helpers';
import { a11yAudit } from 'ember-a11y-testing/test-support';

module('Acceptance | Component | hds/accordion', function (hooks) {
setupApplicationTest(hooks);

test('Components/hds/accordion page passes automated a11y checks', async function (assert) {
await visit('/components/accordion');

await a11yAudit();

assert.ok(true, 'a11y automation audit passed');
});
});
16 changes: 16 additions & 0 deletions packages/components/tests/acceptance/components/hds/alert-test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { module, test } from 'qunit';
import { visit } from '@ember/test-helpers';
import { setupApplicationTest } from 'dummy/tests/helpers';
import { a11yAudit } from 'ember-a11y-testing/test-support';

module('Acceptance | Component | hds/alert', function (hooks) {
setupApplicationTest(hooks);

test('Components/alert page passes automated a11y checks', async function (assert) {
await visit('/components/alert');

await a11yAudit();

assert.ok(true, 'a11y automation audit passed');
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { module, test } from 'qunit';
import { visit } from '@ember/test-helpers';
import { setupApplicationTest } from 'dummy/tests/helpers';
import { a11yAudit } from 'ember-a11y-testing/test-support';

module('Acceptance | Component | hds/application-state', function (hooks) {
setupApplicationTest(hooks);

test('Components/application-state page passes automated a11y checks', async function (assert) {
await visit('/components/application-state');

await a11yAudit();

assert.ok(true, 'a11y automation audit passed');
});
});
15 changes: 15 additions & 0 deletions packages/components/tests/acceptance/components/hds/avatar-test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { module, test } from 'qunit';
import { visit } from '@ember/test-helpers';
import { setupApplicationTest } from 'dummy/tests/helpers';
import { a11yAudit } from 'ember-a11y-testing/test-support';

module('Acceptance | Component | hds/avatar', function (hooks) {
setupApplicationTest(hooks);

test('Components/avatar passes a11y automated checks', async function (assert) {
await visit('/components/avatar');
await a11yAudit();

assert.ok(true, 'a11y automation audit passed');
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { module, test } from 'qunit';
import { visit } from '@ember/test-helpers';
import { setupApplicationTest } from 'dummy/tests/helpers';
import { a11yAudit } from 'ember-a11y-testing/test-support';

module('Acceptance | Component | hds/badge-count', function (hooks) {
setupApplicationTest(hooks);

test('Components/badge-count passes a11y automated checks', async function (assert) {
await visit('/components/badge-count');
await a11yAudit();

assert.ok(true, 'a11y automation audit passed');
});
});
15 changes: 15 additions & 0 deletions packages/components/tests/acceptance/components/hds/badge-test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { module, test } from 'qunit';
import { visit } from '@ember/test-helpers';
import { setupApplicationTest } from 'dummy/tests/helpers';
import { a11yAudit } from 'ember-a11y-testing/test-support';

module('Acceptance | Component | hds/badge', function (hooks) {
setupApplicationTest(hooks);

test('Components/badge passes a11y automated checks', async function (assert) {
await visit('/components/badge');
await a11yAudit();

assert.ok(true, 'a11y automation audit passed');
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { module, test } from 'qunit';
import { visit } from '@ember/test-helpers';
import { setupApplicationTest } from 'dummy/tests/helpers';
import { a11yAudit } from 'ember-a11y-testing/test-support';

module('Acceptance | Component | hds/breadcrumb', function (hooks) {
setupApplicationTest(hooks);

test('Components/breadcrumb passes a11y automated checks', async function (assert) {
await visit('/components/breadcrumb');
await a11yAudit();

assert.ok(true, 'a11y automation audit passed');
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { module, test } from 'qunit';
import { visit } from '@ember/test-helpers';
import { setupApplicationTest } from 'dummy/tests/helpers';
import { a11yAudit } from 'ember-a11y-testing/test-support';

module('Acceptance | Component | hds/button-set', function (hooks) {
setupApplicationTest(hooks);

test('Components/button-set passes a11y automated checks', async function (assert) {
await visit('/components/button-set');
await a11yAudit();

assert.ok(true, 'a11y automation audit passed');
});
});
15 changes: 15 additions & 0 deletions packages/components/tests/acceptance/components/hds/card-test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { module, test } from 'qunit';
import { visit } from '@ember/test-helpers';
import { setupApplicationTest } from 'dummy/tests/helpers';
import { a11yAudit } from 'ember-a11y-testing/test-support';

module('Acceptance | Component | hds/card', function (hooks) {
setupApplicationTest(hooks);

test('Components/card passes a11y automated checks', async function (assert) {
await visit('/components/card');
await a11yAudit();

assert.ok(true, 'a11y automation audit passed');
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { module, test } from 'qunit';
import { visit } from '@ember/test-helpers';
import { setupApplicationTest } from 'dummy/tests/helpers';
import { a11yAudit } from 'ember-a11y-testing/test-support';

module('Acceptance | Component | hds/disclosure-primitive', function (hooks) {
setupApplicationTest(hooks);

test('Components/disclosure-primitive passes a11y automated checks', async function (assert) {
await visit('/utilities/disclosure-primitive');
await a11yAudit();

assert.ok(true, 'a11y automation audit passed');
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { module, test } from 'qunit';
import { visit } from '@ember/test-helpers';
import { setupApplicationTest } from 'dummy/tests/helpers';
import { a11yAudit } from 'ember-a11y-testing/test-support';

module('Acceptance | Component | hds/dismiss-button', function (hooks) {
setupApplicationTest(hooks);

test('Components/dismiss-button passes a11y automated checks', async function (assert) {
await visit('/utilities/dismiss-button');
await a11yAudit();

assert.ok(true, 'a11y automation audit passed');
});
});
15 changes: 15 additions & 0 deletions packages/components/tests/acceptance/components/hds/flyout-test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { module, test } from 'qunit';
import { visit } from '@ember/test-helpers';
import { setupApplicationTest } from 'dummy/tests/helpers';
import { a11yAudit } from 'ember-a11y-testing/test-support';

module('Acceptance | Component | hds/flyout', function (hooks) {
setupApplicationTest(hooks);

test('Components/hds/flyout page passes automated a11y checks', async function (assert) {
await visit('/components/flyout');
await a11yAudit();

assert.ok(true, 'a11y automation audit passed');
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

import { module, test } from 'qunit';
import { visit } from '@ember/test-helpers';
import { setupApplicationTest } from 'dummy/tests/helpers';
import { a11yAudit } from 'ember-a11y-testing/test-support';

module('Acceptance | Component | hds/form/checkbox', function (hooks) {
setupApplicationTest(hooks);

test('components/form/checkbox page passes automated a11y checks', async function (assert) {
await visit('/components/form/checkbox');
await a11yAudit();
assert.ok(true, 'a11y automation audit passed');
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

import { module, test } from 'qunit';
import { visit } from '@ember/test-helpers';
import { setupApplicationTest } from 'dummy/tests/helpers';
import { a11yAudit } from 'ember-a11y-testing/test-support';

module('Acceptance | Component | hds/form/primitives', function (hooks) {
setupApplicationTest(hooks);

test('components/form/primitives page passes automated a11y checks', async function (assert) {
await visit('/components/form/base-elements');
await a11yAudit();
assert.ok(true, 'a11y automation audit passed');
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

import { module, test } from 'qunit';
import { visit } from '@ember/test-helpers';
import { setupApplicationTest } from 'dummy/tests/helpers';
import { a11yAudit } from 'ember-a11y-testing/test-support';

module('Acceptance | Component | hds/form/radio card', function (hooks) {
setupApplicationTest(hooks);

test('components/form/radio-card page passes automated a11y checks', async function (assert) {
await visit('/components/form/radio-card');
await a11yAudit();
assert.ok(true, 'a11y automation audit passed');
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

import { module, test } from 'qunit';
import { visit } from '@ember/test-helpers';
import { setupApplicationTest } from 'dummy/tests/helpers';
import { a11yAudit } from 'ember-a11y-testing/test-support';

module('Acceptance | Component | hds/form/radio', function (hooks) {
setupApplicationTest(hooks);

test('components/form/radio passes a11y automated checks', async function (assert) {
await visit('/components/form/radio');
await a11yAudit();
assert.ok(true, 'a11y automation audit passed');
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

import { module, test } from 'qunit';
import { visit } from '@ember/test-helpers';
import { setupApplicationTest } from 'dummy/tests/helpers';
import { a11yAudit } from 'ember-a11y-testing/test-support';

module('Acceptance | Component | hds/form/select', function (hooks) {
setupApplicationTest(hooks);

test('components/form/select passes a11y automated checks', async function (assert) {
await visit('/components/form/select');
await a11yAudit();
assert.ok(true, 'a11y automation audit passed');
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

import { module, test } from 'qunit';
import { visit } from '@ember/test-helpers';
import { setupApplicationTest } from 'dummy/tests/helpers';
import { a11yAudit } from 'ember-a11y-testing/test-support';

module('Acceptance | Component | hds/form/text input', function (hooks) {
setupApplicationTest(hooks);

test('components/form/text-input passes a11y automated checks', async function (assert) {
await visit('/components/form/text-input');
await a11yAudit();
assert.ok(true, 'a11y automation audit passed');
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

import { module, test } from 'qunit';
import { visit } from '@ember/test-helpers';
import { setupApplicationTest } from 'dummy/tests/helpers';
import { a11yAudit } from 'ember-a11y-testing/test-support';

module('Acceptance | Component | hds/form/textarea', function (hooks) {
setupApplicationTest(hooks);

test('components/form/textarea passes a11y automated checks', async function (assert) {
await visit('/components/form/textarea');
await a11yAudit();
assert.ok(true, 'a11y automation audit passed');
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

import { module, test } from 'qunit';
import { visit } from '@ember/test-helpers';
import { setupApplicationTest } from 'dummy/tests/helpers';
import { a11yAudit } from 'ember-a11y-testing/test-support';

module('Acceptance | Component | hds/form/toggle', function (hooks) {
setupApplicationTest(hooks);

test('components/form/toggle passes a11y automated checks', async function (assert) {
await visit('/components/form/toggle');
await a11yAudit();
assert.ok(true, 'a11y automation audit passed');
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { module, test } from 'qunit';
import { visit } from '@ember/test-helpers';
import { setupApplicationTest } from 'dummy/tests/helpers';
import { a11yAudit } from 'ember-a11y-testing/test-support';

module('Acceptance | Component | hds/icon-tile', function (hooks) {
setupApplicationTest(hooks);

test('Components/hds/icon-tile page passes automated a11y checks', async function (assert) {
await visit('/components/icon-tile');
await a11yAudit();

assert.ok(true, 'a11y automation audit passed');
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { module, test } from 'qunit';
import { visit } from '@ember/test-helpers';
import { setupApplicationTest } from 'dummy/tests/helpers';
import { a11yAudit } from 'ember-a11y-testing/test-support';

module('Acceptance | Component | hds/link/inline', function (hooks) {
setupApplicationTest(hooks);

test('Components/hds/link/inline page passes automated a11y checks', async function (assert) {
await visit('/components/link/inline');
await a11yAudit();

assert.ok(true, 'a11y automation audit passed');
});
});
Loading

2 comments on commit 7601d9f

@vercel
Copy link

@vercel vercel bot commented on 7601d9f Oct 9, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

hds-showcase – ./packages/components

hds-showcase-git-main-hashicorp.vercel.app
hds-showcase.vercel.app
hds-components-hashicorp.vercel.app
hds-showcase-hashicorp.vercel.app

@vercel
Copy link

@vercel vercel bot commented on 7601d9f Oct 9, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.