mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-19 17:14:57 +00:00
[ADF-1822] Process header - Should show the businessKey property (#2549)
* Add the businessKey in the process header * Add unit test
This commit is contained in:
parent
2588bbda7d
commit
cb50ab7e6a
@ -151,4 +151,20 @@ describe('ProcessInstanceHeaderComponent', () => {
|
|||||||
let valueEl = fixture.nativeElement.querySelector('[data-automation-id="card-textitem-value-description"]');
|
let valueEl = fixture.nativeElement.querySelector('[data-automation-id="card-textitem-value-description"]');
|
||||||
expect(valueEl.innerText).toBe('ADF_PROCESS_LIST.PROPERTIES.DESCRIPTION_DEFAULT');
|
expect(valueEl.innerText).toBe('ADF_PROCESS_LIST.PROPERTIES.DESCRIPTION_DEFAULT');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('should display businessKey value', () => {
|
||||||
|
component.processInstance.businessKey = 'fakeBusinessKey';
|
||||||
|
component.ngOnChanges({});
|
||||||
|
fixture.detectChanges();
|
||||||
|
let valueEl = fixture.nativeElement.querySelector('[data-automation-id="card-textitem-value-businessKey"]');
|
||||||
|
expect(valueEl.innerText).toBe('fakeBusinessKey');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should display default key if no businessKey', () => {
|
||||||
|
component.processInstance.businessKey = null;
|
||||||
|
component.ngOnChanges({});
|
||||||
|
fixture.detectChanges();
|
||||||
|
let valueEl = fixture.nativeElement.querySelector('[data-automation-id="card-textitem-value-businessKey"]');
|
||||||
|
expect(valueEl.innerText).toBe('ADF_PROCESS_LIST.PROPERTIES.BUSINESS_KEY_DEFAULT');
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
@ -59,6 +59,13 @@ export class ProcessInstanceHeaderComponent implements OnChanges {
|
|||||||
key: 'category',
|
key: 'category',
|
||||||
default: 'ADF_PROCESS_LIST.PROPERTIES.CATEGORY_DEFAULT'
|
default: 'ADF_PROCESS_LIST.PROPERTIES.CATEGORY_DEFAULT'
|
||||||
}),
|
}),
|
||||||
|
new CardViewTextItemModel(
|
||||||
|
{
|
||||||
|
label: 'ADF_PROCESS_LIST.PROPERTIES.BUSINESS_KEY',
|
||||||
|
value: this.processInstance.businessKey,
|
||||||
|
key: 'businessKey',
|
||||||
|
default: 'ADF_PROCESS_LIST.PROPERTIES.BUSINESS_KEY_DEFAULT'
|
||||||
|
}),
|
||||||
new CardViewTextItemModel(
|
new CardViewTextItemModel(
|
||||||
{
|
{
|
||||||
label: 'ADF_PROCESS_LIST.PROPERTIES.CREATED_BY',
|
label: 'ADF_PROCESS_LIST.PROPERTIES.CREATED_BY',
|
||||||
|
@ -21,6 +21,8 @@
|
|||||||
"CREATED_BY": "Created By",
|
"CREATED_BY": "Created By",
|
||||||
"CREATED_BY_DEFAULT": "No assignee",
|
"CREATED_BY_DEFAULT": "No assignee",
|
||||||
"CREATED": "Created",
|
"CREATED": "Created",
|
||||||
|
"BUSINESS_KEY": "Business key",
|
||||||
|
"BUSINESS_KEY_DEFAULT": "None",
|
||||||
"DESCRIPTION": "Description",
|
"DESCRIPTION": "Description",
|
||||||
"DESCRIPTION_DEFAULT": "No description",
|
"DESCRIPTION_DEFAULT": "No description",
|
||||||
"ID": "Id"
|
"ID": "Id"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user