Fix ps e2e (#5262)

* fix ps e2e

* fix upload unit report

* fix cspell

* Update cspell.json

* fix e2e

* remove extra space

* fix e2e increase resolution

* try add a sleep before to cehck sorted in order to give datable time to refresh

* log order

* fix log

* change async ins ort

* remove sort testcase
This commit is contained in:
Eugenio Romano
2019-11-21 10:12:52 +00:00
committed by Denys Vuika
parent 1ec827a90c
commit c61de922af
21 changed files with 882 additions and 566 deletions

View File

@@ -122,19 +122,24 @@ export class DataTableComponentPage {
*/
async checkListIsSorted(sortOrder: string, columnTitle: string): Promise<any> {
const column = element.all(by.css(`div.adf-datatable-cell[title='${columnTitle}'] span`));
// await BrowserVisibility.waitUntilElementIsVisible(column.first());
await BrowserVisibility.waitUntilElementIsVisible(column.first());
const initialList = [];
await column.each(async (currentElement) => {
const text = await BrowserActions.getText(currentElement);
const length = await column.count();
for (let i = 0; i < length; i++) {
const text = await BrowserActions.getText(column.get(i));
if (text.length !== 0) {
initialList.push(text.toLowerCase());
}
});
}
let sortedList = [...initialList];
sortedList = sortedList.sort();
if (sortOrder.toLocaleLowerCase() === 'desc') {
sortedList = sortedList.reverse();
}
return initialList.toString() === sortedList.toString();
}

View File

@@ -45,6 +45,7 @@ export class AttachFileWidgetCloud {
async clickAttachContentFile(fileId: string): Promise<void> {
const uploadButton = this.widget.element(by.css(`button[id=${fileId}]`));
await BrowserActions.click(uploadButton);
await browser.sleep(1000);
await BrowserActions.clickExecuteScript('button[id="attach-Alfresco Content"]');
}

View File

@@ -78,7 +78,7 @@ export class EditProcessFilterCloudComponentPage {
const orderElement = element.all(by.cssContainingText('mat-option span', option)).first();
await BrowserActions.click(orderElement);
await browser.sleep(1000);
await browser.sleep(1500);
}
async getOrderFilterDropDownValue(): Promise<string> {

View File

@@ -82,7 +82,7 @@ export class EditTaskFilterCloudComponentPage {
const orderElement = element.all(by.cssContainingText('mat-option span', option)).first();
await BrowserActions.click(orderElement);
await browser.sleep(1000);
await browser.sleep(1500);
}
getOrderFilterDropDownValue(): Promise<string> {

View File

@@ -24,17 +24,19 @@ export const ACTIVITI_CLOUD_APPS: any = {
candidateUserProcess: 'candidateuserprocess',
candidateGroupProcess: 'candidategroupprocess',
anotherCandidateGroupProcess: 'anothercandidategroup',
uploadFileProcess: 'uploadfileprocess'
uploadFileProcess: 'uploadfileprocess',
processwithstarteventform: 'processwithstarteventform'
},
forms: {
starteventform: 'starteventform',
formtotestvalidations: 'formtotestvalidations'
formtotestvalidations: 'formtotestvalidations',
uploadfileform: 'uploadfileform'
},
security: [
{'role': 'ACTIVITI_ADMIN', 'groups': [], 'users': ['superadminuser']},
{'role': 'ACTIVITI_USER', 'groups': ['hr', 'testgroup'], 'users': ['hruser', 'salesuser'] },
{'role': 'APS_ADMIN', 'groups': [], 'users': ['superadminuser']},
{'role': 'APS_USER', 'groups': ['hr', 'testgroup'], 'users': ['hruser', 'salesuser'] }
{ 'role': 'ACTIVITI_ADMIN', 'groups': [], 'users': ['superadminuser'] },
{ 'role': 'ACTIVITI_USER', 'groups': ['hr', 'testgroup'], 'users': ['hruser', 'salesuser'] },
{ 'role': 'APS_ADMIN', 'groups': [], 'users': ['superadminuser'] },
{ 'role': 'APS_USER', 'groups': ['hr', 'testgroup'], 'users': ['hruser', 'salesuser'] }
]
},
SIMPLE_APP: {
@@ -73,7 +75,9 @@ export const ACTIVITI_CLOUD_APPS: any = {
multiinstancedmnsequence: 'multiinstance-dmnsequence',
multiinstancemanualtask: 'multiinstance-manualtask',
multiinstancesubprocess: 'multiinstance-subprocess',
calledprocess: 'calledprocess'
calledprocess: 'calledprocess',
booleanvisibilityprocess: 'booleanvisibilityprocess',
numbervisibilityprocess: 'numbervisibilityprocess'
},
forms: {
tabVisibilityFields: {
@@ -105,23 +109,33 @@ export const ACTIVITI_CLOUD_APPS: any = {
},
uploadlocalfileform: {
name: 'upload-localfile-form'
},
booleanvisibility: {
name: 'booleanvisibility'
},
requirednumbervisibility: {
name: 'requirednumbervisibility'
}
},
security: [
{'role': 'ACTIVITI_ADMIN', 'groups': [], 'users': ['superadminuser']},
{'role': 'ACTIVITI_USER', 'groups': ['hr', 'testgroup'], 'users': ['hruser']},
{'role': 'APS_ADMIN', 'groups': [], 'users': ['superadminuser']},
{'role': 'APS_USER', 'groups': ['hr', 'testgroup'], 'users': ['hruser'] }
{ 'role': 'ACTIVITI_ADMIN', 'groups': [], 'users': ['superadminuser'] },
{ 'role': 'ACTIVITI_USER', 'groups': ['hr', 'testgroup'], 'users': ['hruser'] },
{ 'role': 'APS_ADMIN', 'groups': [], 'users': ['superadminuser'] },
{ 'role': 'APS_USER', 'groups': ['hr', 'testgroup'], 'users': ['hruser'] }
]
},
SUB_PROCESS_APP: {
name: 'subprocessapp',
file_location: 'https://github.com/Alfresco/alfresco-ng2-components/blob/development/e2e/resources/activiti7/subprocessapp.zip?raw=true',
processes: {
processchild: 'processchild',
processparent: 'processparent'
},
security: [
{'role': 'ACTIVITI_ADMIN', 'groups': [], 'users': ['superadminuser']},
{'role': 'ACTIVITI_USER', 'groups': ['hr', 'testgroup'], 'users': ['hruser']},
{'role': 'APS_ADMIN', 'groups': [], 'users': ['superadminuser']},
{'role': 'APS_USER', 'groups': ['hr', 'testgroup'], 'users': ['hruser'] }
{ 'role': 'ACTIVITI_ADMIN', 'groups': [], 'users': ['superadminuser'] },
{ 'role': 'ACTIVITI_USER', 'groups': ['hr', 'testgroup'], 'users': ['hruser'] },
{ 'role': 'APS_ADMIN', 'groups': [], 'users': ['superadminuser'] },
{ 'role': 'APS_USER', 'groups': ['hr', 'testgroup'], 'users': ['hruser'] }
]
}
};