diff options
author | Lisa Junger <ljunger@thoughtworks.com> | 2014-10-28 16:01:17 +0100 |
---|---|---|
committer | Lisa Junger <ljunger@thoughtworks.com> | 2014-10-28 16:13:22 +0100 |
commit | a1ac3eb200b8eb9eea764fe4ea761c9c6b319c7e (patch) | |
tree | 01c43cf830456f5e18ac6585cbe38474503f073e /web-ui/test/spec/mail_view | |
parent | 557fa0d17ff70a456669b25de69e4e6b180b374a (diff) |
disables send button when triggered.
Diffstat (limited to 'web-ui/test/spec/mail_view')
-rw-r--r-- | web-ui/test/spec/mail_view/ui/send_button.spec.js | 11 |
1 files changed, 10 insertions, 1 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 e97165f1..81e47803 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 @@ -6,7 +6,7 @@ describeComponent('mail_view/ui/send_button', function () { describe('send button', function () { beforeEach(function () { - this.setupComponent('<button />'); + this.setupComponent('<button>Send</button>'); }); describe('when it is disabled', function () { @@ -74,6 +74,15 @@ describeComponent('mail_view/ui/send_button', function () { expect(doCompleteInputEvent).toHaveBeenTriggeredOn(document); }); + + it('disables the button after clicking', function () { + expect(this.$node.text()).toBe('Send'); + + this.$node.click(); + + expect(this.$node.text()).toBe('Sending...'); + expect(this.$node.prop('disabled')).toBeTruthy(); + }); }); describe('after clicking', function () { |