[ACA-4052] - Add today option back (#6249)

This commit is contained in:
Silviu Popa
2020-10-15 20:57:54 +03:00
committed by GitHub
parent 6de13bb4b7
commit 9d22f5505f
2 changed files with 20 additions and 0 deletions

View File

@@ -562,6 +562,25 @@ describe('EditTaskFilterCloudComponent', () => {
component.onFilterChange();
});
it('should have correct options on dueDate filters', () => {
component.appName = 'fake';
component.filterProperties = ['appName', 'processInstanceId', 'priority', 'dueDateRange'];
const taskFilterIdChange = new SimpleChange(undefined, 'mock-task-filter-id', true);
component.ngOnChanges({ 'id': taskFilterIdChange });
fixture.detectChanges();
const stateElement = fixture.debugElement.nativeElement.querySelector('[data-automation-id="adf-cloud-edit-process-property-dueDateRange"] .mat-select-trigger');
stateElement.click();
fixture.detectChanges();
const sortOptions = fixture.debugElement.queryAll(By.css('.mat-option-text'));
expect(sortOptions.length).toEqual(5);
sortOptions[1].nativeElement.click('TODAY');
sortOptions[2].nativeElement.click('TOMOROW');
sortOptions[3].nativeElement.click('NEXT_7_DAYS');
sortOptions[4].nativeElement.click('RANGE');
});
it('should update form on date range value is updated', (done) => {
component.appName = 'fake';
component.filterProperties = ['appName', 'processInstanceId', 'priority', 'dueDateRange'];

View File

@@ -324,6 +324,7 @@ export class EditTaskFilterCloudComponent extends BaseEditTaskFilterCloudCompone
},
dateFilterOptions: [
DateCloudFilterType.NO_DATE,
DateCloudFilterType.TODAY,
DateCloudFilterType.TOMORROW,
DateCloudFilterType.NEXT_7_DAYS,
DateCloudFilterType.RANGE