From a1ac3eb200b8eb9eea764fe4ea761c9c6b319c7e Mon Sep 17 00:00:00 2001 From: Lisa Junger Date: Tue, 28 Oct 2014 16:01:17 +0100 Subject: disables send button when triggered. --- web-ui/test/spec/mail_view/ui/send_button.spec.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'web-ui/test/spec/mail_view') 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(''); }); 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 () { -- cgit v1.2.3