diff options
Diffstat (limited to 'web-ui')
-rw-r--r-- | web-ui/test/spec/mail_view/ui/compose_box.spec.js | 9 | ||||
-rw-r--r-- | web-ui/test/spec/mail_view/ui/draft_box.spec.js | 10 |
2 files changed, 19 insertions, 0 deletions
diff --git a/web-ui/test/spec/mail_view/ui/compose_box.spec.js b/web-ui/test/spec/mail_view/ui/compose_box.spec.js index 414bc022..2fe3b982 100644 --- a/web-ui/test/spec/mail_view/ui/compose_box.spec.js +++ b/web-ui/test/spec/mail_view/ui/compose_box.spec.js @@ -99,6 +99,15 @@ describeComponent('mail_view/ui/compose_box', function () { expect(openNoMessageSelectedPaneEvent).not.toHaveBeenTriggeredOn(document); }); + + it('should call the enableFloatlabel method when events.mail.here is trigged', function() { + spyOn(this.component, 'enableFloatlabel'); + + this.component.renderComposeBox(); + + expect(this.component.enableFloatlabel).toHaveBeenCalledWith('input.floatlabel'); + expect(this.component.enableFloatlabel).toHaveBeenCalledWith('textarea.floatlabel'); + }); }); describe('close button behavior', function() { diff --git a/web-ui/test/spec/mail_view/ui/draft_box.spec.js b/web-ui/test/spec/mail_view/ui/draft_box.spec.js index 0113ca01..03098018 100644 --- a/web-ui/test/spec/mail_view/ui/draft_box.spec.js +++ b/web-ui/test/spec/mail_view/ui/draft_box.spec.js @@ -65,4 +65,14 @@ describeComponent('mail_view/ui/draft_box', function () { expect(openNoMessageSelectedEvent).toHaveBeenTriggeredOn(document); }); + it('should call the enableFloatlabel method when events.mail.here is trigged', function() { + this.setupComponent({mailIdent: mail.ident}); + spyOn(this.component, 'enableFloatlabel'); + + this.component.trigger(this.component, Pixelated.events.mail.here, { mail: mail }); + + expect(this.component.enableFloatlabel).toHaveBeenCalledWith('input.floatlabel'); + expect(this.component.enableFloatlabel).toHaveBeenCalledWith('textarea.floatlabel'); + }); + }); |