[ADF-4270] Fix empty name cell in process header cloud (#4557)

This commit is contained in:
arditdomi
2019-04-05 10:38:56 +01:00
committed by Eugenio Romano
parent 58e0e44693
commit 7bb3c00a75
3 changed files with 16 additions and 2 deletions

View File

@@ -209,6 +209,7 @@
"PROPERTIES": {
"ID": "ID",
"NAME": "Name",
"NAME_DEFAULT": "No name",
"DESCRIPTION": "Description",
"DESCRIPTION_DEFAULT": "No description",
"STATUS": "Status",

View File

@@ -101,7 +101,19 @@ describe('ProcessHeaderCloudComponent', () => {
});
}));
it('should display placeholder if no description is avilable', async(() => {
it('should display placeholder if no name is available', async(() => {
processInstanceDetailsCloudMock.name = null;
component.ngOnChanges();
fixture.detectChanges();
fixture.whenStable().then(() => {
const valueEl = fixture.debugElement.query(By.css('[data-automation-id="card-textitem-value-name"] span'));
expect(valueEl.nativeElement.innerText).toBe('ADF_CLOUD_PROCESS_HEADER.PROPERTIES.NAME_DEFAULT');
});
}));
it('should display placeholder if no description is available', async(() => {
processInstanceDetailsCloudMock.description = null;
component.ngOnChanges();
fixture.detectChanges();

View File

@@ -83,7 +83,8 @@ export class ProcessHeaderCloudComponent implements OnChanges {
{
label: 'ADF_CLOUD_PROCESS_HEADER.PROPERTIES.NAME',
value: this.processInstanceDetails.name,
key: 'name'
key: 'name',
default: this.translationService.instant('ADF_CLOUD_PROCESS_HEADER.PROPERTIES.NAME_DEFAULT')
}),
new CardViewTextItemModel(
{