File tree Expand file tree Collapse file tree 1 file changed +27
-6
lines changed Expand file tree Collapse file tree 1 file changed +27
-6
lines changed Original file line number Diff line number Diff line change
1
+ import '.' ;
2
+
1
3
import {
2
- html ,
3
- fixture ,
4
+ elementUpdated ,
4
5
expect ,
6
+ fixture ,
7
+ html ,
5
8
oneEvent ,
6
- elementUpdated ,
7
9
} from '@open-wc/testing' ;
10
+ import {
11
+ InterfaceColorValues ,
12
+ InterfaceLookValues ,
13
+ } from '@umbraco-ui/uui-base/lib/types' ;
14
+
8
15
import { UUIButtonElement } from './uui-button.element' ;
9
- import '.' ;
10
16
11
17
describe ( 'UuiButton' , ( ) => {
12
18
let formElement : HTMLFormElement ;
@@ -35,8 +41,23 @@ describe('UuiButton', () => {
35
41
} ) ;
36
42
37
43
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 ) ;
40
61
41
62
describe ( 'properties' , ( ) => {
42
63
it ( 'has a label property' , ( ) => {
You can’t perform that action at this time.
0 commit comments