[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
This commit is contained in:
dhrn 2020-07-14 14:14:01 +05:30 committed by GitHub
parent 81d3247c87
commit 8ac683d164
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 4 deletions

View File

@ -22,7 +22,7 @@ import { NO_ERRORS_SCHEMA, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { ContentTestingModule } from '../../../testing/content.testing.module'; import { ContentTestingModule } from '../../../testing/content.testing.module';
import { TranslateModule } from '@ngx-translate/core'; import { TranslateModule } from '@ngx-translate/core';
describe('LibraryNameColumnComponent', () => { describe('LibraryRoleColumnComponent', () => {
let fixture: ComponentFixture<LibraryRoleColumnComponent>; let fixture: ComponentFixture<LibraryRoleColumnComponent>;
let component: LibraryRoleColumnComponent; let component: LibraryRoleColumnComponent;
@ -96,6 +96,6 @@ describe('LibraryNameColumnComponent', () => {
component.displayText$.subscribe((val) => value = val); component.displayText$.subscribe((val) => value = val);
fixture.detectChanges(); fixture.detectChanges();
expect(value).toBe(''); expect(value).toBe('LIBRARY.ROLE.NONE');
}); });
}); });

View File

@ -86,7 +86,7 @@ export class LibraryRoleColumnComponent implements OnInit, OnDestroy {
this.displayText$.next('LIBRARY.ROLE.CONSUMER'); this.displayText$.next('LIBRARY.ROLE.CONSUMER');
break; break;
default: default:
this.displayText$.next(''); this.displayText$.next('LIBRARY.ROLE.NONE');
break; break;
} }
} }

View File

@ -401,7 +401,8 @@
"MANAGER": "Manager", "MANAGER": "Manager",
"COLLABORATOR": "Collaborator", "COLLABORATOR": "Collaborator",
"CONTRIBUTOR": "Contributor", "CONTRIBUTOR": "Contributor",
"CONSUMER": "Consumer" "CONSUMER": "Consumer",
"NONE": "Not a member"
}, },
"VISIBILITY": { "VISIBILITY": {
"PRIVATE": "Private", "PRIVATE": "Private",