diff options
author | Felix Hammerl <fhammerl@thoughtworks.com> | 2016-02-04 11:35:53 +0100 |
---|---|---|
committer | Felix Hammerl <fhammerl@thoughtworks.com> | 2016-02-04 11:35:53 +0100 |
commit | 97dbf261bd8ca9708673fc1c569b3b26ad8cf67c (patch) | |
tree | 425c6d92cd0a062f9ec67827446bec0a15a88a1a /web-ui/test | |
parent | 54932685e98f772041044f5a3181646e4f61a38f (diff) |
Issue #551 - Show attachment name during upload
Diffstat (limited to 'web-ui/test')
-rw-r--r-- | web-ui/test/spec/mail_view/ui/attachment_list.spec.js | 13 |
1 files changed, 6 insertions, 7 deletions
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('<div id="attachment-list">' + '<ul id="attachment-list-item"></ul>' + - '<ul id="attachment-upload-item"><li><div id="attachment-upload-item-progress" class="progress"><div class="progress-bar progress-bar-success"></div></div><a>Uploading... <i id="attachment-upload-item-abort" class="fa fa-close remove-icon"></i></a></li></ul>' + + '<ul id="attachment-upload-item"></ul>' + '</div>'); }); @@ -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(); |