Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ACS-6222] Fixed missing display name for groups #9034

Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,21 @@ describe('UserNameColumnComponent', () => {
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', () => {
component.context = {
row: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export class UserNameColumnComponent implements OnInit {

private updateGroup(group: Group) {
if (group) {
this.displayText$.next(group.displayName);
group.displayName ? this.displayText$.next(group.displayName) : this.displayText$.next(group.id);
AleksanderSklorz marked this conversation as resolved.
Show resolved Hide resolved
}
}
}