fix bugs and add new features (#25)

* fix bugs and add new features

* add unit test

* fix tab/tag/datetime-picker bugs
This commit is contained in:
TimeTraveler
2017-05-03 10:11:31 +08:00
committed by 张敏
parent 58bd17f142
commit 239d2e1e53
31 changed files with 134 additions and 27 deletions

View File

@@ -68,4 +68,10 @@ describe('Tabs', () => {
done();
});
});
it('check animation duration', () => {
wrapper = mount(TabsTestComponent);
expect(wrapper.style.transitionDuration != '').to.be.true;
});
});

View File

@@ -0,0 +1,29 @@
import Tag from 'packages/tag';
import { mount } from 'avoriaz';
describe('Tag', () => {
let wrapper;
afterEach(() => {
wrapper && wrapper.destroy();
});
it('create without typeProps', () => {
wrapper = mount(Tag);
});
it('create with right typeProps', () => {
wrapper = mount(Tag, {
propsData: {
type: 'primary'
}
})
});
it('create with wrong typeProps', () => {
wrapper = mount(Tag, {
propsData: {
type: 'wrong'
}
})
});
});