mirror of https://github.com/ElemeFE/element
Alert: improve test (#605)
parent
84adcace51
commit
984a3bf9b3
|
@ -7,6 +7,7 @@ describe('Alert', () => {
|
||||||
title: 'test',
|
title: 'test',
|
||||||
showIcon: true
|
showIcon: true
|
||||||
}, true);
|
}, true);
|
||||||
|
expect(vm.$el.querySelector('.el-alert__title').textContent).to.equal('test');
|
||||||
expect(vm.$el.classList.contains('el-alert--info')).to.true;
|
expect(vm.$el.classList.contains('el-alert--info')).to.true;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -26,7 +27,8 @@ describe('Alert', () => {
|
||||||
description: 'Unbowed, Unbent, Unbroken',
|
description: 'Unbowed, Unbent, Unbroken',
|
||||||
showIcon: true
|
showIcon: true
|
||||||
}, true);
|
}, true);
|
||||||
expect(vm.$el.querySelector('.el-alert__description')).to.exist;
|
expect(vm.$el.querySelector('.el-alert__description').textContent)
|
||||||
|
.to.equal('Unbowed, Unbent, Unbroken');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('close', () => {
|
it('close', () => {
|
||||||
|
|
Loading…
Reference in New Issue