feat(Dialog): add width prop (#4687)

This commit is contained in:
neverland
2019-10-11 10:13:33 +08:00
committed by GitHub
parent 894e9aafcb
commit cc162ecd7b
6 changed files with 20 additions and 1 deletions

View File

@@ -134,3 +134,14 @@ test('open & close event', () => {
wrapper.vm.value = false;
expect(wrapper.emitted('close')).toBeTruthy();
});
test('width prop', () => {
const wrapper = mount(DialogComponent, {
propsData: {
value: true,
width: 200
}
});
expect(wrapper.element.style.width).toEqual('200px');
});