From de1e3408cc7d8a4beff703944c3659aeb9032fd2 Mon Sep 17 00:00:00 2001 From: Robin Doherty Date: Thu, 12 Nov 2015 20:25:53 +1100 Subject: remove save draft button, related css and js --- web-ui/test/spec/mail_view/ui/compose_box.spec.js | 16 --------- web-ui/test/spec/mail_view/ui/draft_box.spec.js | 10 ------ web-ui/test/spec/mail_view/ui/draft_button.spec.js | 40 ---------------------- 3 files changed, 66 deletions(-) delete mode 100644 web-ui/test/spec/mail_view/ui/draft_button.spec.js (limited to 'web-ui/test/spec') 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(''); - }); - - 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(); - }); - }); - - }); -}); -- cgit v1.2.3