From 8ac683d164549b2e0df46b2340ab5302ab36d0cd Mon Sep 17 00:00:00 2001 From: dhrn <14145706+dhrn@users.noreply.github.com> Date: Tue, 14 Jul 2020 14:14:01 +0530 Subject: [PATCH] [ACA-3613] Inconsistent role value between library views (#5855) * [ACA-3613] Inconsistent role value between library views * [ACA-3670] Inconsistent empty role value between library views * fixed ut --- .../library-role-column/library-role-column.component.spec.ts | 4 ++-- .../library-role-column/library-role-column.component.ts | 2 +- lib/content-services/src/lib/i18n/en.json | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/content-services/src/lib/document-list/components/library-role-column/library-role-column.component.spec.ts b/lib/content-services/src/lib/document-list/components/library-role-column/library-role-column.component.spec.ts index a05ed9a22c..4aef28a9a3 100644 --- a/lib/content-services/src/lib/document-list/components/library-role-column/library-role-column.component.spec.ts +++ b/lib/content-services/src/lib/document-list/components/library-role-column/library-role-column.component.spec.ts @@ -22,7 +22,7 @@ import { NO_ERRORS_SCHEMA, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; import { ContentTestingModule } from '../../../testing/content.testing.module'; import { TranslateModule } from '@ngx-translate/core'; -describe('LibraryNameColumnComponent', () => { +describe('LibraryRoleColumnComponent', () => { let fixture: ComponentFixture; let component: LibraryRoleColumnComponent; @@ -96,6 +96,6 @@ describe('LibraryNameColumnComponent', () => { component.displayText$.subscribe((val) => value = val); fixture.detectChanges(); - expect(value).toBe(''); + expect(value).toBe('LIBRARY.ROLE.NONE'); }); }); diff --git a/lib/content-services/src/lib/document-list/components/library-role-column/library-role-column.component.ts b/lib/content-services/src/lib/document-list/components/library-role-column/library-role-column.component.ts index 4afae95c87..b6641e3717 100644 --- a/lib/content-services/src/lib/document-list/components/library-role-column/library-role-column.component.ts +++ b/lib/content-services/src/lib/document-list/components/library-role-column/library-role-column.component.ts @@ -86,7 +86,7 @@ export class LibraryRoleColumnComponent implements OnInit, OnDestroy { this.displayText$.next('LIBRARY.ROLE.CONSUMER'); break; default: - this.displayText$.next(''); + this.displayText$.next('LIBRARY.ROLE.NONE'); break; } } diff --git a/lib/content-services/src/lib/i18n/en.json b/lib/content-services/src/lib/i18n/en.json index 9bfd855749..27022215bc 100644 --- a/lib/content-services/src/lib/i18n/en.json +++ b/lib/content-services/src/lib/i18n/en.json @@ -401,7 +401,8 @@ "MANAGER": "Manager", "COLLABORATOR": "Collaborator", "CONTRIBUTOR": "Contributor", - "CONSUMER": "Consumer" + "CONSUMER": "Consumer", + "NONE": "Not a member" }, "VISIBILITY": { "PRIVATE": "Private",