File tree Expand file tree Collapse file tree 2 files changed +22
-4
lines changed
src/components/Button/__tests__ Expand file tree Collapse file tree 2 files changed +22
-4
lines changed Original file line number Diff line number Diff line change 12
12
"config" : {},
13
13
"size-limit" : [
14
14
{
15
- <<<<<<< HEAD
16
15
"limit" : " 40 KB" ,
17
- =======
18
- "limit" : " 36 KB" ,
19
- >>>>>>> b4845c46416a6db3ed1ea5a46f75eb1146ec4cff
20
16
"webpack" : false ,
21
17
"path" : " dist/**/!(*.test).js"
22
18
}
Original file line number Diff line number Diff line change @@ -76,6 +76,28 @@ describe('Button', () => {
76
76
expect ( component . find ( 'Button' ) . last ( ) . prop ( 'color' ) ) . toEqual ( 'default' ) ;
77
77
} ) ;
78
78
79
+ it ( 'should pass the color as "default" when no color is given' , async ( ) => {
80
+ const component = mount (
81
+ < BlueBaseApp plugins = { [ Plugin ] } >
82
+ < Button />
83
+ </ BlueBaseApp >
84
+ ) ;
85
+ await waitForElement ( component , Button ) ;
86
+
87
+ expect ( component . find ( 'Button' ) . last ( ) . prop ( 'color' ) ) . toEqual ( 'primary' ) ;
88
+ } ) ;
89
+
90
+ it ( 'should pass the color as given' , async ( ) => {
91
+ const component = mount (
92
+ < BlueBaseApp plugins = { [ Plugin ] } >
93
+ < Button color = { '#000000' } />
94
+ </ BlueBaseApp >
95
+ ) ;
96
+ await waitForElement ( component , Button ) ;
97
+ expect ( component . find ( 'Button' ) . last ( ) . prop ( 'color' ) ) . toBeDefined ( ) ;
98
+ } ) ;
99
+
100
+
79
101
it ( 'should loading the button when loading is true ' , async ( ) => {
80
102
const component = mount (
81
103
< BlueBaseApp plugins = { [ Plugin ] } >
You can’t perform that action at this time.
0 commit comments