diff options
| author | Duda Dornelles <ddornell@thoughtworks.com> | 2015-02-12 14:04:04 -0200 | 
|---|---|---|
| committer | Duda Dornelles <ddornell@thoughtworks.com> | 2015-02-12 14:08:27 -0200 | 
| commit | 4e43fa4e81aeb9a66c150d1dbf1c21b13dbce66e (patch) | |
| tree | fde434601751d97d16cc8481d7d09bf9f439f207 /web-ui/test | |
| parent | c89983e82f69e915e6a62dab0b4610c789a9914c (diff) | |
 #220 fixing issue were we couldnt delete a tag that was highlighted
Diffstat (limited to 'web-ui/test')
| -rw-r--r-- | web-ui/test/spec/mail_view/ui/mail_view.spec.js | 15 | 
1 files changed, 15 insertions, 0 deletions
| 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 2d2d4688..86b40591 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,21 @@ describeComponent('mail_view/ui/mail_view', function () {      expect(updateSpy.mostRecentCall.data.tags).toEqual(['other']);    }); +  it('removes the tag from email even if tag is highlighted', function () { +    var updateSpy = spyOnEvent(document, Pixelated.events.mail.tags.update); + +    testData.mail.tags = ['tag', 'other']; +    this.component.displayMail({}, testData); + +    var inboxTag = this.component.$node.find('.tag[data-tag="tag"]'); +    inboxTag.html('<em class="search-highlight">' + inboxTag.text() + '</em>'); + +    this.component.$node.find('.search-highlight').click(); + +    expect(updateSpy).toHaveBeenTriggeredOn(document); +    expect(updateSpy.mostRecentCall.data.tags).toEqual(['other']); +  }); +    it('removes numeric tag from the mail when its label is clicked', function() {      var updateSpy = spyOnEvent(document, Pixelated.events.mail.tags.update); | 
