Skip to content

Commit d49335c

Browse files
committed
test(uui-button): add looks and colors to test uui-button
1 parent 48e4627 commit d49335c

File tree

1 file changed

+27
-6
lines changed

1 file changed

+27
-6
lines changed

packages/uui-button/lib/uui-button.test.ts

Lines changed: 27 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,18 @@
1+
import '.';
2+
13
import {
2-
html,
3-
fixture,
4+
elementUpdated,
45
expect,
6+
fixture,
7+
html,
58
oneEvent,
6-
elementUpdated,
79
} from '@open-wc/testing';
10+
import {
11+
InterfaceColorValues,
12+
InterfaceLookValues,
13+
} from '@umbraco-ui/uui-base/lib/types';
14+
815
import { UUIButtonElement } from './uui-button.element';
9-
import '.';
1016

1117
describe('UuiButton', () => {
1218
let formElement: HTMLFormElement;
@@ -35,8 +41,23 @@ describe('UuiButton', () => {
3541
});
3642

3743
it('passes the a11y audit', async () => {
38-
await expect(element).shadowDom.to.be.accessible();
39-
});
44+
for (const color of InterfaceColorValues) {
45+
for (const look of InterfaceLookValues) {
46+
for (const disabled of [true, false]) {
47+
element = await fixture(
48+
html` <uui-button
49+
label="Continue"
50+
.disabled=${disabled}
51+
.look=${look}
52+
.color=${color}>
53+
Continue
54+
</uui-button>`
55+
);
56+
await expect(element).to.be.accessible();
57+
}
58+
}
59+
}
60+
}).timeout(30000);
4061

4162
describe('properties', () => {
4263
it('has a label property', () => {

0 commit comments

Comments
 (0)