支持SSR、升级Vue版本和增加新的icon (#40)

* search component add new style

* update vue version and support ssr

* unit test

* add new icon

* new icon
This commit is contained in:
张敏
2017-06-15 19:46:56 +08:00
committed by Yao
parent 857da3a5ee
commit 0f5972e75e
59 changed files with 370 additions and 204 deletions

View File

@@ -41,7 +41,7 @@ describe('RadioGroup', () => {
const eventStub = sinon.stub(wrapper.vNode.child, '$emit');
const uncheckedRadioLabel = wrapper.find('.van-radio')[1].find('.van-radio__label')[0];
uncheckedRadioLabel.simulate('click');
uncheckedRadioLabel.trigger('click');
wrapper.update();
wrapper.vm.$nextTick(() => {
@@ -85,7 +85,7 @@ describe('Radio', () => {
expect(wrapper.hasClass('van-radio')).to.be.true;
const eventStub = sinon.stub(wrapper.vm, '$emit');
wrapper.simulate('click');
wrapper.trigger('click');
wrapper.update();
wrapper.vm.$nextTick(() => {
expect(eventStub.calledOnce).to.be.true;
@@ -107,7 +107,7 @@ describe('Radio', () => {
const eventStub = sinon.stub(wrapper.vm, '$emit');
const checkboxLabel = wrapper.find('.van-radio__label')[0];
checkboxLabel.simulate('click');
checkboxLabel.trigger('click');
wrapper.update();
wrapper.vm.$nextTick(() => {
@@ -132,7 +132,7 @@ describe('Radio', () => {
expect(wrapper.instance().isDisabled).to.be.true;
const checkboxLabel = wrapper.find('.van-radio__label')[0];
checkboxLabel.simulate('click');
checkboxLabel.trigger('click');
expect(wrapper.instance().currentValue).to.equal('1');
});