mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
[AAE-4824] Add more widgets to resources and cloud related methods (#6865)
* Add more widgets to resources * move methods for random process & task name to ADF * Add some task related methods * Add checkTaskListAndContentAreLoaded method
This commit is contained in:
@@ -107,4 +107,18 @@ export class StringUtil {
|
|||||||
return fileNames;
|
return fileNames;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Generates a random name for a process
|
||||||
|
*/
|
||||||
|
static generateProcessName(): string {
|
||||||
|
return 'process_' + StringUtil.generateRandomString(5);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Generates a random name for a task
|
||||||
|
*/
|
||||||
|
static generateUserTaskName(): string {
|
||||||
|
return 'userTask_' + StringUtil.generateRandomString(5);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -80,6 +80,11 @@ export class TaskFormCloudComponent {
|
|||||||
await browser.sleep(500);
|
await browser.sleep(500);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async checkAndClickCompleteButton(): Promise<void> {
|
||||||
|
await this.isCompleteButtonEnabled();
|
||||||
|
await this.clickCompleteButton();
|
||||||
|
}
|
||||||
|
|
||||||
async checkFormOutcomeButtonIsDisplayedByName(name: string): Promise<void> {
|
async checkFormOutcomeButtonIsDisplayedByName(name: string): Promise<void> {
|
||||||
await BrowserVisibility.waitUntilElementIsVisible(element(by.css(`button[id="adf-form-${name}"]`)));
|
await BrowserVisibility.waitUntilElementIsVisible(element(by.css(`button[id="adf-form-${name}"]`)));
|
||||||
}
|
}
|
||||||
@@ -150,9 +155,16 @@ export class TaskFormCloudComponent {
|
|||||||
return this.completeButton;
|
return this.completeButton;
|
||||||
}
|
}
|
||||||
|
|
||||||
async waitTillTaskFormDisplayed() {
|
async waitTillTaskFormDisplayed(): Promise<void> {
|
||||||
await this.checkFormIsDisplayed();
|
await this.checkFormIsDisplayed();
|
||||||
await this.formFields().checkFormIsDisplayed();
|
await this.formFields().checkFormIsDisplayed();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async checkFormAndCompleteTask(): Promise<void> {
|
||||||
|
await this.waitTillTaskFormDisplayed();
|
||||||
|
await this.checkCompleteButtonIsDisplayed();
|
||||||
|
await this.isCompleteButtonEnabled();
|
||||||
|
await this.clickCompleteButton();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -117,6 +117,11 @@ export class TaskListCloudComponentPage {
|
|||||||
await BrowserVisibility.waitUntilElementIsVisible(this.taskList);
|
await BrowserVisibility.waitUntilElementIsVisible(this.taskList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async checkTaskListAndContentAreLoaded(): Promise<void> {
|
||||||
|
await this.checkTaskListIsLoaded();
|
||||||
|
await this.getDataTable().waitTillContentLoaded();
|
||||||
|
}
|
||||||
|
|
||||||
async getNoTasksFoundMessage(): Promise<string> {
|
async getNoTasksFoundMessage(): Promise<string> {
|
||||||
return BrowserActions.getText(this.noTasksFound);
|
return BrowserActions.getText(this.noTasksFound);
|
||||||
}
|
}
|
||||||
|
@@ -215,10 +215,18 @@
|
|||||||
"name": "requirednumbervisibility"
|
"name": "requirednumbervisibility"
|
||||||
},
|
},
|
||||||
"mealform": {
|
"mealform": {
|
||||||
"name": "mealform"
|
"name": "mealform",
|
||||||
|
"widgets": {
|
||||||
|
"inputMeal": "meal"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"resultcollectionform": {
|
"resultcollectionform": {
|
||||||
"name": "resultcollectionform"
|
"name": "resultcollectionform",
|
||||||
|
"widgets": {
|
||||||
|
"resultCollection1": "result1",
|
||||||
|
"resultCollection2": "result2",
|
||||||
|
"resultCollection3": "result3"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"uploadSingleMultiple": {
|
"uploadSingleMultiple": {
|
||||||
"name": "upload-single-multiple",
|
"name": "upload-single-multiple",
|
||||||
|
Reference in New Issue
Block a user