[NO-ISSUE] Fix e2e test (#4621)

* fix sso, change timeout, parallel

* cange travis

* move name apps in resources file

* resources fix

* resources fix

* add sleep before search group

* add possibility to extend duration of snack-bar message from configuration

* fix unit test

* fix unit test

* remove timeout

* change timeout

* decrease message time

* add lint main branch travis

* reduce timeout

* add new check application presence

* change permission script
fix search selector

* fix travis conf

* check app environment and upload the app if abbsent

* fix cloud test

* remove duplicate

* restore ps test

* restore resources file

* fix e2e test

* process with variables missing

* test new conf travis

* fix lint

* fix spellcheck

* remove duplicate module

* fix ps module

* fix travis conf

* change check activiti env

* add concept of processes in resources
This commit is contained in:
Eugenio Romano
2019-04-18 13:31:42 +02:00
committed by GitHub
parent 181cee72d6
commit 64be9e3624
58 changed files with 627 additions and 391 deletions

View File

@@ -31,7 +31,17 @@ export class ProcessDefinitionsService {
const queryParams = {};
const data = await this.api.performBpmOperation(path, method, queryParams, {});
return data;
try {
const data = await this.api.performBpmOperation(path, method, queryParams, {});
return data;
} catch (error) {
if (error.status === 404) {
// tslint:disable-next-line:no-console
console.log(`${appName} not present`);
} else if (error.status === 403) {
// tslint:disable-next-line:no-console
console.log(`Access to the requested resource has been denied ${appName}`);
}
}
}
}

View File

@@ -41,7 +41,7 @@ export class EditProcessFilterCloudComponentPage {
checkCustomiseFilterHeaderIsExpanded() {
const expansionPanelExtended = element.all(by.css('mat-expansion-panel-header[class*="mat-expanded"]')).first();
BrowserVisibility.waitUntilElementIsVisible(expansionPanelExtended);
const content = element(by.css('div[class*="mat-expansion-panel-content "][style*="visible"]'));
const content = element.all(by.css('div[class*="mat-expansion-panel-content "][style*="visible"]')).first();
BrowserVisibility.waitUntilElementIsVisible(content);
return this;
}

View File

@@ -15,7 +15,7 @@
* limitations under the License.
*/
import { by, element, protractor } from 'protractor';
import { browser, by, element, protractor } from 'protractor';
import { BrowserVisibility } from '../../core/browser-visibility';
export class GroupCloudComponentPage {
@@ -24,6 +24,7 @@ export class GroupCloudComponentPage {
searchGroups(name) {
BrowserVisibility.waitUntilElementIsVisible(this.groupCloudSearch);
browser.sleep(1000);
this.groupCloudSearch.clear().then(() => {
for (let i = 0; i < name.length; i++) {
this.groupCloudSearch.sendKeys(name[i]);
@@ -53,6 +54,7 @@ export class GroupCloudComponentPage {
selectGroupFromList(name) {
const groupRow = element.all(by.cssContainingText('mat-option span', name)).first();
BrowserVisibility.waitUntilElementIsVisible(groupRow);
browser.sleep(1000);
groupRow.click();
BrowserVisibility.waitUntilElementIsNotVisible(groupRow);
return this;

View File

@@ -15,7 +15,7 @@
* limitations under the License.
*/
import { by, element, protractor } from 'protractor';
import { browser, by, element, protractor } from 'protractor';
import { BrowserVisibility } from '../../core/browser-visibility';
export class PeopleCloudComponentPage {
@@ -34,6 +34,7 @@ export class PeopleCloudComponentPage {
searchAssignee(name) {
BrowserVisibility.waitUntilElementIsVisible(this.peopleCloudSearch);
BrowserVisibility.waitUntilElementIsClickable(this.peopleCloudSearch);
browser.sleep(1000);
this.peopleCloudSearch.clear().then(() => {
for (let i = 0; i < name.length; i++) {
this.peopleCloudSearch.sendKeys(name[i]);
@@ -57,6 +58,7 @@ export class PeopleCloudComponentPage {
selectAssigneeFromList(name) {
const assigneeRow = element(by.cssContainingText('mat-option span.adf-people-label-name', name));
BrowserVisibility.waitUntilElementIsVisible(assigneeRow);
browser.sleep(1000);
assigneeRow.click();
BrowserVisibility.waitUntilElementIsNotVisible(assigneeRow);
return this;
@@ -86,6 +88,7 @@ export class PeopleCloudComponentPage {
getAssigneeFieldContent() {
BrowserVisibility.waitUntilElementIsVisible(this.assigneeField);
browser.sleep(1000);
return this.assigneeField.getAttribute('value');
}

View File

@@ -24,8 +24,8 @@ export class ProcessHeaderCloudPage {
nameField = element.all(by.css('span[data-automation-id*="name"] span')).first();
statusField = element(by.css('span[data-automation-id*="status"] span'));
initiatorField = element(by.css('span[data-automation-id*="initiator"] span'));
startDateField = element(by.css('span[data-automation-id*="startDate"] span'));
lastModifiedField = element(by.css('span[data-automation-id*="lastModified"] span'));
startDateField = element.all(by.css('span[data-automation-id*="startDate"] span')).first();
lastModifiedField = element.all(by.css('span[data-automation-id*="lastModified"] span')).first();
parentIdField = element(by.css('span[data-automation-id*="parentId"] span'));
businessKeyField = element.all(by.css('span[data-automation-id*="businessKey"] span')).first();

View File

@@ -86,6 +86,7 @@ export class StartProcessCloudPage {
}
checkStartProcessButtonIsEnabled() {
BrowserVisibility.waitUntilElementIsClickable(this.startProcessButton);
expect(this.startProcessButton.isEnabled()).toBe(true);
}

View File

@@ -27,7 +27,7 @@ export class StartTasksCloudPage {
startButton = element(by.css('button[id="button-start"]'));
startButtonEnabled = element(by.css('button[id="button-start"]:not(disabled)'));
cancelButton = element(by.css('button[id="button-cancel"]'));
form = element(by.css('adf-cloud-start-task form'));
form = element.all(by.css('adf-cloud-start-task form')).first();
checkFormIsDisplayed() {
BrowserVisibility.waitUntilElementIsVisible(this.form);

View File

@@ -23,7 +23,7 @@ export class TaskHeaderCloudPage {
assigneeField = element(by.css('span[data-automation-id*="assignee"] span'));
statusField = element(by.css('span[data-automation-id*="status"] span'));
priorityField = element(by.css('span[data-automation-id*="priority"] span'));
dueDateField = element(by.css('span[data-automation-id*="dueDate"] span'));
dueDateField = element.all(by.css('span[data-automation-id*="dueDate"] span')).first();
categoryField = element(by.css('span[data-automation-id*="category"] span'));
createdField = element(by.css('span[data-automation-id="card-dateitem-created"] span'));
parentNameField = element(by.css('span[data-automation-id*="parentName"] span'));