test(ActionSheet): update test cases

This commit is contained in:
chenjiahan
2020-11-13 14:14:27 +08:00
parent 0017c352b0
commit 00bc30c235
3 changed files with 79 additions and 61 deletions
-61
View File
@@ -98,64 +98,3 @@ test('close-on-click-action prop', () => {
expect(onInput).toHaveBeenCalledWith(false);
});
test('color option', () => {
const wrapper = mount(ActionSheet, {
propsData: {
value: true,
actions: [{ name: 'Option', color: 'red' }],
},
});
expect(wrapper.html()).toMatchSnapshot();
});
test('description prop', () => {
const wrapper = mount(ActionSheet, {
propsData: {
value: true,
description: 'This is a description',
actions: [{ name: 'Option' }],
},
});
expect(wrapper.html()).toMatchSnapshot();
});
test('description slot', () => {
const wrapper = mount(ActionSheet, {
propsData: {
value: true,
actions: [{ name: 'Option' }],
},
scopedSlots: {
description: () => 'Custom Description',
},
});
expect(wrapper.html()).toMatchSnapshot();
});
test('close-icon prop', () => {
const wrapper = mount(ActionSheet, {
propsData: {
value: true,
title: 'Title',
closeIcon: 'cross',
},
});
expect(wrapper.html()).toMatchSnapshot();
});
test('closeable prop', () => {
const wrapper = mount(ActionSheet, {
propsData: {
value: true,
title: 'Title',
closeable: false,
},
});
expect(wrapper.html()).toMatchSnapshot();
});