diff options
-rw-r--r-- | web-ui/app/js/mail_view/ui/mail_view.js | 1 | ||||
-rw-r--r-- | web-ui/test/spec/mail_view/ui/mail_view.spec.js | 7 |
2 files changed, 8 insertions, 0 deletions
diff --git a/web-ui/app/js/mail_view/ui/mail_view.js b/web-ui/app/js/mail_view/ui/mail_view.js index 17e2f055..c0d1fa53 100644 --- a/web-ui/app/js/mail_view/ui/mail_view.js +++ b/web-ui/app/js/mail_view/ui/mail_view.js @@ -180,6 +180,7 @@ define( this.select('deleteModal').foundation('reveal', 'open'); } else { this.updateTags(this.attr.mail, filteredTags); + this.trigger(document, events.dispatchers.tags.refreshTagList); } }; diff --git a/web-ui/test/spec/mail_view/ui/mail_view.spec.js b/web-ui/test/spec/mail_view/ui/mail_view.spec.js index 36b58b87..58577f90 100644 --- a/web-ui/test/spec/mail_view/ui/mail_view.spec.js +++ b/web-ui/test/spec/mail_view/ui/mail_view.spec.js @@ -41,6 +41,13 @@ describeComponent('mail_view/ui/mail_view', function () { expect(updateSpy).toHaveBeenTriggeredOn(document); }); + it('remove tag triggers refreshTagList event', function(){ + var refreshTagListEvent = spyOnEvent(document, Pixelated.events.dispatchers.tags.refreshTagList); + this.component.displayMail({}, testData); + this.component.removeTag('inbox'); + expect(refreshTagListEvent).toHaveBeenTriggeredOn(document); + }); + it('verifies if new tag input is hidden when rendering mail view', function() { this.component.displayMail({}, testData); |