[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:
mihai sirghe
2017-12-06 22:46:28 +02:00
committed by Maurizio Vitale
parent 791e443a72
commit 321c4f48e1
5 changed files with 14 additions and 5 deletions

View File

@@ -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({});

View File

@@ -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(