手机端样式细节调整,补充测试用例 (#3)

* unit test

* picker and dialog unit tes

* fix:quantity and loading
This commit is contained in:
张敏
2017-04-21 21:25:40 +08:00
committed by GitHub
parent 54f0cf7195
commit c71cb3f2fd
16 changed files with 268 additions and 18 deletions

View File

@@ -1,5 +1,5 @@
import Button from 'packages/button';
import ZanLoading from 'packages/loading';
import VanLoading from 'packages/loading';
import { mount } from 'avoriaz';
describe('Button', () => {
@@ -122,7 +122,7 @@ describe('Button', () => {
loading: true
}
});
const loading = wrapper.find(ZanLoading)[0];
const loading = wrapper.find(VanLoading)[0];
expect(wrapper.hasClass('van-button')).to.be.true;
expect(loading.isVueComponent).to.be.true;
@@ -132,4 +132,19 @@ describe('Button', () => {
expect(eventStub.called).to.be.false;
});
it('create a primary loading button', () => {
wrapper = mount(Button, {
propsData: {
type: 'primary',
loading: true
}
});
expect(wrapper.hasClass('van-button')).to.be.true;
expect(wrapper.hasClass('van-button--primary')).to.be.true;
const loading = wrapper.find(VanLoading)[0];
expect(loading.isVueComponent).to.be.true;
});
});