mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ACA-4307] Move Process task JSON mapping e2e process and task names to ADF resource file (#6778)
* [ACA-4307] Move Process task JSON mapping e2e process and task names to ADF resource file * * Moved display widget methods to ADF testing pack
This commit is contained in:
@@ -17,13 +17,15 @@
|
|||||||
|
|
||||||
import { FormFields } from '../form-fields';
|
import { FormFields } from '../form-fields';
|
||||||
import { by, element, Locator } from 'protractor';
|
import { by, element, Locator } from 'protractor';
|
||||||
import { BrowserVisibility } from '../../../utils/public-api';
|
import { BrowserVisibility, BrowserActions } from '../../../utils/public-api';
|
||||||
|
import { EditJsonDialog } from '../../../dialog/public-api';
|
||||||
|
|
||||||
export class DisplayValueWidgetPage {
|
export class DisplayValueWidgetPage {
|
||||||
|
|
||||||
formFields: FormFields = new FormFields();
|
formFields: FormFields = new FormFields();
|
||||||
labelLocator: Locator = by.css("label[class*='adf-label']");
|
labelLocator: Locator = by.css("label[class*='adf-label']");
|
||||||
inputLocator: Locator = by.css('input');
|
inputLocator: Locator = by.css('input');
|
||||||
|
editJsonDialog = new EditJsonDialog();
|
||||||
|
|
||||||
getFieldLabel(fieldId): Promise<string> {
|
getFieldLabel(fieldId): Promise<string> {
|
||||||
return this.formFields.getFieldLabel(fieldId, this.labelLocator);
|
return this.formFields.getFieldLabel(fieldId, this.labelLocator);
|
||||||
@@ -51,4 +53,19 @@ export class DisplayValueWidgetPage {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async clickOnDisplayJsonValueWidget(fieldId: string) {
|
||||||
|
const jsonButton = element(by.css(`adf-form-field div[id='field-${fieldId}-container'] button`));
|
||||||
|
await BrowserActions.click(jsonButton);
|
||||||
|
await this.editJsonDialog.checkDialogIsDisplayed();
|
||||||
|
}
|
||||||
|
|
||||||
|
async getDisplayJsonValueDialogContent(): Promise<any> {
|
||||||
|
return JSON.parse(await (<any> this.editJsonDialog.getDialogContent()));
|
||||||
|
}
|
||||||
|
|
||||||
|
async closeDisplayJsonValuedDialog() {
|
||||||
|
await this.editJsonDialog.clickCloseButton();
|
||||||
|
await this.editJsonDialog.checkDialogIsNotDisplayed();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -125,7 +125,8 @@
|
|||||||
"candidateusersgroup": "candidateusersgroup",
|
"candidateusersgroup": "candidateusersgroup",
|
||||||
"candidateUserProcess": "candidateuserprocess",
|
"candidateUserProcess": "candidateuserprocess",
|
||||||
"outputVariablesMapping": "output-variables-mapping",
|
"outputVariablesMapping": "output-variables-mapping",
|
||||||
"outcomeVisibilityProcess": "outcome-visib-process"
|
"outcomeVisibilityProcess": "outcome-visib-process",
|
||||||
|
"restConnectorProcess": "rest-connector-process"
|
||||||
},
|
},
|
||||||
"forms": {
|
"forms": {
|
||||||
"tabVisibilityFields": {
|
"tabVisibilityFields": {
|
||||||
@@ -181,7 +182,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"formWithJsonWidget": {
|
"formWithJsonWidget": {
|
||||||
"name": "form-with-json-widget"
|
"name": "form-with-json-widget",
|
||||||
|
"widgets": {
|
||||||
|
"displayJsonWidgetId": "DisplayJsonWidgetId"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"formWithAllWidgets": {
|
"formWithAllWidgets": {
|
||||||
"name": "form-with-all-widgets"
|
"name": "form-with-all-widgets"
|
||||||
@@ -274,7 +278,8 @@
|
|||||||
"candidateUserTask": "candidateUserTask",
|
"candidateUserTask": "candidateUserTask",
|
||||||
"salesUserTask": "salesuser task",
|
"salesUserTask": "salesuser task",
|
||||||
"hrUserTask": "hruser task",
|
"hrUserTask": "hruser task",
|
||||||
"attachLocalFile": "attach local file"
|
"attachLocalFile": "attach local file",
|
||||||
|
"userTaskToShowRestResult": "UserTaskToShowRestResult"
|
||||||
},
|
},
|
||||||
"security": [
|
"security": [
|
||||||
{
|
{
|
||||||
@@ -288,7 +293,17 @@
|
|||||||
"users": ["hruser"]
|
"users": ["hruser"]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"infrastructure": { "connectors": { "restconnector": {} }, "bridges": {} }
|
"infrastructure": { "connectors": { "restconnector": {} }, "bridges": {} },
|
||||||
|
"connectors": {
|
||||||
|
"restConnector": {
|
||||||
|
"response": {
|
||||||
|
"userId": 1,
|
||||||
|
"id": 1,
|
||||||
|
"title": "delectus aut autem",
|
||||||
|
"completed": false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"SUB_PROCESS_APP": {
|
"SUB_PROCESS_APP": {
|
||||||
"name": "subprocessapp",
|
"name": "subprocessapp",
|
||||||
|
Reference in New Issue
Block a user