[ACS-7427] Process Services improvements and cleanup (#9664)

This commit is contained in:
Denys Vuika
2024-05-20 16:08:47 -04:00
committed by GitHub
parent 96e607b4de
commit e71e2a749a
174 changed files with 1736 additions and 3933 deletions

View File

@@ -16,10 +16,9 @@
*/
import { BrowserActions, BrowserVisibility, DataTableComponentPage, DropdownPage, materialLocators } from '@alfresco/adf-testing';
import { $, by, element, protractor } from 'protractor';
import { $, by, element } from 'protractor';
export class ProcessListDemoPage {
appIdInput = $('input[data-automation-id="app-id"]');
resetButton = element(by.cssContainingText('button span', 'Reset'));
emptyProcessContent = $('.adf-empty-content');
@@ -43,11 +42,8 @@ export class ProcessListDemoPage {
await this.stateDropdown.selectDropdownOption(stateOption);
}
async addAppId(appId: string | number): Promise<void> {
await BrowserActions.click(this.appIdInput);
await this.appIdInput.sendKeys(protractor.Key.ENTER);
await this.appIdInput.clear();
await this.appIdInput.sendKeys(appId);
async addAppId(appId: string): Promise<void> {
await BrowserActions.clearSendKeys(this.appIdInput, appId);
}
async clickResetButton(): Promise<void> {

View File

@@ -20,22 +20,21 @@ import { $ } from 'protractor';
import { TasksListPage } from './tasks-list.page';
export class TaskListDemoPage {
taskListPage = new TasksListPage();
appId = $('input[data-automation-id=\'appId input\']');
itemsPerPage = $('input[data-automation-id=\'items per page\']');
itemsPerPageForm = $(`${materialLocators.Form.field.root}[data-automation-id=\'items per page\']`);
processDefinitionId = $('input[data-automation-id=\'process definition id\']');
processInstanceId = $('input[data-automation-id=\'process instance id\']');
page = $('input[data-automation-id=\'page\']');
pageForm = $(`${materialLocators.Form.field.root}[data-automation-id=\'page\']`);
taskName = $('input[data-automation-id=\'task name\']');
appId = $(`input[data-automation-id='appId input']`);
itemsPerPage = $(`input[data-automation-id='items per page']`);
itemsPerPageForm = $(`${materialLocators.Form.field.root}[data-automation-id='items per page']`);
processDefinitionId = $(`input[data-automation-id='process definition id']`);
processInstanceId = $(`input[data-automation-id='process instance id']`);
page = $(`input[data-automation-id='page']`);
pageForm = $(`${materialLocators.Form.field.root}[data-automation-id='page']`);
taskName = $(`input[data-automation-id='task name']`);
resetButton = $('.app-reset-button button');
dueBefore = $('input[data-automation-id=\'due before\']');
dueAfter = $('input[data-automation-id=\'due after\']');
taskId = $('input[data-automation-id=\'task id\']');
dueBefore = $(`input[data-automation-id='due before']`);
dueAfter = $(`input[data-automation-id='due after']`);
taskId = $(`input[data-automation-id='task id']`);
stateDropDownArrow = $(`${materialLocators.Form.field.root}[data-automation-id=\'state\']`);
stateDropDownArrow = $(`${materialLocators.Form.field.root}[data-automation-id='state']`);
stateDropdown = new DropdownPage(this.stateDropDownArrow);
taskList(): TasksListPage {
@@ -131,5 +130,4 @@ export class TaskListDemoPage {
getAllProcessInstanceIds(): Promise<any> {
return this.taskList().getDataTable().getAllRowsColumnValues('Process Instance Id');
}
}

View File

@@ -60,7 +60,7 @@ describe('Process List Test', () => {
insertAppId: 'Insert App ID'
};
let appWithDateFieldId: string | number;
let appWithDateFieldId: string;
let procWithDate: ProcessInstanceRepresentation;
let completedProcWithDate: ProcessInstanceRepresentation;
let completedProcWithUserWidget: ProcessInstanceRepresentation;
@@ -83,7 +83,7 @@ describe('Process List Test', () => {
await processUtil.startProcessOfApp(appUserWidgetModel.name, processName.procWithUserWidget);
completedProcWithUserWidget = await processUtil.startProcessOfApp(appUserWidgetModel.name, processName.completedProcWithUserWidget);
appWithDateFieldId = await applicationsUtil.getAppDefinitionId(appDateModel.id);
appWithDateFieldId = (await applicationsUtil.getAppDefinitionId(appDateModel.id)).toString();
const procWithDateTaskId = await processUtil.getProcessTaskId(completedProcWithDate.id);