diff options
author | Jan-Christoph Borchardt <hey@jancborchardt.net> | 2017-04-12 15:04:12 +0200 |
---|---|---|
committer | Jan-Christoph Borchardt <hey@jancborchardt.net> | 2017-04-12 15:04:12 +0200 |
commit | 37145a275f9188290afa38683216c860aea00f91 (patch) | |
tree | 341141bdce54d4aaab4002ce87242a40a647d3ab /apps/files_sharing/tests | |
parent | af42ca20252b166bec2da34970137ec790a18328 (diff) | |
download | nextcloud-server-37145a275f9188290afa38683216c860aea00f91.tar.gz nextcloud-server-37145a275f9188290afa38683216c860aea00f91.zip |
Fix AdBlock blocking share icon, ref #866
Signed-off-by: Jan-Christoph Borchardt <hey@jancborchardt.net>
Diffstat (limited to 'apps/files_sharing/tests')
-rw-r--r-- | apps/files_sharing/tests/js/shareSpec.js | 20 | ||||
-rw-r--r-- | apps/files_sharing/tests/js/sharedbreadcrumviewSpec.js | 24 |
2 files changed, 22 insertions, 22 deletions
diff --git a/apps/files_sharing/tests/js/shareSpec.js b/apps/files_sharing/tests/js/shareSpec.js index c34234bfe13..7568b06f27c 100644 --- a/apps/files_sharing/tests/js/shareSpec.js +++ b/apps/files_sharing/tests/js/shareSpec.js @@ -84,7 +84,7 @@ describe('OCA.Sharing.Util tests', function() { }]); $tr = fileList.$el.find('tbody tr:first'); $action = $tr.find('.action-share'); - expect($action.find('.icon').hasClass('icon-share')).toEqual(true); + expect($action.find('.icon').hasClass('icon-shared')).toEqual(true); expect($action.find('.icon').hasClass('icon-public')).toEqual(false); expect(OC.basename(getImageUrl($tr.find('.filename .thumbnail')))).toEqual('folder.svg'); }); @@ -104,7 +104,7 @@ describe('OCA.Sharing.Util tests', function() { $tr = fileList.$el.find('tbody tr:first'); $action = $tr.find('.action-share'); expect($action.find('>span').text().trim()).toEqual('Shared'); - expect($action.find('.icon').hasClass('icon-share')).toEqual(true); + expect($action.find('.icon').hasClass('icon-shared')).toEqual(true); expect($action.find('.icon').hasClass('icon-public')).toEqual(false); expect(OC.basename(getImageUrl($tr.find('.filename .thumbnail')))).toEqual('folder-shared.svg'); }); @@ -125,7 +125,7 @@ describe('OCA.Sharing.Util tests', function() { $tr = fileList.$el.find('tbody tr:first'); $action = $tr.find('.action-share'); expect($action.find('>span').text().trim()).toEqual('Shared'); - expect($action.find('.icon').hasClass('icon-share')).toEqual(false); + expect($action.find('.icon').hasClass('icon-shared')).toEqual(false); expect($action.find('.icon').hasClass('icon-public')).toEqual(true); expect(OC.basename(getImageUrl($tr.find('.filename .thumbnail')))).toEqual('folder-public.svg'); }); @@ -146,7 +146,7 @@ describe('OCA.Sharing.Util tests', function() { $tr = fileList.$el.find('tbody tr:first'); $action = $tr.find('.action-share'); expect($action.find('>span').text().trim()).toEqual('User One'); - expect($action.find('.icon').hasClass('icon-share')).toEqual(true); + expect($action.find('.icon').hasClass('icon-shared')).toEqual(true); expect($action.find('.icon').hasClass('icon-public')).toEqual(false); expect(OC.basename(getImageUrl($tr.find('.filename .thumbnail')))).toEqual('folder-shared.svg'); }); @@ -167,7 +167,7 @@ describe('OCA.Sharing.Util tests', function() { $tr = fileList.$el.find('tbody tr:first'); $action = $tr.find('.action-share'); expect($action.find('>span').text().trim()).toEqual('Shared with User One, User Two'); - expect($action.find('.icon').hasClass('icon-share')).toEqual(true); + expect($action.find('.icon').hasClass('icon-shared')).toEqual(true); expect($action.find('.icon').hasClass('icon-public')).toEqual(false); expect(OC.basename(getImageUrl($tr.find('.filename .thumbnail')))).toEqual('folder-shared.svg'); }); @@ -274,7 +274,7 @@ describe('OCA.Sharing.Util tests', function() { expect($tr.attr('data-share-recipients')).toEqual('Group One, Group Two, User One, User Two'); expect($action.find('>span').text().trim()).toEqual('Shared with Group One, Group Two, User One, User Two'); - expect($action.find('.icon').hasClass('icon-share')).toEqual(true); + expect($action.find('.icon').hasClass('icon-shared')).toEqual(true); expect($action.find('.icon').hasClass('icon-public')).toEqual(false); }); it('updates share icon after updating shares of a file', function() { @@ -307,7 +307,7 @@ describe('OCA.Sharing.Util tests', function() { expect($tr.attr('data-share-recipients')).toEqual('User One, User Three, User Two'); expect($action.find('>span').text().trim()).toEqual('Shared with User One, User Three, User Two'); - expect($action.find('.icon').hasClass('icon-share')).toEqual(true); + expect($action.find('.icon').hasClass('icon-shared')).toEqual(true); expect($action.find('.icon').hasClass('icon-public')).toEqual(false); }); it('removes share icon after removing all shares from a file', function() { @@ -363,7 +363,7 @@ describe('OCA.Sharing.Util tests', function() { expect($tr.attr('data-share-recipients')).toEqual('User Two'); expect($action.find('>span').text().trim()).toEqual('User One'); - expect($action.find('.icon').hasClass('icon-share')).toEqual(true); + expect($action.find('.icon').hasClass('icon-shared')).toEqual(true); expect($action.find('.icon').hasClass('icon-public')).toEqual(false); }); it('keep share text after unsharing reshare', function() { @@ -394,7 +394,7 @@ describe('OCA.Sharing.Util tests', function() { expect($tr.attr('data-share-recipients')).not.toBeDefined(); expect($action.find('>span').text().trim()).toEqual('User One'); - expect($action.find('.icon').hasClass('icon-share')).toEqual(true); + expect($action.find('.icon').hasClass('icon-shared')).toEqual(true); expect($action.find('.icon').hasClass('icon-public')).toEqual(false); }); }); @@ -469,5 +469,5 @@ describe('OCA.Sharing.Util tests', function() { expect($('[data-share-recipient]').length).toEqual(0); }); }); - + }); diff --git a/apps/files_sharing/tests/js/sharedbreadcrumviewSpec.js b/apps/files_sharing/tests/js/sharedbreadcrumviewSpec.js index 501dd819fa8..c58e038c4ab 100644 --- a/apps/files_sharing/tests/js/sharedbreadcrumviewSpec.js +++ b/apps/files_sharing/tests/js/sharedbreadcrumviewSpec.js @@ -57,7 +57,7 @@ describe('OCA.Sharing.ShareBreadCrumbView tests', function() { bc.setDirectory(''); bc.render(); expect(bc.$el.hasClass('breadcrumb')).toEqual(true); - expect(bc.$el.find('.icon-share').length).toEqual(0); + expect(bc.$el.find('.icon-shared').length).toEqual(0); expect(bc.$el.find('.shared').length).toEqual(0); expect(bc.$el.find('.icon-public').length).toEqual(0); }); @@ -71,7 +71,7 @@ describe('OCA.Sharing.ShareBreadCrumbView tests', function() { bc.setDirectory('/foo'); bc.render(); expect(bc.$el.hasClass('breadcrumb')).toEqual(true); - expect(bc.$el.find('.icon-share').length).toEqual(1); + expect(bc.$el.find('.icon-shared').length).toEqual(1); expect(bc.$el.find('.shared').length).toEqual(0); expect(bc.$el.find('.icon-public').length).toEqual(0); }); @@ -86,7 +86,7 @@ describe('OCA.Sharing.ShareBreadCrumbView tests', function() { bc.setDirectory('/foo'); bc.render(); expect(bc.$el.hasClass('breadcrumb')).toEqual(true); - expect(bc.$el.find('.icon-share').length).toEqual(1); + expect(bc.$el.find('.icon-shared').length).toEqual(1); expect(bc.$el.find('.shared').length).toEqual(1); expect(bc.$el.find('.icon-public').length).toEqual(0); }); @@ -101,7 +101,7 @@ describe('OCA.Sharing.ShareBreadCrumbView tests', function() { bc.setDirectory('/foo'); bc.render(); expect(bc.$el.hasClass('breadcrumb')).toEqual(true); - expect(bc.$el.find('.icon-share').length).toEqual(1); + expect(bc.$el.find('.icon-shared').length).toEqual(1); expect(bc.$el.find('.shared').length).toEqual(1); expect(bc.$el.find('.icon-public').length).toEqual(0); }); @@ -116,7 +116,7 @@ describe('OCA.Sharing.ShareBreadCrumbView tests', function() { bc.setDirectory('/foo'); bc.render(); expect(bc.$el.hasClass('breadcrumb')).toEqual(true); - expect(bc.$el.find('.icon-share').length).toEqual(0); + expect(bc.$el.find('.icon-shared').length).toEqual(0); expect(bc.$el.find('.shared').length).toEqual(1); expect(bc.$el.find('.icon-public').length).toEqual(1); }); @@ -131,7 +131,7 @@ describe('OCA.Sharing.ShareBreadCrumbView tests', function() { bc.setDirectory('/foo'); bc.render(); expect(bc.$el.hasClass('breadcrumb')).toEqual(true); - expect(bc.$el.find('.icon-share').length).toEqual(1); + expect(bc.$el.find('.icon-shared').length).toEqual(1); expect(bc.$el.find('.shared').length).toEqual(1); expect(bc.$el.find('.icon-public').length).toEqual(0); }); @@ -146,7 +146,7 @@ describe('OCA.Sharing.ShareBreadCrumbView tests', function() { bc.setDirectory('/foo'); bc.render(); expect(bc.$el.hasClass('breadcrumb')).toEqual(true); - expect(bc.$el.find('.icon-share').length).toEqual(1); + expect(bc.$el.find('.icon-shared').length).toEqual(1); expect(bc.$el.find('.shared').length).toEqual(1); expect(bc.$el.find('.icon-public').length).toEqual(0); }); @@ -168,7 +168,7 @@ describe('OCA.Sharing.ShareBreadCrumbView tests', function() { bc.setDirectory('/foo'); bc.render(); expect(bc.$el.hasClass('breadcrumb')).toEqual(true); - expect(bc.$el.find('.icon-share').length).toEqual(0); + expect(bc.$el.find('.icon-shared').length).toEqual(0); expect(bc.$el.find('.shared').length).toEqual(1); expect(bc.$el.find('.icon-public').length).toEqual(1); }); @@ -188,7 +188,7 @@ describe('OCA.Sharing.ShareBreadCrumbView tests', function() { mock.showDetailsView = function() { }; OCA.Files.App.fileList = mock; var spy = sinon.spy(mock, 'showDetailsView'); - bc.$el.find('.icon-share').click(); + bc.$el.find('.icon-shared').click(); expect(spy.calledOnce).toEqual(true); @@ -199,7 +199,7 @@ describe('OCA.Sharing.ShareBreadCrumbView tests', function() { shareTab.trigger('sharesChanged', model); expect(bc.$el.hasClass('breadcrumb')).toEqual(true); - expect(bc.$el.find('.icon-share').length).toEqual(1); + expect(bc.$el.find('.icon-shared').length).toEqual(1); expect(bc.$el.find('.shared').length).toEqual(0); expect(bc.$el.find('.icon-public').length).toEqual(0); }); @@ -219,7 +219,7 @@ describe('OCA.Sharing.ShareBreadCrumbView tests', function() { mock.showDetailsView = function() { }; OCA.Files.App.fileList = mock; var spy = sinon.spy(mock, 'showDetailsView'); - bc.$el.find('.icon-share').click(); + bc.$el.find('.icon-shared').click(); expect(spy.calledOnce).toEqual(true); @@ -232,7 +232,7 @@ describe('OCA.Sharing.ShareBreadCrumbView tests', function() { shareTab.trigger('sharesChanged', model); expect(bc.$el.hasClass('breadcrumb')).toEqual(true); - expect(bc.$el.find('.icon-share').length).toEqual(0); + expect(bc.$el.find('.icon-shared').length).toEqual(0); expect(bc.$el.find('.shared').length).toEqual(1); expect(bc.$el.find('.icon-public').length).toEqual(1); }); |