summaryrefslogtreecommitdiff
path: root/web-ui/test
diff options
context:
space:
mode:
authorGiovane <giovaneliberato@gmail.com>2015-09-18 11:05:35 -0300
committerGiovane <giovaneliberato@gmail.com>2015-09-18 11:05:35 -0300
commit32d3ec6c059bc4fbb9ab7cc49dfe926bdaadf482 (patch)
treeca8701724041e50bc1ab35ecf94cea78628a053c /web-ui/test
parent035f3ceb689e3d9905ec642b2526e8ec4f0b617f (diff)
#442 Add feedback message to send feedback event.
Diffstat (limited to 'web-ui/test')
-rw-r--r--web-ui/test/spec/mail_view/ui/feedback_box.spec.js14
1 files changed, 9 insertions, 5 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 ab41c7d1..a034b028 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
@@ -17,15 +17,19 @@ 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);
+
+ it('should fire submit feedback event', function () {
+ var spy = spyOnEvent(document, Pixelated.events.feedback.submit);
+
+ this.component.select("textBox").val("Pixelated is Awesome!");
this.component.select('submitButton').click();
- expect(spy).toHaveBeenTriggeredOnAndWith(document, { message: 'Thanks for your feedback!' });
- });
+ expect(spy).toHaveBeenTriggeredOnAndWith(document, {feedback: "Pixelated is Awesome!"});
+ })
it('should close feedback box after submit', function() {
var spy = spyOnEvent(document, Pixelated.events.dispatchers.rightPane.openNoMessageSelected);
- this.component.select('submitButton').click();
+
+ this.component.trigger(document, Pixelated.events.feedback.submitted);
expect(spy).toHaveBeenTriggeredOn(document);
});
});