summaryrefslogtreecommitdiffstats
path: root/core/js/tests/specs
diff options
context:
space:
mode:
authorJohn Molakvoæ <skjnldsv@users.noreply.github.com>2020-01-02 15:53:18 +0100
committerGitHub <noreply@github.com>2020-01-02 15:53:18 +0100
commit237cdb851b22f96728fa45b221cddf380cf45eb7 (patch)
treea82ce64c375b8ff52b4956185766f1baa0705a69 /core/js/tests/specs
parent2a05eebdf5b5677f403878203220c142cfa05208 (diff)
parenta826176f799e04558fb2b3af79562c0b92f280fb (diff)
downloadnextcloud-server-237cdb851b22f96728fa45b221cddf380cf45eb7.tar.gz
nextcloud-server-237cdb851b22f96728fa45b221cddf380cf45eb7.zip
Re-open popover on link password save failure (#18551)
Re-open popover on link password save failure
Diffstat (limited to 'core/js/tests/specs')
-rw-r--r--core/js/tests/specs/sharedialoglinkshareview.js12
1 files changed, 9 insertions, 3 deletions
diff --git a/core/js/tests/specs/sharedialoglinkshareview.js b/core/js/tests/specs/sharedialoglinkshareview.js
index 39bf256d334..479a239a949 100644
--- a/core/js/tests/specs/sharedialoglinkshareview.js
+++ b/core/js/tests/specs/sharedialoglinkshareview.js
@@ -202,14 +202,18 @@ describe('OC.Share.ShareDialogLinkShareView', function () {
});
it('shows the working icon when called', function () {
- view.onPasswordEntered({target: view.$el.find('.linkPassText')});
+ view.onPasswordEntered(jQuery.Event('click', {
+ target: view.$el.find('.linkPassText')
+ }));
expect($workingIcon.hasClass('hidden')).toBeFalsy();
expect(shareModel.saveLinkShare.withArgs({ password: 'myPassword', cid: 123 }).calledOnce).toBeTruthy();
});
it('hides the working icon when saving the password succeeds', function () {
- view.onPasswordEntered({target: view.$el.find('.linkPassText')});
+ view.onPasswordEntered(jQuery.Event('click', {
+ target: view.$el.find('.linkPassText')
+ }));
expect($workingIcon.hasClass('hidden')).toBeFalsy();
expect(shareModel.saveLinkShare.withArgs({ password: 'myPassword', cid: 123 }).calledOnce).toBeTruthy();
@@ -220,7 +224,9 @@ describe('OC.Share.ShareDialogLinkShareView', function () {
});
it('hides the working icon when saving the password fails', function () {
- view.onPasswordEntered({target: view.$el.find('.linkPassText')});
+ view.onPasswordEntered(jQuery.Event('click', {
+ target: view.$el.find('.linkPassText')
+ }));
expect($workingIcon.hasClass('hidden')).toBeFalsy();
expect(shareModel.saveLinkShare.withArgs({ password: 'myPassword', cid: 123 }).calledOnce).toBeTruthy();