summaryrefslogtreecommitdiff
path: root/web-ui/test
diff options
context:
space:
mode:
authorBruno Wagner <bwgpro@gmail.com>2015-03-30 20:15:05 -0300
committerBruno Wagner <bwgpro@gmail.com>2015-03-30 20:15:05 -0300
commit204782a2ce89e78f3d7a58a8b9dde7bb709a8432 (patch)
tree384f6a58f1067a0eb03b5ae70c84a9660d8ba700 /web-ui/test
parent813f5cc02c06bb297e030c8c67897d9e1d68a598 (diff)
Fixed #349 - Send button now enables back on error
Diffstat (limited to 'web-ui/test')
-rw-r--r--web-ui/test/spec/mail_view/ui/send_button.spec.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/web-ui/test/spec/mail_view/ui/send_button.spec.js b/web-ui/test/spec/mail_view/ui/send_button.spec.js
index ff1eecde..dc9b940d 100644
--- a/web-ui/test/spec/mail_view/ui/send_button.spec.js
+++ b/web-ui/test/spec/mail_view/ui/send_button.spec.js
@@ -91,6 +91,18 @@ describeComponent('mail_view/ui/send_button', function () {
expect(this.$node.text()).toBe('Sending...');
expect(this.$node.prop('disabled')).toBeTruthy();
});
+
+ it('enables again if sending errors out', function() {
+ expect(this.$node.text()).toBe('Send');
+
+ this.$node.click();
+
+ $(document).trigger(Pixelated.events.mail.send_failed);
+
+ expect(this.$node.text()).toBe('Send');
+ expect(this.$node.prop('disabled')).not.toBeTruthy();
+
+ })
});
describe('after clicking', function () {