summaryrefslogtreecommitdiff
path: root/web-ui/test/spec/mail_view/ui
diff options
context:
space:
mode:
authorLisa Junger <ljunger@thoughtworks.com>2014-10-28 16:01:17 +0100
committerLisa Junger <ljunger@thoughtworks.com>2014-10-28 16:13:22 +0100
commita1ac3eb200b8eb9eea764fe4ea761c9c6b319c7e (patch)
tree01c43cf830456f5e18ac6585cbe38474503f073e /web-ui/test/spec/mail_view/ui
parent557fa0d17ff70a456669b25de69e4e6b180b374a (diff)
disables send button when triggered.
Diffstat (limited to 'web-ui/test/spec/mail_view/ui')
-rw-r--r--web-ui/test/spec/mail_view/ui/send_button.spec.js11
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 () {