Skip to content

Commit ab29c11

Browse files
authored
Merge pull request #601 from mansona/gjs-tests
2 parents 043b236 + 5ceaac2 commit ab29c11

File tree

4 files changed

+32
-18
lines changed

4 files changed

+32
-18
lines changed

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
"axe-core": "^4.10.3",
6969
"broccoli-persistent-filter": "^3.1.2",
7070
"ember-auto-import": "^2.2.4",
71-
"ember-cli-babel": "^7.26.11",
71+
"ember-cli-babel": "^8.2.0",
7272
"ember-cli-htmlbars": "^6.3.0",
7373
"ember-cli-typescript": "^4.2.1",
7474
"ember-cli-version-checker": "^5.1.2",
@@ -106,6 +106,7 @@
106106
"ember-sinon": "^5.0.0",
107107
"ember-source": "^4.0.1",
108108
"ember-source-channel-url": "^3.0.0",
109+
"ember-template-imports": "^4.3.0",
109110
"ember-template-lint": "^5.0.2",
110111
"ember-truth-helpers": "^3.0.0",
111112
"ember-try": "^3.0.0",

pnpm-lock.yaml

Lines changed: 22 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/integration/components/setup-global-a11y-hooks-for-render-test.ts renamed to tests/integration/components/setup-global-a11y-hooks-for-render-test.gts

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,6 @@
11
import { click, render } from '@ember/test-helpers';
2-
import {
3-
DEFAULT_A11Y_TEST_HELPER_NAMES,
4-
setEnableA11yAudit,
5-
setupGlobalA11yHooks,
6-
teardownGlobalA11yHooks,
7-
} from 'ember-a11y-testing/test-support';
2+
import { DEFAULT_A11Y_TEST_HELPER_NAMES, setEnableA11yAudit, setupGlobalA11yHooks, teardownGlobalA11yHooks } from 'ember-a11y-testing/test-support';
83
import { module, test } from 'qunit';
9-
10-
import { hbs } from 'ember-cli-htmlbars';
114
import { setupRenderingTest } from 'ember-qunit';
125

136
module(
@@ -42,9 +35,9 @@ module(
4235
});
4336

4437
test('it audits on render', async function (assert) {
45-
await render(hbs`
38+
await render(<template>
4639
<button type="button">Hello!</button>
47-
`);
40+
</template>);
4841
await click('button');
4942

5043
assert.strictEqual(

tests/integration/helpers/a11y-audit-test.ts renamed to tests/integration/helpers/a11y-audit-test.gts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import { module, test } from 'qunit';
22
import { setupRenderingTest } from 'ember-qunit';
33
import { render } from '@ember/test-helpers';
44
import type { TestContext } from '@ember/test-helpers';
5-
import { hbs } from 'ember-cli-htmlbars';
65
import { a11yAudit, setEnableA11yAudit } from 'ember-a11y-testing/test-support';
6+
import AxeComponent from "dummy/components/axe-component";
77

88
interface Context extends TestContext {
99
element: Element;
@@ -21,14 +21,14 @@ module('Integration | Helper | a11yAudit', function (hooks) {
2121
});
2222

2323
test('a11yAudit runs successfully with element context', async function (this: Context, assert) {
24-
await render(hbs`<AxeComponent/>`);
24+
await render(<template><AxeComponent /></template>);
2525
await a11yAudit(this.element);
2626
assert.ok(true, "a11yAudit ran and didn't find any issues");
2727
});
2828

2929
test('a11yAudit catches violations successfully', async function (this: Context, assert) {
3030
await render(
31-
hbs`<AxeComponent><button type="button"></button></AxeComponent>`,
31+
<template><AxeComponent><button type="button"></button></AxeComponent></template>,
3232
);
3333

3434
await assert.rejects(
@@ -40,7 +40,7 @@ module('Integration | Helper | a11yAudit', function (hooks) {
4040

4141
test('a11yAudit can use custom axe options', async function (this: Context, assert) {
4242
await render(
43-
hbs`<AxeComponent><button type="button"></button></AxeComponent>`,
43+
<template><AxeComponent><button type="button"></button></AxeComponent></template>,
4444
);
4545

4646
await a11yAudit(this.element, {
@@ -56,7 +56,7 @@ module('Integration | Helper | a11yAudit', function (hooks) {
5656

5757
test('a11yAudit can use custom axe options as single argument', async function (assert) {
5858
await render(
59-
hbs`<AxeComponent><button type="button"></button></AxeComponent>`,
59+
<template><AxeComponent><button type="button"></button></AxeComponent></template>,
6060
);
6161

6262
await a11yAudit({

0 commit comments

Comments
 (0)