From 984a3bf9b3a86503b2b1ce32e5054b6d6b0c2092 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E5=A5=95?= <Leopoldthecoder@users.noreply.github.com> Date: Mon, 24 Oct 2016 11:42:59 +0800 Subject: [PATCH] Alert: improve test (#605) --- test/unit/specs/alert.spec.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/unit/specs/alert.spec.js b/test/unit/specs/alert.spec.js index 3355185e3..c374d0f6d 100644 --- a/test/unit/specs/alert.spec.js +++ b/test/unit/specs/alert.spec.js @@ -7,6 +7,7 @@ describe('Alert', () => { title: 'test', showIcon: true }, true); + expect(vm.$el.querySelector('.el-alert__title').textContent).to.equal('test'); expect(vm.$el.classList.contains('el-alert--info')).to.true; }); @@ -26,7 +27,8 @@ describe('Alert', () => { description: 'Unbowed, Unbent, Unbroken', showIcon: 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', () => {