mirror of
https://github.com/youzan/vant.git
synced 2025-10-19 01:54:48 +00:00
手机端样式细节调整,补充测试用例 (#3)
* unit test * picker and dialog unit tes * fix:quantity and loading
This commit is contained in:
@@ -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;
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user