[AAE-550] Fix PS cloud test (#5139)

* fix PS cloud test

* fix spell

* separate e2e ps form ps-cloud
This commit is contained in:
Eugenio Romano 2019-10-09 13:57:03 +01:00 committed by GitHub
parent 798768a954
commit 05ce529704
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 19 additions and 23 deletions

View File

@ -129,7 +129,9 @@
"processwithvariables", "processwithvariables",
"dropdownrestprocess", "dropdownrestprocess",
"devops", "devops",
"mouseenter" "mouseenter",
"starteventform",
"formtotestvalidations"
], ],
"dictionaries": [ "dictionaries": [
"html", "html",

View File

@ -97,7 +97,7 @@ export class ProcessCloudDemoPage {
async checkActionExecuted(processInstanceId: string, action: string): Promise<void> { async checkActionExecuted(processInstanceId: string, action: string): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(element(by.cssContainingText(`span`, 'Action Menu:'))); await BrowserVisibility.waitUntilElementIsVisible(element(by.cssContainingText(`span`, 'Action Menu:')));
await BrowserVisibility.waitUntilElementIsVisible(element(by.cssContainingText(`span`, 'Context Menu:'))); await BrowserVisibility.waitUntilElementIsVisible(element(by.cssContainingText(`span`, 'Context Menu:')));
await BrowserVisibility.waitUntilElementIsVisible(element(by.cssContainingText(`span`, 'ProcessInstanceId: ' + processInstanceId))); await BrowserVisibility.waitUntilElementIsVisible(element(by.cssContainingText(`span`, 'Process Instance ID: ' + processInstanceId)));
await BrowserVisibility.waitUntilElementIsVisible(element(by.cssContainingText(`span`, 'Action Type: ' + action))); await BrowserVisibility.waitUntilElementIsVisible(element(by.cssContainingText(`span`, 'Action Type: ' + action)));
} }
} }

View File

@ -45,8 +45,8 @@ export class TasksCloudDemoPage {
contextMenuToggle: ElementFinder = element(by.css('mat-slide-toggle[data-automation-id="contextmenu"]')); contextMenuToggle: ElementFinder = element(by.css('mat-slide-toggle[data-automation-id="contextmenu"]'));
multiSelectionToggle: ElementFinder = element(by.css('mat-slide-toggle[data-automation-id="multiSelection"]')); multiSelectionToggle: ElementFinder = element(by.css('mat-slide-toggle[data-automation-id="multiSelection"]'));
testingModeToggle: ElementFinder = element(by.css('mat-slide-toggle[data-automation-id="testingMode"]')); testingModeToggle: ElementFinder = element(by.css('mat-slide-toggle[data-automation-id="testingMode"]'));
selectedRows: ElementFinder = element(by.xpath("//div[text()=' Selected rows: ']")); selectedRows: ElementFinder = element(by.xpath("//div[text()=' Selected Rows: ']"));
noOfSelectedRows: ElementArrayFinder = element.all(by.xpath("//div[text()=' Selected rows: ']//li")); noOfSelectedRows: ElementArrayFinder = element.all(by.xpath("//div[text()=' Selected Rows: ']//li"));
addActionTitle: ElementFinder = element(by.cssContainingText('.mat-card-title', 'Add Action')); addActionTitle: ElementFinder = element(by.cssContainingText('.mat-card-title', 'Add Action'));
keyInputField: ElementFinder = element(by.css('input[placeholder="Key"]')); keyInputField: ElementFinder = element(by.css('input[placeholder="Key"]'));
titleInputField: ElementFinder = element(by.css('input[placeholder="Title"]')); titleInputField: ElementFinder = element(by.css('input[placeholder="Title"]'));
@ -150,7 +150,7 @@ export class TasksCloudDemoPage {
async getSelectedTaskRowText(rowNo: string): Promise<string> { async getSelectedTaskRowText(rowNo: string): Promise<string> {
await this.checkSelectedRowsIsDisplayed(); await this.checkSelectedRowsIsDisplayed();
const row: ElementFinder = element(by.xpath(`//div[text()=' Selected rows: ']//li[${rowNo}]`)); const row: ElementFinder = element(by.xpath(`//div[text()=' Selected Rows: ']//li[${rowNo}]`));
return await BrowserActions.getText(row); return await BrowserActions.getText(row);
} }
@ -180,8 +180,7 @@ export class TasksCloudDemoPage {
async checkActionExecuted(taskId: string, action: string): Promise<void> { async checkActionExecuted(taskId: string, action: string): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(element(by.cssContainingText(`span`, 'Action Menu:'))); await BrowserVisibility.waitUntilElementIsVisible(element(by.cssContainingText(`span`, 'Action Menu:')));
await BrowserVisibility.waitUntilElementIsVisible(element(by.cssContainingText(`span`, 'Context Menu:'))); await BrowserVisibility.waitUntilElementIsVisible(element(by.cssContainingText(`span`, 'Context Menu:')));
await BrowserVisibility.waitUntilElementIsVisible(element(by.cssContainingText(`span`, 'Task Id: ' + taskId))); await BrowserVisibility.waitUntilElementIsVisible(element(by.cssContainingText(`span`, 'Task ID: ' + taskId)));
await BrowserVisibility.waitUntilElementIsVisible(element(by.cssContainingText(`span`, 'Action Type: ' + action))); await BrowserVisibility.waitUntilElementIsVisible(element(by.cssContainingText(`span`, 'Action Type: ' + action)));
} }
} }

View File

@ -192,7 +192,7 @@ describe('Start Task Form', () => {
await tasksCloudDemoPage.openNewTaskForm(); await tasksCloudDemoPage.openNewTaskForm();
await startTask.checkFormIsDisplayed(); await startTask.checkFormIsDisplayed();
await startTask.addName(standaloneTaskName); await startTask.addName(standaloneTaskName);
await startTask.selectFormDefinition('StartEventForm'); await startTask.selectFormDefinition(resources.ACTIVITI7_APPS.CANDIDATE_BASE_APP.forms.starteventform);
await startTask.clickStartButton(); await startTask.clickStartButton();
await tasksCloudDemoPage.taskListCloudComponent().checkContentIsDisplayedByName(standaloneTaskName); await tasksCloudDemoPage.taskListCloudComponent().checkContentIsDisplayedByName(standaloneTaskName);
await tasksCloudDemoPage.taskListCloudComponent().selectRow(standaloneTaskName); await tasksCloudDemoPage.taskListCloudComponent().selectRow(standaloneTaskName);
@ -224,9 +224,9 @@ describe('Start Task Form', () => {
it('[C311428] Should display the Standalone forms based on the flag set', async () => { it('[C311428] Should display the Standalone forms based on the flag set', async () => {
await tasksCloudDemoPage.openNewTaskForm(); await tasksCloudDemoPage.openNewTaskForm();
await startTask.checkFormIsDisplayed(); await startTask.checkFormIsDisplayed();
await startTask.checkFormDefinitionIsNotDisplayed('UploadFileForm'); await startTask.checkFormDefinitionIsNotDisplayed('uploadfileform');
await startTask.checkFormDefinitionIsDisplayed('StartEventForm'); await startTask.checkFormDefinitionIsDisplayed(resources.ACTIVITI7_APPS.CANDIDATE_BASE_APP.forms.starteventform);
await startTask.checkFormDefinitionIsDisplayed('FormToTestValidations'); await startTask.checkFormDefinitionIsDisplayed(resources.ACTIVITI7_APPS.CANDIDATE_BASE_APP.forms.formtotestvalidations);
}); });
}); });

View File

@ -91,7 +91,6 @@ describe('Task list cloud - selection', () => {
it('[C291914] Should not be able to select any row when selection mode is set to None', async () => { it('[C291914] Should not be able to select any row when selection mode is set to None', async () => {
await tasksCloudDemoPage.clickSettingsButton(); await tasksCloudDemoPage.clickSettingsButton();
await tasksCloudDemoPage.selectSelectionMode('None'); await tasksCloudDemoPage.selectSelectionMode('None');
await tasksCloudDemoPage.clickSettingsButton();
await tasksCloudDemoPage.disableDisplayTaskDetails(); await tasksCloudDemoPage.disableDisplayTaskDetails();
await tasksCloudDemoPage.clickAppButton(); await tasksCloudDemoPage.clickAppButton();
await tasksCloudDemoPage.taskListCloudComponent().getDataTable().waitForTableBody(); await tasksCloudDemoPage.taskListCloudComponent().getDataTable().waitForTableBody();
@ -104,7 +103,6 @@ describe('Task list cloud - selection', () => {
it('[C291918] Should be able to select only one row when selection mode is set to Single', async () => { it('[C291918] Should be able to select only one row when selection mode is set to Single', async () => {
await tasksCloudDemoPage.clickSettingsButton(); await tasksCloudDemoPage.clickSettingsButton();
await tasksCloudDemoPage.selectSelectionMode('Single'); await tasksCloudDemoPage.selectSelectionMode('Single');
await tasksCloudDemoPage.clickSettingsButton();
await tasksCloudDemoPage.disableDisplayTaskDetails(); await tasksCloudDemoPage.disableDisplayTaskDetails();
await tasksCloudDemoPage.clickAppButton(); await tasksCloudDemoPage.clickAppButton();
await tasksCloudDemoPage.taskListCloudComponent().getDataTable().waitForTableBody(); await tasksCloudDemoPage.taskListCloudComponent().getDataTable().waitForTableBody();
@ -122,8 +120,7 @@ describe('Task list cloud - selection', () => {
it('[C291919] Should be able to select only one row when selection mode is set to Multiple', async () => { it('[C291919] Should be able to select only one row when selection mode is set to Multiple', async () => {
await tasksCloudDemoPage.clickSettingsButton(); await tasksCloudDemoPage.clickSettingsButton();
await tasksCloudDemoPage.selectSelectionMode('Multiple'); await tasksCloudDemoPage.enableMultiSelection();
await tasksCloudDemoPage.clickSettingsButton();
await tasksCloudDemoPage.disableDisplayTaskDetails(); await tasksCloudDemoPage.disableDisplayTaskDetails();
await tasksCloudDemoPage.clickAppButton(); await tasksCloudDemoPage.clickAppButton();
await tasksCloudDemoPage.taskListCloudComponent().getDataTable().waitForTableBody(); await tasksCloudDemoPage.taskListCloudComponent().getDataTable().waitForTableBody();
@ -140,8 +137,6 @@ describe('Task list cloud - selection', () => {
}); });
it('[C291916] Should be able to select multiple row when multiselect is true', async () => { it('[C291916] Should be able to select multiple row when multiselect is true', async () => {
await tasksCloudDemoPage.clickSettingsButton();
await tasksCloudDemoPage.enableMultiSelection();
await tasksCloudDemoPage.clickSettingsButton(); await tasksCloudDemoPage.clickSettingsButton();
await tasksCloudDemoPage.disableDisplayTaskDetails(); await tasksCloudDemoPage.disableDisplayTaskDetails();
await tasksCloudDemoPage.clickAppButton(); await tasksCloudDemoPage.clickAppButton();
@ -163,8 +158,6 @@ describe('Task list cloud - selection', () => {
}); });
it('[C291915] Should be possible select all the rows when multiselect is true', async () => { it('[C291915] Should be possible select all the rows when multiselect is true', async () => {
await tasksCloudDemoPage.clickSettingsButton();
await tasksCloudDemoPage.enableMultiSelection();
await tasksCloudDemoPage.clickSettingsButton(); await tasksCloudDemoPage.clickSettingsButton();
await tasksCloudDemoPage.disableDisplayTaskDetails(); await tasksCloudDemoPage.disableDisplayTaskDetails();
await tasksCloudDemoPage.clickAppButton(); await tasksCloudDemoPage.clickAppButton();
@ -178,8 +171,6 @@ describe('Task list cloud - selection', () => {
}); });
it('[C297472] Should be able to see selected tasks with Multiselection and Testing switched on', async () => { it('[C297472] Should be able to see selected tasks with Multiselection and Testing switched on', async () => {
await tasksCloudDemoPage.clickSettingsButton();
await tasksCloudDemoPage.enableMultiSelection();
await tasksCloudDemoPage.clickSettingsButton(); await tasksCloudDemoPage.clickSettingsButton();
await tasksCloudDemoPage.enableTestingMode(); await tasksCloudDemoPage.enableTestingMode();
await tasksCloudDemoPage.clickAppButton(); await tasksCloudDemoPage.clickAppButton();

View File

@ -531,6 +531,10 @@ exports.ACTIVITI7_APPS = {
candidateGroupProcess: "candidategroupprocess", candidateGroupProcess: "candidategroupprocess",
anotherCandidateGroupProcess: "anothercandidategroup", anotherCandidateGroupProcess: "anothercandidategroup",
uploadFileProcess: "uploadfileprocess" uploadFileProcess: "uploadfileprocess"
},
forms: {
starteventform: "starteventform",
formtotestvalidations: "formtotestvalidations"
} }
}, },
SIMPLE_APP: { SIMPLE_APP: {

View File

@ -22,7 +22,7 @@ then
else if [[ $AFFECTED_E2E = "e2e/$CONTEXT_ENV" ]]; else if [[ $AFFECTED_E2E = "e2e/$CONTEXT_ENV" ]];
then then
HEAD_SHA_BRANCH="$(git merge-base origin/$TRAVIS_BRANCH HEAD)" HEAD_SHA_BRANCH="$(git merge-base origin/$TRAVIS_BRANCH HEAD)"
LIST_SPECS="$(git diff --name-only $HEAD_SHA_BRANCH HEAD | grep "^e2e/$CONTEXT_ENV" | paste -sd , -)" LIST_SPECS="$(git diff --name-only $HEAD_SHA_BRANCH HEAD | grep "^e2e/$CONTEXT_ENV/" | paste -sd , -)"
node ./scripts/check-env/check-activiti-env.js --host "$E2E_HOST_BPM" --oauth "$E2E_HOST_SSO" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" --client 'activiti' || exit 1 node ./scripts/check-env/check-activiti-env.js --host "$E2E_HOST_BPM" --oauth "$E2E_HOST_SSO" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" --client 'activiti' || exit 1
if [[ $LIST_SPECS != "" ]]; if [[ $LIST_SPECS != "" ]];
then then

View File

@ -20,7 +20,7 @@ then
else if [[ $AFFECTED_E2E = "e2e/$CONTEXT_ENV" ]]; else if [[ $AFFECTED_E2E = "e2e/$CONTEXT_ENV" ]];
then then
HEAD_SHA_BRANCH="$(git merge-base origin/$TRAVIS_BRANCH HEAD)" HEAD_SHA_BRANCH="$(git merge-base origin/$TRAVIS_BRANCH HEAD)"
LIST_SPECS="$(git diff --name-only $HEAD_SHA_BRANCH HEAD | grep "^e2e/$CONTEXT_ENV" | paste -sd , -)" LIST_SPECS="$(git diff --name-only $HEAD_SHA_BRANCH HEAD | grep "^e2e/$CONTEXT_ENV/" | paste -sd , -)"
if [[ $LIST_SPECS != "" ]]; if [[ $LIST_SPECS != "" ]];
then then
echo "Run $CONTEXT_ENV e2e based on the sha $HEAD_SHA_BRANCH with the specs: "$LIST_SPECS echo "Run $CONTEXT_ENV e2e based on the sha $HEAD_SHA_BRANCH with the specs: "$LIST_SPECS