fix switch style bug in ie9

This commit is contained in:
baiyaaaaa
2016-11-06 17:19:53 +08:00
parent 858abf687f
commit 37b9636a6e
2 changed files with 4 additions and 6 deletions

View File

@@ -49,12 +49,9 @@ describe('Switch', () => {
}, true);
const core = vm.$el.querySelector('.el-switch__core');
const button = vm.$el.querySelector('.el-switch__button');
core.click();
Vue.nextTick(() => {
expect(vm.value).to.equal(false);
expect(getComputedStyle(core).backgroundColor).to.equal('rgb(192, 204, 218)');
expect(/2px, 2px/.test(button.style.transform)).to.true;
core.click();
expect(vm.value).to.equal(true);
done();