feat(Calendar): add show-title prop (#5779)

This commit is contained in:
chenjiahan
2020-03-09 20:37:37 +08:00
parent ab82f42f6a
commit e575bb4bb1
5 changed files with 27 additions and 2 deletions
+13
View File
@@ -24,3 +24,16 @@ test('max-range prop', async () => {
expect(wrapper.emitted('confirm')).toBeFalsy();
});
test('show-title prop', async () => {
const wrapper = mount(Calendar, {
propsData: {
value: true,
},
});
await later();
expect(wrapper.contains('.van-calendar__header-title')).toBeTruthy();
wrapper.setProps({ showTitle: false });
expect(wrapper.contains('.van-calendar__header-title')).toBeFalsy();
});