From 97dbf261bd8ca9708673fc1c569b3b26ad8cf67c Mon Sep 17 00:00:00 2001 From: Felix Hammerl Date: Thu, 4 Feb 2016 11:35:53 +0100 Subject: Issue #551 - Show attachment name during upload --- web-ui/test/spec/mail_view/ui/attachment_list.spec.js | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'web-ui/test/spec') diff --git a/web-ui/test/spec/mail_view/ui/attachment_list.spec.js b/web-ui/test/spec/mail_view/ui/attachment_list.spec.js index 79f4b81e..94559b63 100644 --- a/web-ui/test/spec/mail_view/ui/attachment_list.spec.js +++ b/web-ui/test/spec/mail_view/ui/attachment_list.spec.js @@ -5,7 +5,7 @@ describeMixin('mail_view/ui/attachment_list', function () { beforeEach(function () { this.setupComponent('
' + '' + - '' + + '' + '
'); }); @@ -43,14 +43,13 @@ describeMixin('mail_view/ui/attachment_list', function () { describe('Upload', function() { describe('Progress Bar', function () { - it('should show progress bar', function() { - this.component.showUploadProgressBar(); + it('should show/hide progress bar', function() { + this.component.showUploadProgressBar(null, {originalFiles: [{name: 'foo.txt', size: 4500}]}); - expect(this.component.select('attachmentUploadItem').html()).toContain('Uploading...'); + expect(this.component.select('attachmentUploadItem').html()).toContain('foo.txt'); + expect(this.component.select('attachmentUploadItem').html()).toContain('(4.39 Kb'); expect(this.component.select('attachmentUploadItem').css('display')).toEqual('block'); - }); - it('should hide progress bar', function() { this.component.hideUploadProgressBar(); expect(this.component.select('attachmentUploadItem').css('display')).toEqual('none'); @@ -63,7 +62,7 @@ describeMixin('mail_view/ui/attachment_list', function () { abort: function() {} }; spyOn(fakeJQXHR, 'abort'); - // this.component.showUploadProgressBar(); + this.component.showUploadProgressBar(null, {originalFiles: [{name: 'foo.txt', size: 4500}]}); this.component.attachUploadAbort(null, fakeJQXHR); this.component.select('attachmentUploadItemAbort').click(); -- cgit v1.2.3