mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[AAE-4624] - fix user initials for identity user with bpm (#6717)
This commit is contained in:
@@ -19,8 +19,8 @@
|
|||||||
data-automation-id="adf-user-profile">
|
data-automation-id="adf-user-profile">
|
||||||
<div class="adf-userinfo-button-profile" id="user-profile">
|
<div class="adf-userinfo-button-profile" id="user-profile">
|
||||||
<div *ngIf="identityUser$ | async as identityUser; else showBpmAndEcmUserImage" id="identity-user-image">
|
<div *ngIf="identityUser$ | async as identityUser; else showBpmAndEcmUserImage" id="identity-user-image">
|
||||||
<div *ngIf="ecmUser$ | async as ecmUser">
|
<div *ngIf="ecmUser$ | async as ecmUser; else initialTemplate">
|
||||||
<div *ngIf="ecmUser.avatarId; else initialTemplate" class="adf-userinfo-profile-container">
|
<div *ngIf="ecmUser.avatarId" class="adf-userinfo-profile-container">
|
||||||
<img id="logged-user-img" [src]="getEcmAvatar(ecmUser.avatarId)" alt="user-info-profile-button"
|
<img id="logged-user-img" [src]="getEcmAvatar(ecmUser.avatarId)" alt="user-info-profile-button"
|
||||||
class="adf-userinfo-profile-image"/>
|
class="adf-userinfo-profile-image"/>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -554,6 +554,14 @@ describe('User info component', () => {
|
|||||||
getCurrentUserInfoStub = spyOn(identityUserService, 'getCurrentUserInfo').and.returnValue(identityUserMock);
|
getCurrentUserInfoStub = spyOn(identityUserService, 'getCurrentUserInfo').and.returnValue(identityUserMock);
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
it('should show the identity user initials if is not ecm user', async () => {
|
||||||
|
fixture.detectChanges();
|
||||||
|
await fixture.whenStable();
|
||||||
|
fixture.detectChanges();
|
||||||
|
expect(element.querySelector('#userinfo_container')).toBeDefined();
|
||||||
|
expect(element.querySelector('#user-initials-image').textContent).toContain('ff');
|
||||||
|
});
|
||||||
|
|
||||||
it('should able to fetch identity userInfo', async(() => {
|
it('should able to fetch identity userInfo', async(() => {
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user