mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ACS-6222] Fixed missing display name for groups (#9034)
* [ACS-6222] fixed missing display name for groups * [ACS-6222] cr fix
This commit is contained in:
committed by
GitHub
parent
2d3175ef4a
commit
b847383249
@@ -104,6 +104,21 @@ describe('UserNameColumnComponent', () => {
|
|||||||
expect(element.querySelector('[title="fake authority"]').textContent.trim()).toBe('fake authority');
|
expect(element.querySelector('[title="fake authority"]').textContent.trim()).toBe('fake authority');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('should display group id when display name is not provided', () => {
|
||||||
|
component.context = {
|
||||||
|
row: {
|
||||||
|
obj: {
|
||||||
|
entry: {
|
||||||
|
group: { id: 'fake_group_id' }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
component.ngOnInit();
|
||||||
|
fixture.detectChanges();
|
||||||
|
expect(element.querySelector('[title="fake_group_id"]').textContent.trim()).toBe('fake_group_id');
|
||||||
|
});
|
||||||
|
|
||||||
it('should render group for authorityId', () => {
|
it('should render group for authorityId', () => {
|
||||||
component.context = {
|
component.context = {
|
||||||
row: {
|
row: {
|
||||||
|
@@ -72,7 +72,7 @@ export class UserNameColumnComponent implements OnInit {
|
|||||||
|
|
||||||
private updateGroup(group: Group) {
|
private updateGroup(group: Group) {
|
||||||
if (group) {
|
if (group) {
|
||||||
this.displayText$.next(group.displayName);
|
this.displayText$.next(group.displayName || group.id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user