mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-18 07:23:03 +00:00
CST-6110 changes for robust password error
This commit is contained in:
@@ -228,6 +228,23 @@ describe('ProfilePageComponent', () => {
|
|||||||
expect(epersonService.patch).toHaveBeenCalledWith(user, operations);
|
expect(epersonService.patch).toHaveBeenCalledWith(user, operations);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
describe('when password is filled in, and is weak', () => {
|
||||||
|
let result;
|
||||||
|
let operations;
|
||||||
|
|
||||||
|
it('should return call epersonService.patch', () => {
|
||||||
|
(epersonService.patch as jasmine.Spy).and.returnValue(createFailedRemoteDataObject$('Error', 422));
|
||||||
|
component.setPasswordValue('testest');
|
||||||
|
|
||||||
|
component.setInvalid(false);
|
||||||
|
operations = [{ op: 'add', path: '/password', value: 'testest' }];
|
||||||
|
result = component.updateSecurity();
|
||||||
|
expect(result).toEqual(true);
|
||||||
|
expect(epersonService.patch).toHaveBeenCalledWith(user, operations);
|
||||||
|
expect(component.isRobustPasswordError.value).toBeTrue();
|
||||||
|
});
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('canChangePassword$', () => {
|
describe('canChangePassword$', () => {
|
||||||
|
@@ -3056,7 +3056,7 @@
|
|||||||
|
|
||||||
"profile.security.form.notifications.error.not-same": "The provided passwords are not the same.",
|
"profile.security.form.notifications.error.not-same": "The provided passwords are not the same.",
|
||||||
|
|
||||||
"profile.security.form.notifications.error.robust-password": "Please select a more robust password.",
|
"profile.security.form.error.robust-password": "Please select a more robust password.",
|
||||||
|
|
||||||
"profile.title": "Update Profile",
|
"profile.title": "Update Profile",
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user