* Change strategy with process cloud e2e and fixes

* Change strategy with process cloud e2e and fixes

* Fix path and host

* improve the config and run the replace for cloud

* Use the same name of other scripts

* Fix lint

* Run the replace in case of cloud

* typo

* Export variables if needed
Fix the check env passing the oauth
This commit is contained in:
Maurizio Vitale
2019-05-23 10:24:32 +01:00
committed by Denys Vuika
parent 446efe4297
commit abb76d956b
26 changed files with 301 additions and 282 deletions

View File

@@ -15,9 +15,8 @@
* limitations under the License.
*/
import TestConfig = require('../test.config');
import { AppListCloudPage, StringUtil, ApiService, LoginSSOPage, SettingsPage, TasksService, QueryService,
import { browser } from 'protractor';
import { AppListCloudPage, StringUtil, ApiService, LoginSSOPage, TasksService, QueryService,
ProcessDefinitionsService, ProcessInstancesService } from '@alfresco/adf-testing';
import { NavigationBarPage } from '../pages/adf/navigationBarPage';
import { TasksCloudDemoPage } from '../pages/adf/demo-shell/process-services/tasksCloudDemoPage';
@@ -27,7 +26,6 @@ import resources = require('../util/resources');
describe('Complete task - cloud directive', () => {
const settingsPage = new SettingsPage();
const loginSSOPage = new LoginSSOPage();
const navigationBarPage = new NavigationBarPage();
const appListCloudComponent = new AppListCloudPage();
@@ -44,12 +42,8 @@ describe('Complete task - cloud directive', () => {
const completedTaskName = StringUtil.generateRandomString(), assignedTaskName = StringUtil.generateRandomString();
beforeAll(async (done) => {
settingsPage.setProviderBpmSso(TestConfig.adf.hostBPM, TestConfig.adf.hostSso, TestConfig.adf.hostIdentity, false);
loginSSOPage.clickOnSSOButton();
loginSSOPage.loginSSOIdentityService(TestConfig.adf.adminEmail, TestConfig.adf.adminPassword);
const apiService = new ApiService('activiti', TestConfig.adf.hostBPM, TestConfig.adf.hostSso, 'BPM');
await apiService.login(TestConfig.adf.adminEmail, TestConfig.adf.adminPassword);
const apiService = new ApiService(browser.params.config.oauth2.clientId, browser.params.config.bpmHost, browser.params.config.oauth2.host, browser.params.config.providers);
await apiService.login(browser.params.identityUser.email, browser.params.identityUser.password);
tasksService = new TasksService(apiService);
createdTask = await tasksService.createStandaloneTask(StringUtil.generateRandomString(), candidateuserapp);
@@ -75,14 +69,15 @@ describe('Complete task - cloud directive', () => {
tasksService = new TasksService(apiService);
claimedTask = await tasksService.claimTask(task.list.entries[0].entry.id, candidateuserapp);
browser.get('/');
loginSSOPage.loginSSOIdentityService(browser.params.identityUser.email, browser.params.identityUser.password);
done();
});
beforeEach((done) => {
beforeEach(() => {
navigationBarPage.navigateToProcessServicesCloudPage();
appListCloudComponent.checkApsContainer();
appListCloudComponent.goToApp(candidateuserapp);
done();
});
it('[C307093] Complete button is not displayed when the task is already completed', () => {