From f152a24dc28c44ec61d496a351eeaeb80689fc27 Mon Sep 17 00:00:00 2001 From: cristinaj Date: Wed, 3 Apr 2019 13:47:05 +0300 Subject: [PATCH] [ADF-4350]Fix cloud tests (#4544) * Fix version-permissions tests * Fix the cloud tests * Fix process-services tests --- .../version/version-permissions.e2e.ts | 12 ++++++------ e2e/pages/adf/process-services/taskDetailsPage.ts | 6 ++++++ e2e/process-services/task-details-form.e2e.ts | 15 ++++----------- protractor.conf.js | 8 ++++++++ 4 files changed, 24 insertions(+), 17 deletions(-) diff --git a/e2e/content-services/version/version-permissions.e2e.ts b/e2e/content-services/version/version-permissions.e2e.ts index 567f0470ea..3011e74ec3 100644 --- a/e2e/content-services/version/version-permissions.e2e.ts +++ b/e2e/content-services/version/version-permissions.e2e.ts @@ -316,12 +316,6 @@ describe('Version component permissions', () => { uploadDialog.clickOnCloseButton(); }); - it('[C277203] Should a user with Collaborator permission not be able to upload a new version for a locked file', () => { - contentServices.getDocumentList().rightClickOnRow(lockFileModel.name); - const actionVersion = contentServices.checkContextActionIsVisible('Manage versions'); - expect(actionVersion.isEnabled()).toBeFalsy(); - }); - it('[C277199] should a user with Collaborator permission be able to upload a new version for a file with different creator', () => { contentServices.versionManagerContent(differentCreatorFile.name); @@ -341,6 +335,12 @@ describe('Version component permissions', () => { versionManagePage.closeVersionDialog(); }); + + it('[C277203] Should a user with Collaborator permission not be able to upload a new version for a locked file', () => { + contentServices.getDocumentList().rightClickOnRow(lockFileModel.name); + const actionVersion = contentServices.checkContextActionIsVisible('Manage versions'); + expect(actionVersion.isEnabled()).toBeFalsy(); + }); }); }); diff --git a/e2e/pages/adf/process-services/taskDetailsPage.ts b/e2e/pages/adf/process-services/taskDetailsPage.ts index 8a4afdb963..c4de906ac2 100644 --- a/e2e/pages/adf/process-services/taskDetailsPage.ts +++ b/e2e/pages/adf/process-services/taskDetailsPage.ts @@ -157,6 +157,12 @@ export class TaskDetailsPage { return this.formNameField.getText(); } + clickForm() { + BrowserVisibility.waitUntilElementIsVisible(this.formNameField); + BrowserVisibility.waitUntilElementIsClickable(this.formNameField); + this.formNameField.click(); + } + getAssignee() { BrowserVisibility.waitUntilElementIsVisible(this.assigneeField); return this.assigneeField.getText(); diff --git a/e2e/process-services/task-details-form.e2e.ts b/e2e/process-services/task-details-form.e2e.ts index a2ebef68bf..05ab626b6a 100644 --- a/e2e/process-services/task-details-form.e2e.ts +++ b/e2e/process-services/task-details-form.e2e.ts @@ -102,9 +102,7 @@ describe('Task Details - Form', () => { it('[C280018] Should be able to change the form in a task', () => { tasksListPage.selectRow(task.name); - - taskDetailsPage.checkEditFormButtonIsDisplayed(); - taskDetailsPage.clickEditFormButton(); + taskDetailsPage.clickForm(); taskDetailsPage.checkAttachFormDropdownIsDisplayed(); taskDetailsPage.checkAttachFormButtonIsDisabled(); @@ -120,8 +118,7 @@ describe('Task Details - Form', () => { taskDetailsPage.checkFormIsAttached(attachedForm.name); - taskDetailsPage.checkEditFormButtonIsDisplayed(); - taskDetailsPage.clickEditFormButton(); + taskDetailsPage.clickForm(); taskDetailsPage.checkAttachFormDropdownIsDisplayed(); taskDetailsPage.clickAttachFormDropdown(); @@ -136,9 +133,7 @@ describe('Task Details - Form', () => { it('[C280019] Should be able to remove the form form a task', () => { tasksListPage.selectRow(task.name); - - taskDetailsPage.checkEditFormButtonIsDisplayed(); - taskDetailsPage.clickEditFormButton(); + taskDetailsPage.clickForm(); taskDetailsPage.checkRemoveAttachFormIsDisplayed(); taskDetailsPage.clickRemoveAttachForm(); @@ -150,9 +145,7 @@ describe('Task Details - Form', () => { it('[C280557] Should display task details when selecting another task while the Attach Form dialog is displayed', () => { tasksListPage.selectRow(task.name); - - taskDetailsPage.checkEditFormButtonIsDisplayed(); - taskDetailsPage.clickEditFormButton(); + taskDetailsPage.clickForm(); taskDetailsPage.checkRemoveAttachFormIsDisplayed(); diff --git a/protractor.conf.js b/protractor.conf.js index 5f3b028222..7ddc2d8454 100644 --- a/protractor.conf.js +++ b/protractor.conf.js @@ -176,6 +176,14 @@ exports.config = { baseUrl: "http://" + HOST, + params: { + config: { + oauth2: { + clientId: 'activiti' + } + } + }, + framework: 'jasmine2', jasmineNodeOpts: {