diff --git a/components/dialog/test/dialog-confirm.axe.js b/components/dialog/test/dialog-confirm.axe.js new file mode 100644 index 0000000000..aabcaaa1bf --- /dev/null +++ b/components/dialog/test/dialog-confirm.axe.js @@ -0,0 +1,37 @@ +import '../dialog-confirm.js'; +import '../../button/button.js'; +import { expect, fixture, html } from '@brightspace-ui/testing'; + +describe('d2l-dialog-confirm', () => { + + it('closed', async() => { + const el = await fixture(html``); + await expect(el).to.be.accessible(); + }); + + it('default with title-text', async() => { + const el = await fixture(html``); + await expect(el).to.be.accessible(); + }); + + it('critical', async() => { + const el = await fixture(html``); + await expect(el).to.be.accessible(); + }); + + it('footer buttons', async() => { + const el = await fixture(html` + + Done + Cancel + + `); + await expect(el).to.be.accessible(); + }); + + it('no title-text', async() => { + const el = await fixture(html``); + await expect(el).to.be.accessible(); + }); + +}); diff --git a/components/dialog/test/dialog-fullscreen.axe.js b/components/dialog/test/dialog-fullscreen.axe.js new file mode 100644 index 0000000000..1cd7867840 --- /dev/null +++ b/components/dialog/test/dialog-fullscreen.axe.js @@ -0,0 +1,44 @@ +import '../dialog-fullscreen.js'; +import '../../button/button.js'; +import { expect, fixture, html } from '@brightspace-ui/testing'; + +describe('d2l-dialog-fullscreen', () => { + + it('closed', async() => { + const el = await fixture(html``); + await expect(el).to.be.accessible(); + }); + + it('default with title-text', async() => { + const el = await fixture(html``); + await expect(el).to.be.accessible(); + }); + + it('footer buttons', async() => { + const el = await fixture(html` + +
Some dialog content
+ Done + Cancel +
+ `); + await expect(el).to.be.accessible(); + }); + + it.skip('no title-text', async() => { + const el = await fixture(html`My content`); + await expect(el).to.be.accessible(); + }); + + it.skip('tall content', async() => { + const el = await fixture(html` + +
+
My content
+
+
+ `); + await expect(el).to.be.accessible(); + }); + +}); diff --git a/components/dialog/test/dialog.axe.js b/components/dialog/test/dialog.axe.js new file mode 100644 index 0000000000..30e4918ca4 --- /dev/null +++ b/components/dialog/test/dialog.axe.js @@ -0,0 +1,49 @@ +import '../dialog.js'; +import '../../button/button.js'; +import { expect, fixture, html } from '@brightspace-ui/testing'; + +describe('d2l-dialog', () => { + + it('closed', async() => { + const el = await fixture(html``); + await expect(el).to.be.accessible(); + }); + + it('default with title-text', async() => { + const el = await fixture(html``); + await expect(el).to.be.accessible(); + }); + + it('describe-content', async() => { + const el = await fixture(html`My content`); + await expect(el).to.be.accessible(); + }); + + it('footer buttons', async() => { + const el = await fixture(html` + +
Some dialog content
+ Done + Cancel +
+ `); + await expect(el).to.be.accessible(); + }); + + it.skip('no title-text', async() => { + const el = await fixture(html`My content`); + await expect(el).to.be.accessible(); + }); + + it.skip('tall content', async() => { + const el = await fixture(html` + +
+
My content
+
+
+ `); + await expect(el).to.be.accessible(); + }); + +});