mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-4448] Automate Start and Save a task with a form. (#4876)
* automated Start and save a task with a form. * crc's * test title updated * test title updated * start process with start event form automated * moved the expect statements to the tests. * fix circular dependency * deleting the standalonetask in afterAll * split the tests for better readability * split the tests for better readability
This commit is contained in:
committed by
Eugenio Romano
parent
938286671d
commit
be234f227f
@@ -28,6 +28,10 @@ export class NumberWidget {
|
||||
return BrowserActions.getText(label);
|
||||
}
|
||||
|
||||
getFieldValue(fieldId) {
|
||||
return this.formFields.getFieldValue(fieldId);
|
||||
}
|
||||
|
||||
setFieldValue(fieldId, value) {
|
||||
return this.formFields.setValueInInputById(fieldId, value);
|
||||
}
|
||||
|
@@ -18,6 +18,7 @@
|
||||
import { by, element, Key, protractor, browser } from 'protractor';
|
||||
import { BrowserVisibility } from '../../core/utils/browser-visibility';
|
||||
import { BrowserActions } from '../../core/utils/browser-actions';
|
||||
import { FormFields } from '../../core/pages/form/formFields';
|
||||
|
||||
export class StartProcessCloudPage {
|
||||
|
||||
@@ -83,11 +84,7 @@ export class StartProcessCloudPage {
|
||||
|
||||
checkStartProcessButtonIsEnabled() {
|
||||
BrowserVisibility.waitUntilElementIsClickable(this.startProcessButton);
|
||||
expect(this.startProcessButton.isEnabled()).toBe(true);
|
||||
}
|
||||
|
||||
checkStartProcessButtonIsDisabled() {
|
||||
expect(this.startProcessButton.isEnabled()).toBe(false);
|
||||
return this.startProcessButton.isEnabled();
|
||||
}
|
||||
|
||||
clickStartProcessButton() {
|
||||
@@ -114,4 +111,8 @@ export class StartProcessCloudPage {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
formFields() {
|
||||
return new FormFields();
|
||||
}
|
||||
}
|
||||
|
@@ -29,6 +29,7 @@ export class StartTasksCloudPage {
|
||||
startButtonEnabled = element(by.css('button[id="button-start"]:not(disabled)'));
|
||||
cancelButton = element(by.css('button[id="button-cancel"]'));
|
||||
form = element.all(by.css('adf-cloud-start-task form')).first();
|
||||
formDefinitionSelector = element(by.css('.adf-form-definition-selector'));
|
||||
|
||||
checkFormIsDisplayed() {
|
||||
BrowserVisibility.waitUntilElementIsVisible(this.form);
|
||||
@@ -102,4 +103,10 @@ export class StartTasksCloudPage {
|
||||
clearField(locator) {
|
||||
BrowserActions.clearSendKeys(locator, '');
|
||||
}
|
||||
|
||||
selectFormDefinition(option: string) {
|
||||
BrowserActions.click(this.formDefinitionSelector);
|
||||
const row = element(by.cssContainingText('mat-option span', option));
|
||||
BrowserActions.click(row);
|
||||
}
|
||||
}
|
||||
|
@@ -26,6 +26,7 @@ export class TaskFormCloudComponent {
|
||||
completeButton = element(by.css('button[id="adf-form-complete"]'));
|
||||
releaseButton = element(by.css('button[adf-cloud-unclaim-task]'));
|
||||
saveButton = element(by.css('button[id="adf-form-save"]'));
|
||||
claimButton = element(by.css('button[adf-cloud-claim-task]'));
|
||||
form = element(by.css('adf-cloud-form'));
|
||||
|
||||
checkCompleteButtonIsDisplayed() {
|
||||
@@ -48,6 +49,11 @@ export class TaskFormCloudComponent {
|
||||
return this;
|
||||
}
|
||||
|
||||
clickClaimButton() {
|
||||
BrowserActions.click(this.claimButton);
|
||||
return this;
|
||||
}
|
||||
|
||||
formFields() {
|
||||
return new FormFields();
|
||||
}
|
||||
|
@@ -87,6 +87,10 @@ export class TaskListCloudComponentPage {
|
||||
return this.dataTable.checkContentIsDisplayed(column.id, taskId);
|
||||
}
|
||||
|
||||
checkContentIsNotDisplayedById(taskId) {
|
||||
return this.dataTable.checkContentIsNotDisplayed(column.id, taskId);
|
||||
}
|
||||
|
||||
checkContentIsDisplayedByProcessInstanceId(taskName) {
|
||||
return this.dataTable.checkContentIsDisplayed(column.processInstanceId, taskName);
|
||||
}
|
||||
|
Reference in New Issue
Block a user