File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,13 @@ describe('Checkbox.vue', () => {
2828 } )
2929 expect ( wrapper . find ( '.vue-checkbox__label span' ) . text ( ) ) . toBe ( 'label' )
3030 } )
31+ it ( 'attributes is rendered' , ( ) => {
32+ const wrapper = shallowMount ( Checkbox )
33+ wrapper . setProps ( { name : 'text' , disabled : true } )
34+ const attrs = wrapper . find ( 'input' ) . attributes ( )
35+ expect ( attrs . name ) . toContain ( 'text' )
36+ expect ( attrs . disabled ) . toContain ( 'disabled' )
37+ } )
3138 it ( 'is checked' , ( ) => {
3239 const wrapper = mount ( {
3340 template : `<vue-checkbox v-model="check"></vue-checkbox>` ,
Original file line number Diff line number Diff line change @@ -37,6 +37,13 @@ describe('Radio.vue', () => {
3737 } )
3838 expect ( wrapper . find ( '.vue-radio--disabled' ) . exists ( ) ) . toBe ( true )
3939 } )
40+ it ( 'attributes is rendered' , ( ) => {
41+ const wrapper = shallowMount ( Radio )
42+ wrapper . setProps ( { name : 'text' , disabled : true } )
43+ const attrs = wrapper . find ( 'input' ) . attributes ( )
44+ expect ( attrs . name ) . toContain ( 'text' )
45+ expect ( attrs . disabled ) . toContain ( 'disabled' )
46+ } )
4047 it ( 'is checked' , ( ) => {
4148 const wrapper = mount ( {
4249 template : '<vue-radio v-model="radio" value="1"></vue-radio>' ,
You can’t perform that action at this time.
0 commit comments