diff options
author | Giovane <giovaneliberato@gmail.com> | 2015-09-17 16:15:35 -0300 |
---|---|---|
committer | Giovane <giovaneliberato@gmail.com> | 2015-09-17 16:15:35 -0300 |
commit | 035f3ceb689e3d9905ec642b2526e8ec4f0b617f (patch) | |
tree | c2df7c192a635920c0937f7459d3ac5f05eca2f8 /web-ui/test/spec/mail_view/ui | |
parent | 1a7476f7a187f7eb65e358875a05c01869f54020 (diff) |
#442 Improve feedback box UI and show message after clicking submit.
Diffstat (limited to 'web-ui/test/spec/mail_view/ui')
-rw-r--r-- | web-ui/test/spec/mail_view/ui/feedback_box.spec.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/web-ui/test/spec/mail_view/ui/feedback_box.spec.js b/web-ui/test/spec/mail_view/ui/feedback_box.spec.js index cbe9b0bb..ab41c7d1 100644 --- a/web-ui/test/spec/mail_view/ui/feedback_box.spec.js +++ b/web-ui/test/spec/mail_view/ui/feedback_box.spec.js @@ -16,4 +16,18 @@ describeComponent('mail_view/ui/feedback_box', function () { }); + describe('when submit feedback', function () { + it('should display submitted message', function() { + var spy = spyOnEvent(document, Pixelated.events.ui.userAlerts.displayMessage); + this.component.select('submitButton').click(); + expect(spy).toHaveBeenTriggeredOnAndWith(document, { message: 'Thanks for your feedback!' }); + }); + + it('should close feedback box after submit', function() { + var spy = spyOnEvent(document, Pixelated.events.dispatchers.rightPane.openNoMessageSelected); + this.component.select('submitButton').click(); + expect(spy).toHaveBeenTriggeredOn(document); + }); + }); + }); |