diff options
author | Vincent Petry <pvince81@owncloud.com> | 2014-12-11 17:36:14 +0100 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2014-12-11 18:21:25 +0100 |
commit | 81e9d43e237fe80bf0b053bc8f5b34219da11a6e (patch) | |
tree | 886c04392d8e8b1b1309a66f43883abaf0af3376 /apps/files/tests | |
parent | acc9af8fc92ea315668e80617e5496e60a97d788 (diff) | |
download | nextcloud-server-81e9d43e237fe80bf0b053bc8f5b34219da11a6e.tar.gz nextcloud-server-81e9d43e237fe80bf0b053bc8f5b34219da11a6e.zip |
Move file thumbnail into the label element
Diffstat (limited to 'apps/files/tests')
-rw-r--r-- | apps/files/tests/js/filelistSpec.js | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/apps/files/tests/js/filelistSpec.js b/apps/files/tests/js/filelistSpec.js index 21f8a12f4b5..83ff532313c 100644 --- a/apps/files/tests/js/filelistSpec.js +++ b/apps/files/tests/js/filelistSpec.js @@ -955,8 +955,8 @@ describe('OCA.Files.FileList tests', function() { name: 'testFile.txt' }; var $tr = fileList.add(fileData); - var $td = $tr.find('td.filename'); - expect(OC.TestUtil.getImageUrl($td)).toEqual(OC.webroot + '/core/img/filetypes/file.svg'); + var $imgDiv = $tr.find('td.filename .thumbnail'); + expect(OC.TestUtil.getImageUrl($imgDiv)).toEqual(OC.webroot + '/core/img/filetypes/file.svg'); expect(previewLoadStub.notCalled).toEqual(true); }); it('renders default icon for dir when none provided and no preview is available', function() { @@ -965,8 +965,8 @@ describe('OCA.Files.FileList tests', function() { name: 'test dir' }; var $tr = fileList.add(fileData); - var $td = $tr.find('td.filename'); - expect(OC.TestUtil.getImageUrl($td)).toEqual(OC.webroot + '/core/img/filetypes/folder.svg'); + var $imgDiv = $tr.find('td.filename .thumbnail'); + expect(OC.TestUtil.getImageUrl($imgDiv)).toEqual(OC.webroot + '/core/img/filetypes/folder.svg'); expect(previewLoadStub.notCalled).toEqual(true); }); it('renders provided icon for file when provided', function() { @@ -976,8 +976,8 @@ describe('OCA.Files.FileList tests', function() { icon: OC.webroot + '/core/img/filetypes/application-pdf.svg' }; var $tr = fileList.add(fileData); - var $td = $tr.find('td.filename'); - expect(OC.TestUtil.getImageUrl($td)).toEqual(OC.webroot + '/core/img/filetypes/application-pdf.svg'); + var $imgDiv = $tr.find('td.filename .thumbnail'); + expect(OC.TestUtil.getImageUrl($imgDiv)).toEqual(OC.webroot + '/core/img/filetypes/application-pdf.svg'); expect(previewLoadStub.notCalled).toEqual(true); }); it('renders preview when no icon was provided and preview is available', function() { @@ -988,11 +988,11 @@ describe('OCA.Files.FileList tests', function() { }; var $tr = fileList.add(fileData); var $td = $tr.find('td.filename'); - expect(OC.TestUtil.getImageUrl($td)).toEqual(OC.webroot + '/core/img/filetypes/file.svg'); + expect(OC.TestUtil.getImageUrl($td.find('.thumbnail'))).toEqual(OC.webroot + '/core/img/filetypes/file.svg'); expect(previewLoadStub.calledOnce).toEqual(true); // third argument is callback previewLoadStub.getCall(0).args[0].callback(OC.webroot + '/somepath.png'); - expect(OC.TestUtil.getImageUrl($td)).toEqual(OC.webroot + '/somepath.png'); + expect(OC.TestUtil.getImageUrl($td.find('.thumbnail'))).toEqual(OC.webroot + '/somepath.png'); }); it('renders default file type icon when no icon was provided and no preview is available', function() { var fileData = { @@ -1001,8 +1001,8 @@ describe('OCA.Files.FileList tests', function() { isPreviewAvailable: false }; var $tr = fileList.add(fileData); - var $td = $tr.find('td.filename'); - expect(OC.TestUtil.getImageUrl($td)).toEqual(OC.webroot + '/core/img/filetypes/file.svg'); + var $imgDiv = $tr.find('td.filename .thumbnail'); + expect(OC.TestUtil.getImageUrl($imgDiv)).toEqual(OC.webroot + '/core/img/filetypes/file.svg'); expect(previewLoadStub.notCalled).toEqual(true); }); }); |