diff options
author | Vincent Petry <pvince81@owncloud.com> | 2015-09-15 15:48:11 +0200 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2015-09-16 07:23:29 +0200 |
commit | 02d68d06130345c3397976edd8f69169bbf8e980 (patch) | |
tree | 89d47690cafa4a81f41cdacb612d736cf7125c45 /core/js | |
parent | f439c07ba9e76d0baebc7ec3000ee5bc5bc3c675 (diff) | |
download | nextcloud-server-02d68d06130345c3397976edd8f69169bbf8e980.tar.gz nextcloud-server-02d68d06130345c3397976edd8f69169bbf8e980.zip |
Removed obsolete tests
Diffstat (limited to 'core/js')
-rw-r--r-- | core/js/tests/specs/sharedialogviewSpec.js | 78 |
1 files changed, 2 insertions, 76 deletions
diff --git a/core/js/tests/specs/sharedialogviewSpec.js b/core/js/tests/specs/sharedialogviewSpec.js index 071c9c58c4e..de6f9944094 100644 --- a/core/js/tests/specs/sharedialogviewSpec.js +++ b/core/js/tests/specs/sharedialogviewSpec.js @@ -158,7 +158,7 @@ describe('OC.Share.ShareDialogView', function() { dialog.render(); expect(dialog.$el.find('#linkPassText').val()).toEqual(''); - expect(dialog.$el.find('#linkPassText').attr('placeholder')).toEqual('Password protected'); + expect(dialog.$el.find('#linkPassText').attr('placeholder')).toEqual('**********'); }); it('update password on enter', function() { $('#allowShareWithLink').val('yes'); @@ -197,7 +197,7 @@ describe('OC.Share.ShareDialogView', function() { dialog.render(); expect(dialog.$el.find('#linkPassText').val()).toEqual(''); - expect(dialog.$el.find('#linkPassText').attr('placeholder')).toEqual('Password protected'); + expect(dialog.$el.find('#linkPassText').attr('placeholder')).toEqual('**********'); }); it('shows share with link checkbox when allowed', function() { $('#allowShareWithLink').val('yes'); @@ -213,80 +213,6 @@ describe('OC.Share.ShareDialogView', function() { expect(dialog.$el.find('#linkCheckbox').length).toEqual(0); }); - it('Reset link when password is enforced and link is toggled', function() { - configModel.set('enforcePasswordForPublicLink', true); - $('#allowShareWithLink').val('yes'); - - dialog.render(); - - // Toggle linkshare - dialog.$el.find('[name=linkCheckbox]').click(); - expect(dialog.$el.find('#linkText').val()).toEqual(''); - - // Set password - dialog.$el.find('#linkPassText').val('foo'); - dialog.$el.find('#linkPassText').trigger(new $.Event('keyup', {keyCode: 13})); - fakeServer.requests[0].respond( - 200, - { 'Content-Type': 'application/json' }, - JSON.stringify({data: {token: 'xyz'}, status: 'success'}) - ); - - // Remove link - dialog.$el.find('[name=linkCheckbox]').click(); - fakeServer.requests[1].respond( - 200, - { 'Content-Type': 'application/json' }, - JSON.stringify({status: 'success'}) - ); - - /* - * Try to share again - * The linkText should be emptied - */ - dialog.$el.find('[name=linkCheckbox]').click(); - expect(dialog.$el.find('#linkText').val()).toEqual(''); - - /* - * Do not set password but untoggle - * Since there is no share this should not result in another request to the server - */ - dialog.$el.find('[name=linkCheckbox]').click(); - expect(fakeServer.requests.length).toEqual(2); - }); - - it('Reset password placeholder when password is enforced and link is toggled', function() { - $('#allowShareWithLink').val('yes'); - - dialog.render(); - - // Toggle linkshare - dialog.$el.find('[name=linkCheckbox]').click(); - expect(dialog.$el.find('#linkPassText').attr('placeholder')).toEqual('Choose a password for the public link'); - - // Set password - dialog.$el.find('#linkPassText').val('foo'); - dialog.$el.find('#linkPassText').trigger(new $.Event('keyup', {keyCode: 13})); - fakeServer.requests[0].respond( - 200, - { 'Content-Type': 'application/json' }, - JSON.stringify({data: {token: 'xyz'}, status: 'success'}) - ); - dialog.render(); - expect(dialog.$el.find('#linkPassText').attr('placeholder')).toEqual('**********'); - - // Remove link - dialog.$el.find('[name=linkCheckbox]').click(); - fakeServer.requests[1].respond( - 200, - { 'Content-Type': 'application/json' }, - JSON.stringify({status: 'success'}) - ); - - // Try to share again - dialog.$el.find('[name=linkCheckbox]').click(); - expect(dialog.$el.find('#linkPassText').attr('placeholder')).toEqual('Choose a password for the public link'); - }); it('shows populated link share when a link share exists', function() { // this is how the OC.Share class does it... var link = parent.location.protocol + '//' + location.host + |