mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-1826] Task Header - The priority property should be editable (#2768)
* [ADF-1826] Task Header - The priority property should be editable * [ADF-1826] - Fixed isEditble typo * [ADF-1826] - Adding unit test - checking the priority value is displayed * [ADF-1826] fixed unit test * [ADF-1826] fixed unit test (replaced fit with it)
This commit is contained in:
committed by
Maurizio Vitale
parent
791e443a72
commit
321c4f48e1
@@ -107,6 +107,14 @@ describe('TaskHeaderComponent', () => {
|
||||
expect(formNameEl.nativeElement.innerText).toBe('Wilbur Adams');
|
||||
});
|
||||
|
||||
it('should display priority', () => {
|
||||
component.taskDetails.priority = 27;
|
||||
component.ngOnChanges({});
|
||||
fixture.detectChanges();
|
||||
let formNameEl = fixture.debugElement.query(By.css('[data-automation-id="card-textitem-value-priority"]'));
|
||||
expect(formNameEl.nativeElement.innerText).toBe('27');
|
||||
});
|
||||
|
||||
it('should set editable to false if the task has already completed', () => {
|
||||
component.taskDetails.endDate = new Date('05/05/2002');
|
||||
component.ngOnChanges({});
|
||||
|
@@ -86,7 +86,8 @@ export class TaskHeaderComponent implements OnChanges, OnInit {
|
||||
{
|
||||
label: 'ADF_TASK_LIST.PROPERTIES.PRIORITY',
|
||||
value: this.taskDetails.priority,
|
||||
key: 'priority'
|
||||
key: 'priority',
|
||||
editable: true
|
||||
}
|
||||
),
|
||||
new CardViewDateItemModel(
|
||||
|
Reference in New Issue
Block a user