diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2020-11-10 09:50:46 +0100 |
---|---|---|
committer | Christoph Wurst <christoph@winzerhof-wurst.at> | 2020-11-13 08:46:35 +0100 |
commit | ae0a496da83613dc8b41540f2fa32479a3ec3f07 (patch) | |
tree | 494fdf6e463a0691356b41d154d2cc7b8881168f /apps/files_external/tests/js | |
parent | 25f8d76f266d53fa4b6f0f3c4fa65febc7b31253 (diff) | |
download | nextcloud-server-ae0a496da83613dc8b41540f2fa32479a3ec3f07.tar.gz nextcloud-server-ae0a496da83613dc8b41540f2fa32479a3ec3f07.zip |
Bump jquery from 2.2.4 to 3.1.0
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'apps/files_external/tests/js')
-rw-r--r-- | apps/files_external/tests/js/mountsfilelistSpec.js | 72 |
1 files changed, 37 insertions, 35 deletions
diff --git a/apps/files_external/tests/js/mountsfilelistSpec.js b/apps/files_external/tests/js/mountsfilelistSpec.js index fe2fd8dec84..6bed62ed5c6 100644 --- a/apps/files_external/tests/js/mountsfilelistSpec.js +++ b/apps/files_external/tests/js/mountsfilelistSpec.js @@ -60,13 +60,14 @@ describe('OCA.Files_External.FileList tests', function() { describe('loading file list for external storages', function() { var ocsResponse; + var reloading; beforeEach(function() { fileList = new OCA.Files_External.FileList( $('#app-content-container') ); - fileList.reload(); + reloading = fileList.reload(); /* jshint camelcase: false */ ocsResponse = { @@ -94,7 +95,7 @@ describe('OCA.Files_External.FileList tests', function() { } }; }); - it('render storage list', function() { + it('render storage list', function(done) { var request; var $rows; var $tr; @@ -112,41 +113,42 @@ describe('OCA.Files_External.FileList tests', function() { JSON.stringify(ocsResponse) ); - $rows = fileList.$el.find('tbody tr'); - expect($rows.length).toEqual(2); + return reloading.then(function() { + $rows = fileList.$el.find('tbody tr'); + expect($rows.length).toEqual(2); - $tr = $rows.eq(0); - expect($tr.attr('data-id')).not.toBeDefined(); - expect($tr.attr('data-type')).toEqual('dir'); - expect($tr.attr('data-file')).toEqual('sftp mount'); - expect($tr.attr('data-path')).toEqual('/another mount points'); - expect($tr.attr('data-size')).not.toBeDefined(); - expect($tr.attr('data-permissions')).toEqual('1'); // read only - expect($tr.find('a.name').attr('href')).toEqual( - OC.getRootPath() + - '/index.php/apps/files' + - '?dir=/another%20mount%20points/sftp%20mount' - ); - expect($tr.find('.nametext').text().trim()).toEqual('sftp mount'); - expect($tr.find('.column-scope > span').text().trim()).toEqual('System'); - expect($tr.find('.column-backend').text().trim()).toEqual('SFTP'); - - $tr = $rows.eq(1); - expect($tr.attr('data-id')).not.toBeDefined(); - expect($tr.attr('data-type')).toEqual('dir'); - expect($tr.attr('data-file')).toEqual('smb mount'); - expect($tr.attr('data-path')).toEqual('/mount points'); - expect($tr.attr('data-size')).not.toBeDefined(); - expect($tr.attr('data-permissions')).toEqual('9'); // read and delete - expect($tr.find('a.name').attr('href')).toEqual( - OC.getRootPath() + - '/index.php/apps/files' + - '?dir=/mount%20points/smb%20mount' - ); - expect($tr.find('.nametext').text().trim()).toEqual('smb mount'); - expect($tr.find('.column-scope > span').text().trim()).toEqual('Personal'); - expect($tr.find('.column-backend').text().trim()).toEqual('SMB'); + $tr = $rows.eq(0); + expect($tr.attr('data-id')).not.toBeDefined(); + expect($tr.attr('data-type')).toEqual('dir'); + expect($tr.attr('data-file')).toEqual('sftp mount'); + expect($tr.attr('data-path')).toEqual('/another mount points'); + expect($tr.attr('data-size')).not.toBeDefined(); + expect($tr.attr('data-permissions')).toEqual('1'); // read only + expect($tr.find('a.name').attr('href')).toEqual( + OC.getRootPath() + + '/index.php/apps/files' + + '?dir=/another%20mount%20points/sftp%20mount' + ); + expect($tr.find('.nametext').text().trim()).toEqual('sftp mount'); + expect($tr.find('.column-scope > span').text().trim()).toEqual('System'); + expect($tr.find('.column-backend').text().trim()).toEqual('SFTP'); + $tr = $rows.eq(1); + expect($tr.attr('data-id')).not.toBeDefined(); + expect($tr.attr('data-type')).toEqual('dir'); + expect($tr.attr('data-file')).toEqual('smb mount'); + expect($tr.attr('data-path')).toEqual('/mount points'); + expect($tr.attr('data-size')).not.toBeDefined(); + expect($tr.attr('data-permissions')).toEqual('9'); // read and delete + expect($tr.find('a.name').attr('href')).toEqual( + OC.getRootPath() + + '/index.php/apps/files' + + '?dir=/mount%20points/smb%20mount' + ); + expect($tr.find('.nametext').text().trim()).toEqual('smb mount'); + expect($tr.find('.column-scope > span').text().trim()).toEqual('Personal'); + expect($tr.find('.column-backend').text().trim()).toEqual('SMB'); + }).then(done, done); }); }); }); |