diff options
author | Abijeet <abijeetpatro@gmail.com> | 2018-06-16 13:07:55 +0530 |
---|---|---|
committer | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2018-06-18 07:39:44 +0200 |
commit | 419d72e0eed300e5792f02c8d458a5da0367541d (patch) | |
tree | 831f9e397c36993afbd93c0d84b345f7c174ba1c /apps/files_trashbin | |
parent | 55216e6b9558d333158aaed87d16d988f247da82 (diff) | |
download | nextcloud-server-419d72e0eed300e5792f02c8d458a5da0367541d.tar.gz nextcloud-server-419d72e0eed300e5792f02c8d458a5da0367541d.zip |
Adds a test case for the loading symbol in deleted files.
Signed-off-by: Abijeet <abijeetpatro@gmail.com>
Diffstat (limited to 'apps/files_trashbin')
-rw-r--r-- | apps/files_trashbin/tests/js/filelistSpec.js | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/apps/files_trashbin/tests/js/filelistSpec.js b/apps/files_trashbin/tests/js/filelistSpec.js index 9d1308af3e4..c5b1018856b 100644 --- a/apps/files_trashbin/tests/js/filelistSpec.js +++ b/apps/files_trashbin/tests/js/filelistSpec.js @@ -303,7 +303,9 @@ describe('OCA.Trashbin.FileList tests', function() { }); it('Deletes selected files when "Delete" clicked', function() { var request; - $('.selectedActions .filesSelectMenu .delete').click(); + var $deleteLink = $('.selectedActions .filesSelectMenu .delete'); + $deleteLink.click(); + expect($deleteLink.find('.icon-loading-small').length).toEqual(1); expect(fakeServer.requests.length).toEqual(1); request = fakeServer.requests[0]; expect(request.url).toEqual(OC.webroot + '/index.php/apps/files_trashbin/ajax/delete.php'); @@ -323,6 +325,7 @@ describe('OCA.Trashbin.FileList tests', function() { } }) ); + expect($deleteLink.find('.icon-loading-small').length).toEqual(0); expect(fileList.findFileEl('One.txt.d11111').length).toEqual(0); expect(fileList.findFileEl('Three.pdf.d33333').length).toEqual(0); expect(fileList.findFileEl('somedir.d99999').length).toEqual(0); @@ -348,7 +351,9 @@ describe('OCA.Trashbin.FileList tests', function() { describe('Restore', function() { it('Restores selected files when "Restore" clicked', function() { var request; - $('.selectedActions .filesSelectMenu .restore').click(); + var $restoreLink = $('.selectedActions .filesSelectMenu .restore'); + $restoreLink.click(); + expect($restoreLink.find('.icon-loading-small').length).toEqual(1); expect(fakeServer.requests.length).toEqual(1); request = fakeServer.requests[0]; expect(request.url).toEqual(OC.webroot + '/index.php/apps/files_trashbin/ajax/undelete.php'); @@ -368,6 +373,7 @@ describe('OCA.Trashbin.FileList tests', function() { } }) ); + expect($restoreLink.find('.icon-loading-small').length).toEqual(0); expect(fileList.findFileEl('One.txt.d11111').length).toEqual(0); expect(fileList.findFileEl('Three.pdf.d33333').length).toEqual(0); expect(fileList.findFileEl('somedir.d99999').length).toEqual(0); |