Skip to content

Commit

Permalink
better notify style
Browse files Browse the repository at this point in the history
  • Loading branch information
wxsms committed Nov 18, 2017
1 parent 56e5e2a commit 40278af
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions docs/pages/components/MessageBox.md
Expand Up @@ -53,11 +53,11 @@ A confirm example using `Promise`:
.then(() => {
this.$notify({
type: 'success',
content: 'Deleted completed.'
content: 'Delete completed.'
})
})
.catch(() => {
this.$notify('Deleted canceled.')
this.$notify('Delete canceled.')
})
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/services/notification/Notification.vue
Expand Up @@ -11,7 +11,7 @@
<span :class="icons" style="font-size: 1.5em"></span>
</div>
<div class="media-body">
<h4 class="media-heading" v-if="title">{{title}}</h4>
<div class="media-heading" v-if="title"><b>{{title}}</b></div>
<div>{{content}}</div>
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions test/unit/specs/MessageBox.spec.js
Expand Up @@ -66,7 +66,7 @@ describe('MessageBox', () => {
expect(document.querySelector('.modal-backdrop')).not.exist
expect(document.querySelector('.modal')).not.exist
expect(document.querySelector('.alert')).to.exist
expect(document.querySelector('.alert .media-body > div').textContent).to.equal('Deleted canceled.')
expect(document.querySelector('.alert .media-body > div').textContent).to.equal('Delete canceled.')
})

it('should be able to open confirm box and ok', async () => {
Expand All @@ -85,7 +85,7 @@ describe('MessageBox', () => {
expect(document.querySelector('.modal-backdrop')).not.exist
expect(document.querySelector('.modal')).not.exist
expect(document.querySelector('.alert')).to.exist
expect(document.querySelector('.alert .media-body > div').textContent).to.equal('Deleted completed.')
expect(document.querySelector('.alert .media-body > div').textContent).to.equal('Delete completed.')
})

it('should be able to open prompt box and cancel', async () => {
Expand Down
2 changes: 1 addition & 1 deletion test/unit/specs/Notification.spec.js
Expand Up @@ -67,7 +67,7 @@ describe('Notification', () => {
expect(alert.className).to.contain('fade')
expect(alert.className).to.contain('in')
expect(alert.querySelector('.media-heading').textContent).to.equal('Title')
expect(alert.querySelector('.media-body > div').textContent).to.equal('This notification will not dismiss automatically.')
expect(alert.querySelectorAll('.media-body > div')[1].textContent).to.equal('This notification will not dismiss automatically.')
await utils.sleep(5200)
expect(document.querySelector('.alert')).to.exist
alert.querySelector('button.close').click()
Expand Down

0 comments on commit 40278af

Please sign in to comment.