summaryrefslogtreecommitdiff
path: root/web-ui/test/spec/mail_view/ui
diff options
context:
space:
mode:
Diffstat (limited to 'web-ui/test/spec/mail_view/ui')
-rw-r--r--web-ui/test/spec/mail_view/ui/feedback_box.spec.js14
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);
+ });
+ });
+
});