[AAE-5880] Add Tasks Create, DueDate range testing methods in the testing page (#7549)

* [AAE-5880] Add Tasks Create, DueDate range testing methods in the testing page

* [AAE-5880] fixed process definition name dropdown select

Co-authored-by: Tomasz <tomasz.gnyp@hyland.com>
This commit is contained in:
siva kumar
2022-03-18 17:19:23 +05:30
committed by GitHub
parent f992ea06df
commit 1c2d9ee830
3 changed files with 36 additions and 0 deletions

View File

@@ -94,6 +94,7 @@ export class DropdownPage {
async selectDropdownOption(option: string): Promise<void> { async selectDropdownOption(option: string): Promise<void> {
await this.clickDropdown(); await this.clickDropdown();
await this.checkOptionsPanelIsDisplayed();
await this.selectOption(option); await this.selectOption(option);
} }
} }

View File

@@ -123,6 +123,9 @@ export class EditProcessFilterCloudComponentPage {
} }
async setProcessDefinitionNameDropDown(option: string) { async setProcessDefinitionNameDropDown(option: string) {
await this.processDefinitionNameDropdown.checkDropdownIsVisible();
await this.processDefinitionNameDropdown.checkDropdownIsClickable();
await this.processDefinitionNameDropdown.checkOptionIsDisplayed('ALL');
await this.processDefinitionNameDropdown.selectDropdownOption(option); await this.processDefinitionNameDropdown.selectDropdownOption(option);
} }

View File

@@ -23,6 +23,7 @@ import { DropdownPage } from '../../core/pages/material/dropdown.page';
import { DataTableComponentPage } from '../../core/pages/data-table-component.page'; import { DataTableComponentPage } from '../../core/pages/data-table-component.page';
import { PeopleCloudComponentPage } from './people-cloud-component.page'; import { PeopleCloudComponentPage } from './people-cloud-component.page';
import { GroupCloudComponentPage } from './group-cloud-component.page'; import { GroupCloudComponentPage } from './group-cloud-component.page';
import { DatePickerPage } from '../../core/pages/material/date-picker.page';
export type StatusType = 'All' | 'Created' | 'Assigned' | 'Cancelled' | 'Suspended' | 'Completed'; export type StatusType = 'All' | 'Created' | 'Assigned' | 'Cancelled' | 'Suspended' | 'Completed';
@@ -52,6 +53,11 @@ export class EditTaskFilterCloudComponentPage {
orderDropdown = new DropdownPage($(`mat-select[data-automation-id='adf-cloud-edit-task-property-order']`)); orderDropdown = new DropdownPage($(`mat-select[data-automation-id='adf-cloud-edit-task-property-order']`));
completedDateDropdown = new DropdownPage($(`mat-select[data-automation-id="adf-cloud-edit-process-property-completedDateRange"]`)); completedDateDropdown = new DropdownPage($(`mat-select[data-automation-id="adf-cloud-edit-process-property-completedDateRange"]`));
assignmentDropdown = new DropdownPage($(`.adf-task-assignment-filter`)); assignmentDropdown = new DropdownPage($(`.adf-task-assignment-filter`));
processDefinitionNameDropdown = new DropdownPage($('mat-select[data-automation-id="adf-cloud-edit-task-property-processDefinitionName"]'));
createdDateRangeDropdown = new DropdownPage($(`mat-select[data-automation-id='adf-cloud-edit-process-property-createdDateRange']`));
createdDateRangeWithin = new DatePickerPage($(`mat-datepicker-toggle[data-automation-id='adf-cloud-edit-process-property-date-range-createdDateRange']`));
dueDateRangeDropdown = new DropdownPage($(`mat-select[data-automation-id='adf-cloud-edit-process-property-dueDateRange']`));
dueDateRangeWithin = new DatePickerPage($(`mat-datepicker-toggle[data-automation-id='adf-cloud-edit-picker-date-range-dueDateRange']`));
editTaskFilterDialogPage = new EditTaskFilterDialogPage(); editTaskFilterDialogPage = new EditTaskFilterDialogPage();
peopleCloudComponent = new PeopleCloudComponentPage(); peopleCloudComponent = new PeopleCloudComponentPage();
@@ -240,6 +246,26 @@ export class EditTaskFilterCloudComponentPage {
return this.appNameDropdown.getSelectedOptionText(); return this.appNameDropdown.getSelectedOptionText();
} }
async setCreatedDateRangeDropDown(option: string): Promise<void> {
await this.createdDateRangeDropdown.checkDropdownIsVisible();
await this.createdDateRangeDropdown.selectDropdownOption(option);
}
async setCreatedDateRangeWithin(start: Date, end: Date): Promise<void> {
await this.setCreatedDateRangeDropDown('Date within');
await this.createdDateRangeWithin.setDateRange(start, end);
}
async setDueDateRangeDropDown(option: string): Promise<void> {
await this.dueDateRangeDropdown.checkDropdownIsVisible();
await this.dueDateRangeDropdown.selectDropdownOption(option);
}
async setDueDateRangeWithin(start: Date, end: Date): Promise<void> {
await this.setDueDateRangeDropDown('Date within');
await this.dueDateRangeWithin.setDateRange(start, end);
}
async setId(option: string): Promise<void> { async setId(option: string): Promise<void> {
await this.setProperty('taskId', option); await this.setProperty('taskId', option);
} }
@@ -268,6 +294,12 @@ export class EditTaskFilterCloudComponentPage {
await this.setProperty('processInstanceId', option); await this.setProperty('processInstanceId', option);
} }
async setProcessDefinitionNameDropDown(option: string): Promise<void> {
await browser.waitForAngular();
await this.processDefinitionNameDropdown.checkDropdownIsVisible();
await this.processDefinitionNameDropdown.selectDropdownOption(option);
}
async setProperty(property: string, option: string): Promise<void> { async setProperty(property: string, option: string): Promise<void> {
const locator = $('input[data-automation-id="adf-cloud-edit-task-property-' + property + '"]'); const locator = $('input[data-automation-id="adf-cloud-edit-task-property-' + property + '"]');
await BrowserVisibility.waitUntilElementIsVisible(locator); await BrowserVisibility.waitUntilElementIsVisible(locator);