[AAE-4624] - fix user initials for identity user with bpm (#6717)

This commit is contained in:
Silviu Popa
2021-02-23 15:39:30 +02:00
committed by GitHub
parent 20500bb151
commit d4b3e820bb
2 changed files with 10 additions and 2 deletions

View File

@@ -19,8 +19,8 @@
data-automation-id="adf-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="ecmUser$ | async as ecmUser">
<div *ngIf="ecmUser.avatarId; else initialTemplate" class="adf-userinfo-profile-container">
<div *ngIf="ecmUser$ | async as ecmUser; else initialTemplate">
<div *ngIf="ecmUser.avatarId" class="adf-userinfo-profile-container">
<img id="logged-user-img" [src]="getEcmAvatar(ecmUser.avatarId)" alt="user-info-profile-button"
class="adf-userinfo-profile-image"/>
</div>

View File

@@ -554,6 +554,14 @@ describe('User info component', () => {
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(() => {
fixture.detectChanges();