From 1141511a0715bf9cceb2838f3ba066f527743087 Mon Sep 17 00:00:00 2001 From: Maurizio Vitale Date: Mon, 20 May 2019 18:11:01 +0100 Subject: [PATCH] Remove the dependency with TestConfig (#4752) * Remove the dependency with TestConfig * Change protocol to https * Trigger the cloud change * Trigger the cloud change --- e2e/test.config.js | 6 +++--- .../src/lib/form/services/form-cloud.service.ts | 1 + .../src/lib/core/actions/identity/tasks.service.ts | 8 ++++---- lib/testing/src/lib/core/utils/file-browser.util.ts | 2 +- scripts/check-env/check-activiti-env.js | 6 +++--- 5 files changed, 12 insertions(+), 11 deletions(-) diff --git a/e2e/test.config.js b/e2e/test.config.js index 4fabcf4f73..8b9270ab68 100644 --- a/e2e/test.config.js +++ b/e2e/test.config.js @@ -51,7 +51,7 @@ module.exports = { */ adminPassword: PASSWORD, - hostBPM: "http://" + ( HOST_BPM || PROXY || HOST), + hostBPM: "https://" + ( HOST_BPM || PROXY || HOST), clientIdSso: "alfresco", @@ -66,7 +66,7 @@ module.exports = { baseUrl = HOST; } - return `http://${baseUrl}/auth/realms/alfresco`; + return `https://${baseUrl}/auth/realms/alfresco`; }(), hostIdentity: function () { @@ -83,7 +83,7 @@ module.exports = { } - return `http://${baseUrl}/auth/admin/realms/alfresco`; + return `https://${baseUrl}/auth/admin/realms/alfresco`; }() }, diff --git a/lib/process-services-cloud/src/lib/form/services/form-cloud.service.ts b/lib/process-services-cloud/src/lib/form/services/form-cloud.service.ts index 6172757f79..9207bcbee9 100644 --- a/lib/process-services-cloud/src/lib/form/services/form-cloud.service.ts +++ b/lib/process-services-cloud/src/lib/form/services/form-cloud.service.ts @@ -37,6 +37,7 @@ export class FormCloudService extends BaseCloudService { private logService: LogService ) { super(); + this.contextRoot = this.appConfigService.get('bpmHost', ''); } diff --git a/lib/testing/src/lib/core/actions/identity/tasks.service.ts b/lib/testing/src/lib/core/actions/identity/tasks.service.ts index 02663deb48..9f03f41652 100644 --- a/lib/testing/src/lib/core/actions/identity/tasks.service.ts +++ b/lib/testing/src/lib/core/actions/identity/tasks.service.ts @@ -58,9 +58,9 @@ export class TasksService { } - async claimTask(taskId, appName, assignee: string = global['TestConfig'].adf.adminEmail) { + async claimTask(taskId, appName) { try { - const path = '/' + appName + '/rb/v1/tasks/' + taskId + `/claim?assignee=${assignee}`; + const path = '/' + appName + '/rb/v1/tasks/' + taskId + `/claim`; const method = 'POST'; const queryParams = {}, postBody = {}; @@ -86,9 +86,9 @@ export class TasksService { } } - async createAndCompleteTask(taskName, appName, assignee: string = global['TestConfig'].adf.adminEmail) { + async createAndCompleteTask(taskName, appName) { const task = await this.createStandaloneTask(taskName, appName); - await this.claimTask(task.entry.id, appName, assignee); + await this.claimTask(task.entry.id, appName); await this.completeTask(task.entry.id, appName); return task; } diff --git a/lib/testing/src/lib/core/utils/file-browser.util.ts b/lib/testing/src/lib/core/utils/file-browser.util.ts index d76a22271d..3fb7f5f082 100644 --- a/lib/testing/src/lib/core/utils/file-browser.util.ts +++ b/lib/testing/src/lib/core/utils/file-browser.util.ts @@ -19,7 +19,7 @@ import * as path from 'path'; import * as fs from 'fs'; import { browser } from 'protractor'; -const DEFAULT_ROOT_PATH = global['TestConfig'].main.rootPath; +const DEFAULT_ROOT_PATH = global['TestConfig'] ? global['TestConfig'].main.rootPath : __dirname; export class FileBrowserUtil { diff --git a/scripts/check-env/check-activiti-env.js b/scripts/check-env/check-activiti-env.js index 43f55bea20..4acaf54fed 100755 --- a/scripts/check-env/check-activiti-env.js +++ b/scripts/check-env/check-activiti-env.js @@ -27,10 +27,10 @@ async function main() { config = { provider: 'BPM', - hostBpm: `http://${program.host}`, + hostBpm: `https://${program.host}`, authType: 'OAUTH', oauth2: { - host: `http://${program.host}/auth/realms/alfresco`, + host: `https://${program.host}/auth/realms/alfresco`, clientId: program.client, scope: 'openid', secret: '', @@ -433,7 +433,7 @@ async function deleteSiteByName(name) { let alfrescoJsApi = new alfrescoApi.AlfrescoApiCompatibility({ provider: 'ECM', - hostEcm: `http://${program.host}` + hostEcm: `https://${program.host}` }); await this.alfrescoJsApi.login(program.username, program.password);