From 7ab9f9423004adf1df9cc1be1b2a5ae7eade4a95 Mon Sep 17 00:00:00 2001 From: Alexandre Pretto Nunes Date: Wed, 17 Dec 2014 19:19:25 -0200 Subject: Separate auto-refresh for mails and tags, and start moving away from having the left_pane_dispatcher as a middleman --- web-ui/test/spec/mail_list/ui/mail_list.spec.js | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'web-ui/test/spec/mail_list/ui/mail_list.spec.js') diff --git a/web-ui/test/spec/mail_list/ui/mail_list.spec.js b/web-ui/test/spec/mail_list/ui/mail_list.spec.js index 003830de..3950f032 100644 --- a/web-ui/test/spec/mail_list/ui/mail_list.spec.js +++ b/web-ui/test/spec/mail_list/ui/mail_list.spec.js @@ -83,17 +83,6 @@ describeComponent('mail_list/ui/mail_list', function () { expect(mailHereCheckedEvent).toHaveBeenTriggeredOnAndWith(caller, { checkedMails: mailList }); }); - it('returns every checked mail when the curent tag is "all"', function () { - var caller = {}; - this.component.attr.checkedMails = mailList; - this.component.attr.currentTag = 'all'; - var mailHereCheckedEvent = spyOnEvent(caller, Pixelated.events.ui.mail.hereChecked); - - $(document).trigger(Pixelated.events.ui.mail.wantChecked, caller); - - expect(mailHereCheckedEvent).toHaveBeenTriggeredOnAndWith(caller, { checkedMails: mailList }); - }); - it('returns an empty list to whomever requests the checked mails if there are no checked mails with the current tag', function () { var caller = {}; var mailHereCheckedEvent = spyOnEvent(caller, Pixelated.events.ui.mail.hereChecked); -- cgit v1.2.3 From b0720edaa0d51ee9e807495fa536d890d332c50d Mon Sep 17 00:00:00 2001 From: Alexandre Pretto Nunes Date: Tue, 6 Jan 2015 16:19:36 -0200 Subject: Update tests to refactored events behaviour --- web-ui/test/spec/mail_list/ui/mail_list.spec.js | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'web-ui/test/spec/mail_list/ui/mail_list.spec.js') diff --git a/web-ui/test/spec/mail_list/ui/mail_list.spec.js b/web-ui/test/spec/mail_list/ui/mail_list.spec.js index 3950f032..095a2a61 100644 --- a/web-ui/test/spec/mail_list/ui/mail_list.spec.js +++ b/web-ui/test/spec/mail_list/ui/mail_list.spec.js @@ -104,22 +104,13 @@ describeComponent('mail_list/ui/mail_list', function () { expect(this.component.attr.checkedMails).toEqual({'2': {}, '3': {} }); }); - it ('does not check the all checkbox if no mail checked has the current tag', function () { - var setCheckAllCheckboxEvent = spyOnEvent(document, Pixelated.events.ui.mails.hasMailsChecked); - this.component.attr.currentTag = 'inbox'; - - $(document).trigger(Pixelated.events.ui.mail.checked, {mail : {'1' : {tags: ['different']}}}); - - expect(setCheckAllCheckboxEvent).toHaveBeenTriggeredOnAndWith(document, false); - }); - it('checks the check all checkbox if at least one mail is checked with the current tag', function () { var setCheckAllCheckboxEvent = spyOnEvent(document, Pixelated.events.ui.mails.hasMailsChecked); this.component.attr.currentTag = 'inbox'; $(document).trigger(Pixelated.events.ui.mail.checked, {mail: mailList[0]}); - expect(setCheckAllCheckboxEvent).toHaveBeenTriggeredOnAndWith(document, true); + expect(setCheckAllCheckboxEvent).toHaveBeenTriggeredOnAndWith(document, {hasMailsChecked: true}); }); it('unchecks the check all checkbox if no mail is left checked', function () { @@ -129,7 +120,7 @@ describeComponent('mail_list/ui/mail_list', function () { $(document).trigger(Pixelated.events.ui.mail.unchecked, {mail: {ident: '1'}}); - expect(setCheckAllCheckboxEvent).toHaveBeenTriggeredOnAndWith(document, false); + expect(setCheckAllCheckboxEvent).toHaveBeenTriggeredOnAndWith(document, {hasMailsChecked: false}); }); }); -- cgit v1.2.3