diff options
author | Lisa Junger <ljunger@thoughtworks.com> | 2015-03-20 16:30:48 +0100 |
---|---|---|
committer | Lisa Junger <ljunger@thoughtworks.com> | 2015-03-20 16:48:15 +0100 |
commit | f6d676f39b8b1c6f79069964714f81adaa00ff5d (patch) | |
tree | e24f3eb44d7cacab0a06acf206cff9f96db0fe54 /web-ui/test/spec | |
parent | 28917526fd8111483cfaf6cfb0ffe714f9ae9f1c (diff) |
fix: send button no longer stuck on sending for invalid email addresses.
-Issue #189
Diffstat (limited to 'web-ui/test/spec')
-rw-r--r-- | web-ui/test/spec/mail_view/ui/send_button.spec.js | 8 |
1 files changed, 8 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 4109e923..dca8f02c 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 @@ -63,6 +63,14 @@ describeComponent('mail_view/ui/send_button', function () { expect(this.$node).toBeDisabled(); }); + + it('gets disabled if recipients:updated with invalid email', function () { + $(document).trigger(Pixelated.events.ui.recipients.inputHasMail, { name: 'to' }); + $(document).trigger(Pixelated.events.ui.recipients.updated, { newRecipients: ['InvalidEmail']}); + + expect(this.$node).not.toBeDisabled(); + expect(this.$node.text()).toBe('Send'); + }); }); describe('on click', function () { |