diff options
author | Giovane Liberato <giovaneliberato@gmail.com> | 2015-11-13 16:07:39 -0200 |
---|---|---|
committer | Giovane Liberato <giovaneliberato@gmail.com> | 2015-11-13 16:07:39 -0200 |
commit | c915f6b744769cd87cc284fb0d7d89bc51ae62df (patch) | |
tree | def0ffb3c12e61412da9eff8063f83ef2c002def /web-ui/test/spec | |
parent | b7ff48dca546c97f78fb98ca83afd6c9684f2612 (diff) | |
parent | de1e3408cc7d8a4beff703944c3659aeb9032fd2 (diff) |
Merge pull request #521 from rdoh/remove_save_draft_button
merge "remove save draft button, related css and js"
Diffstat (limited to 'web-ui/test/spec')
-rw-r--r-- | web-ui/test/spec/mail_view/ui/compose_box.spec.js | 16 | ||||
-rw-r--r-- | web-ui/test/spec/mail_view/ui/draft_box.spec.js | 10 | ||||
-rw-r--r-- | web-ui/test/spec/mail_view/ui/draft_button.spec.js | 40 |
3 files changed, 0 insertions, 66 deletions
diff --git a/web-ui/test/spec/mail_view/ui/compose_box.spec.js b/web-ui/test/spec/mail_view/ui/compose_box.spec.js index 8e07481a..4e43a2ff 100644 --- a/web-ui/test/spec/mail_view/ui/compose_box.spec.js +++ b/web-ui/test/spec/mail_view/ui/compose_box.spec.js @@ -120,22 +120,6 @@ describeComponent('mail_view/ui/compose_box', function () { }); - describe('draft compose box', function() { - it('should save a draft when click on draft button', function () { - $(document).trigger(Pixelated.events.ui.recipients.updated, {recipientsName: 'to', newRecipients: ['fox@somewhere.com']}); - - this.component.select('subjectBox').val('A new fancy subject!'); - var eventSpy = spyOnEvent(document, Pixelated.events.mail.saveDraft); - - this.component.select('draftButton').click(); - - expect(eventSpy).toHaveBeenTriggeredOn(document); - expect(eventSpy.mostRecentCall.data.header).toEqual(jasmine.objectContaining({ - to: ['fox@somewhere.com'] - })); - }); - }); - describe('subject label', function() { var input; var label; diff --git a/web-ui/test/spec/mail_view/ui/draft_box.spec.js b/web-ui/test/spec/mail_view/ui/draft_box.spec.js index be3b4039..96880adf 100644 --- a/web-ui/test/spec/mail_view/ui/draft_box.spec.js +++ b/web-ui/test/spec/mail_view/ui/draft_box.spec.js @@ -41,16 +41,6 @@ describeComponent('mail_view/ui/draft_box', function () { }); - it('sending a draft sends the correct mailIdent', function () { - this.setupComponent({mailIdent: mail.ident}); - this.component.trigger(this.component, Pixelated.events.mail.here, { mail: mail}); - - var sendDraftEvent = spyOnEvent(document, Pixelated.events.mail.saveDraft); - this.component.select('draftButton').click(); - - expect(sendDraftEvent).toHaveBeenTriggeredOnAndWith(document, jasmine.objectContaining({ident: mail.ident})); - }); - it('shows no message selected pane when draft is sent', function() { var openNoMessageSelectedEvent = spyOnEvent(document, Pixelated.events.dispatchers.rightPane.openNoMessageSelected); diff --git a/web-ui/test/spec/mail_view/ui/draft_button.spec.js b/web-ui/test/spec/mail_view/ui/draft_button.spec.js deleted file mode 100644 index de607507..00000000 --- a/web-ui/test/spec/mail_view/ui/draft_button.spec.js +++ /dev/null @@ -1,40 +0,0 @@ -/* global Pixelated */ - -describeComponent('mail_view/ui/draft_button', function(){ - 'use strict'; - - describe('draft save button', function(){ - beforeEach(function(){ - this.setupComponent('<button></button>'); - }); - - describe('after initialize', function(){ - it('should be disabled', function(){ - expect(this.$node).toBeDisabled(); - }); - }); - - describe('when enabled', function(){ - beforeEach(function(){ - this.$node.prop('disabled', false); - }); - - it('should be disabled when saving draft message', function(){ - $(document).trigger(Pixelated.events.mail.saveDraft, {}); - expect(this.$node).toBeDisabled(); - }); - }); - - describe('when disabled', function(){ - beforeEach(function(){ - this.$node.prop('disabled', true); - }); - - it('should be enabled when draft message has been saved', function(){ - $(document).trigger(Pixelated.events.mail.draftSaved, {}); - expect(this.$node).not.toBeDisabled(); - }); - }); - - }); -}); |