[NO-ISSUE] Fix Core E2E tes (#4450)

* fix Identity service in core using internal identity service in test env

* fix lint

* fix lint

* fix login

* fix travis yml

* remove log script
This commit is contained in:
Eugenio Romano
2019-03-18 00:18:56 +00:00
committed by GitHub
parent 8dc9eba4c7
commit 9d98f3196e
24 changed files with 151 additions and 128 deletions

View File

@@ -134,7 +134,7 @@ jobs:
AFFECTED_LIBS="$(./scripts/affected-libs.sh -gnu -b $TRAVIS_BRANCH)";
if [[ $AFFECTED_LIBS =~ "core$" || $AFFECTED_E2E = "e2e" || $TRAVIS_PULL_REQUEST == "false" ]];
then
(./scripts/test-e2e-lib.sh -host localhost:4200 --host_sso "$E2E_HOST_SSO" --host_bpm "$E2E_HOST_BPM" --host_identity "$E2E_HOST_IDENTITY" -proxy "$E2E_HOST" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" -e $E2E_EMAIL -b --folder core --skip-lint --use-dist || exit 1;);
(./scripts/test-e2e-lib.sh -host localhost:4200 -proxy "$E2E_HOST" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" -e "$E2E_EMAIL" -b --folder core --skip-lint --use-dist || exit 1;);
fi;
- stage: e2e Test # Test process-services
name: process-services
@@ -143,7 +143,7 @@ jobs:
AFFECTED_LIBS="$(./scripts/affected-libs.sh -gnu -b $TRAVIS_BRANCH)";
if [[ $AFFECTED_LIBS =~ "process-services$" || $AFFECTED_E2E = "e2e" || $TRAVIS_PULL_REQUEST == "false" ]];
then
(./scripts/test-e2e-lib.sh -host localhost:4200 -proxy "$E2E_HOST" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" -e $E2E_EMAIL -b --folder process-services --skip-lint --use-dist || exit 1;);
(./scripts/test-e2e-lib.sh -host localhost:4200 -proxy "$E2E_HOST" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" -e "$E2E_EMAIL" -b --folder process-services --skip-lint --use-dist || exit 1;);
fi;
- stage: e2e Test # Test content-services
name: content-services
@@ -152,7 +152,7 @@ jobs:
AFFECTED_LIBS="$(./scripts/affected-libs.sh -gnu -b $TRAVIS_BRANCH)";
if [[ $AFFECTED_LIBS =~ "content-services$" || $AFFECTED_E2E = "e2e" || $TRAVIS_PULL_REQUEST == "false" ]];
then
(./scripts/test-e2e-lib.sh -host localhost:4200 -proxy "$E2E_HOST" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" -e $E2E_EMAIL -b --folder content-services --skip-lint --use-dist || exit 1;);
(./scripts/test-e2e-lib.sh -host localhost:4200 -proxy "$E2E_HOST" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" -e "$E2E_EMAIL" -b --folder content-services --skip-lint --use-dist || exit 1;);
fi;
- stage: e2e Test # Test search
name: search
@@ -161,7 +161,7 @@ jobs:
AFFECTED_LIBS="$(./scripts/affected-libs.sh -gnu -b $TRAVIS_BRANCH)";
if [[ $AFFECTED_LIBS =~ "content-services$" || $AFFECTED_E2E = "e2e" || $TRAVIS_PULL_REQUEST == "false" ]];
then
(./scripts/test-e2e-lib.sh -host localhost:4200 -proxy "$E2E_HOST" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" -e $E2E_EMAIL -b --folder search --skip-lint --use-dist || exit 1;);
(./scripts/test-e2e-lib.sh -host localhost:4200 -proxy "$E2E_HOST" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" -e "$E2E_EMAIL" -b --folder search --skip-lint --use-dist || exit 1;);
fi;
- stage: e2e Test # Test process-services-cloud
name: process-services-cloud
@@ -170,7 +170,7 @@ jobs:
AFFECTED_LIBS="$(./scripts/affected-libs.sh -gnu -b $TRAVIS_BRANCH)";
if [[ $AFFECTED_LIBS =~ "process-services-cloud$" || $AFFECTED_E2E = "e2e" || $TRAVIS_PULL_REQUEST == "false" ]];
then
(./scripts/test-e2e-lib.sh -host localhost:4200 --host_sso "$E2E_HOST_SSO" --host_bpm "$E2E_HOST_BPM" --host_identity "$E2E_HOST_IDENTITY" -proxy "$E2E_HOST" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" -e $E2E_EMAIL -b --folder process-services-cloud --skip-lint --use-dist || exit 1;);
(./scripts/test-e2e-lib.sh -host localhost:4200 --host_sso "$E2E_HOST_SSO" --host_bpm "$E2E_HOST_BPM" --host_identity "$E2E_HOST_IDENTITY" -proxy "$E2E_HOST" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" -e "$E2E_EMAIL" -b --folder process-services-cloud --skip-lint --use-dist || exit 1;);
fi;
- stage: e2e Test # Test insights
name: insights
@@ -179,7 +179,7 @@ jobs:
AFFECTED_LIBS="$(./scripts/affected-libs.sh -gnu -b $TRAVIS_BRANCH)";
if [[ $AFFECTED_LIBS =~ "process-services-cloud$" || $AFFECTED_E2E = "e2e" || $TRAVIS_PULL_REQUEST == "false" ]];
then
(./scripts/test-e2e-lib.sh -host localhost:4200 -proxy "$E2E_HOST" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" -e $E2E_EMAIL -b --folder insights --skip-lint --use-dist || exit 1;);
(./scripts/test-e2e-lib.sh -host localhost:4200 -proxy "$E2E_HOST" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" -e "$E2E_EMAIL" -b --folder insights --skip-lint --use-dist || exit 1;);
fi;
- stage: Create Docker PR
script: node ./scripts/move-dist-folder.js --base-href $TRAVIS_BUILD_NUMBER && (./scripts/pr-publish.sh -n $TRAVIS_BUILD_NUMBER -r $REPO_DOCKER -u $USERNAME_DOCKER -p $PASSWORD_DOCKER || exit 1)

View File

@@ -42,7 +42,13 @@ export class ApiService {
};
apiService: any = new AlfrescoApi(this.config);
apiService: any;
constructor(clientId: string = 'activiti') {
this.config.oauth2.clientId = clientId;
this.apiService = new AlfrescoApi(this.config);
}
async login(username, password) {
await this.apiService.login(username, password);

View File

@@ -20,9 +20,10 @@ import { Util } from '../../util/util';
export class Identity {
api: ApiService = new ApiService();
api: ApiService;
async init(username, password) {
async init(username: string, password: string, clientId?: string) {
this.api = new ApiService(clientId);
await this.api.login(username, password);
}
@@ -55,8 +56,7 @@ export class Identity {
async deleteUser(userId) {
const path = `/users/${userId}`;
const method = 'DELETE';
const queryParams = {}, postBody = {
};
const queryParams = {}, postBody = {};
const data = await this.api.performIdentityOperation(path, method, queryParams, postBody);
return data;
}
@@ -64,7 +64,7 @@ export class Identity {
async getUserInfoByUsername(username) {
const path = `/users`;
const method = 'GET';
const queryParams = { 'username' : username }, postBody = {};
const queryParams = { 'username': username }, postBody = {};
const data = await this.api.performIdentityOperation(path, method, queryParams, postBody);
return data[0];
@@ -74,7 +74,7 @@ export class Identity {
const path = `/users/${id}/reset-password`;
const method = 'PUT';
const queryParams = {},
postBody = {'type': 'password', 'value': password, 'temporary': false};
postBody = { 'type': 'password', 'value': password, 'temporary': false };
const data = await this.api.performIdentityOperation(path, method, queryParams, postBody);
return data;
@@ -84,7 +84,7 @@ export class Identity {
const path = `/users/${userId}/role-mappings/realm`;
const method = 'POST';
const queryParams = {},
postBody = [{'id': roleId, 'name': roleName}];
postBody = [{ 'id': roleId, 'name': roleName }];
const data = await this.api.performIdentityOperation(path, method, queryParams, postBody);
return data;

View File

@@ -26,7 +26,6 @@ describe('Login component - SSO', () => {
const settingsPage = new SettingsPage();
const loginApsPage = new LoginSSOPage();
const navigationBarPage = new NavigationBarPage();
let silentLogin;
describe('Login component - SSO', () => {
@@ -36,26 +35,24 @@ describe('Login component - SSO', () => {
browser.executeScript('window.localStorage.clear();');
});
it('[C261050] Should be possible login in the PS with SSO', () => {
silentLogin = false;
settingsPage.setProviderBpmSso(TestConfig.adf.hostBPM, TestConfig.adf.hostSso, TestConfig.adf.hostIdentity, silentLogin);
it('[C261050] Should be possible login with SSO', () => {
settingsPage.setProviderEcmSso(TestConfig.adf.url, TestConfig.adf.hostSso, TestConfig.adf.hostIdentity, false, true, 'alfresco');
loginApsPage.clickOnSSOButton();
browser.ignoreSynchronization = true;
loginApsPage.loginAPS(TestConfig.adf.adminEmail, TestConfig.adf.adminPassword);
loginApsPage.loginSSOIdentityService(TestConfig.adf.adminEmail, TestConfig.adf.adminPassword);
});
it('[C280667] Should be redirect directly to keycloak without show the login page with silent login', () => {
settingsPage.setProviderBpmSso(TestConfig.adf.hostBPM, TestConfig.adf.hostSso, TestConfig.adf.hostIdentity);
settingsPage.setProviderEcmSso(TestConfig.adf.url, TestConfig.adf.hostSso, TestConfig.adf.hostIdentity, true, true, 'alfresco');
browser.ignoreSynchronization = true;
loginApsPage.loginAPS(TestConfig.adf.adminEmail, TestConfig.adf.adminPassword);
loginApsPage.loginSSOIdentityService(TestConfig.adf.adminEmail, TestConfig.adf.adminPassword);
});
});
});
describe('SSO Login Error for login componentO', () => {
it('[C299205] Should display the login error message when the SSO identity service is wrongly configured', () => {
silentLogin = false;
settingsPage.setProviderBpmSso(TestConfig.adf.hostBPM, 'http://aps22/auth/realms/alfresco', TestConfig.adf.hostIdentity, silentLogin);
settingsPage.setProviderEcmSso(TestConfig.adf.url, 'http://aps22/auth/realms/alfresco', TestConfig.adf.hostIdentity, false, true, 'alfresco');
loginApsPage.clickOnSSOButton();
loginApsPage.checkLoginErrorIsDisplayed();
expect(loginApsPage.getLoginErrorMessage()).toContain('SSO Authentication server unreachable');

View File

@@ -33,13 +33,13 @@ describe('User Info - SSO', () => {
let silentLogin, identityUser;
beforeAll(async () => {
await identityService.init(TestConfig.adf.adminEmail, TestConfig.adf.adminPassword);
await identityService.init(TestConfig.adf.adminEmail, TestConfig.adf.adminPassword, 'alfresco');
identityUser = await identityService.createIdentityUser();
silentLogin = false;
settingsPage.setProviderBpmSso(TestConfig.adf.hostBPM, TestConfig.adf.hostSso, TestConfig.adf.hostIdentity, silentLogin);
settingsPage.setProviderEcmSso(TestConfig.adf.url, TestConfig.adf.hostSso, TestConfig.adf.hostIdentity, silentLogin, true, 'alfresco');
loginSSOPage.clickOnSSOButton();
browser.ignoreSynchronization = true;
loginSSOPage.loginAPS(identityUser.username, identityUser.password);
loginSSOPage.loginSSOIdentityService(identityUser.username, identityUser.password);
});
afterAll (async () => {

View File

@@ -135,12 +135,27 @@ export class SettingsPage {
await this.backButton.click();
}
async clickSsoRadioButton () {
async clickSsoRadioButton() {
Util.waitUntilElementIsVisible(this.ssoRadioButton);
await this.ssoRadioButton.click();
}
async setProviderBpmSso (processServiceURL, authHost, identityHost, silentLogin = true, implicitFlow = true ) {
async setProviderEcmSso(contentServiceURL, authHost, identityHost, silentLogin = true, implicitFlow = true, clientId?: string) {
this.goToSettingsPage();
this.setProvider(this.ecm.option, this.ecm.text);
Util.waitUntilElementIsNotOnPage(this.bpmText);
Util.waitUntilElementIsVisible(this.ecmText);
await this.clickSsoRadioButton();
await this.setClientId(clientId);
await this.setContentServicesURL(contentServiceURL);
await this.setAuthHost(authHost);
await this.setIdentityHost(identityHost);
await this.setSilentLogin(silentLogin);
await this.setImplicitFlow(implicitFlow);
await this.clickApply();
}
async setProviderBpmSso(processServiceURL, authHost, identityHost, silentLogin = true, implicitFlow = true) {
this.goToSettingsPage();
this.setProvider(this.bpm.option, this.bpm.text);
Util.waitUntilElementIsVisible(this.bpmText);
@@ -155,56 +170,56 @@ export class SettingsPage {
await this.clickApply();
}
async setProcessServicesURL (processServiceURL) {
async setProcessServicesURL(processServiceURL) {
Util.waitUntilElementIsVisible(this.bpmText);
this.bpmText.clear();
this.bpmText.sendKeys(processServiceURL);
}
async setClientId () {
async setClientId(clientId: string = TestConfig.adf_aps.clientIdSso) {
Util.waitUntilElementIsVisible(this.clientIdText);
this.clientIdText.clear();
this.clientIdText.sendKeys(TestConfig.adf_aps.clientIdSso);
this.clientIdText.sendKeys(clientId);
}
async setContentServicesURL (contentServiceURL) {
async setContentServicesURL(contentServiceURL) {
Util.waitUntilElementIsClickable(this.ecmText);
this.ecmText.clear();
this.ecmText.sendKeys(contentServiceURL);
}
clearContentServicesURL () {
clearContentServicesURL() {
Util.waitUntilElementIsVisible(this.ecmText);
this.ecmText.clear();
this.ecmText.sendKeys('a');
this.ecmText.sendKeys(protractor.Key.BACK_SPACE);
}
clearProcessServicesURL () {
clearProcessServicesURL() {
Util.waitUntilElementIsVisible(this.bpmText);
this.bpmText.clear();
this.bpmText.sendKeys('a');
this.bpmText.sendKeys(protractor.Key.BACK_SPACE);
}
async setAuthHost (authHostURL) {
async setAuthHost(authHostURL) {
Util.waitUntilElementIsVisible(this.authHostText);
await this.authHostText.clear();
await this.authHostText.sendKeys(authHostURL);
}
async setIdentityHost (identityHost) {
async setIdentityHost(identityHost) {
Util.waitUntilElementIsVisible(this.identityHostText);
await this.identityHostText.clear();
await this.identityHostText.sendKeys(identityHost);
}
async clickApply () {
async clickApply() {
Util.waitUntilElementIsVisible(this.applyButton);
await this.applyButton.click();
}
async setSilentLogin (enableToggle) {
async setSilentLogin(enableToggle) {
await Util.waitUntilElementIsVisible(this.silentLoginToggleElement);
const isChecked = (await this.silentLoginToggleElement.getAttribute('class')).includes('mat-checked');
@@ -216,7 +231,7 @@ export class SettingsPage {
return Promise.resolve();
}
async setImplicitFlow (enableToggle) {
async setImplicitFlow(enableToggle) {
await Util.waitUntilElementIsVisible(this.implicitFlowElement);
const isChecked = (await this.implicitFlowElement.getAttribute('class')).includes('mat-checked');

View File

@@ -33,7 +33,7 @@ describe('Applications list', () => {
it('[C289910] Should the app be displayed on dashboard when is deployed on APS', () => {
settingsPage.setProviderBpmSso(TestConfig.adf.hostBPM, TestConfig.adf.hostSso, TestConfig.adf.hostIdentity);
browser.ignoreSynchronization = true;
loginSSOPage.loginAPS(TestConfig.adf.adminEmail, TestConfig.adf.adminPassword);
loginSSOPage.loginSSOIdentityService(TestConfig.adf.adminEmail, TestConfig.adf.adminPassword);
navigationBarPage.navigateToProcessServicesCloudPage();
appListCloudPage.checkApsContainer();
appListCloudPage.checkAppIsDisplayed(appName);

View File

@@ -43,7 +43,7 @@ describe('Edit process filters cloud', () => {
settingsPage.setProviderBpmSso(TestConfig.adf.hostBPM, TestConfig.adf.hostSso, TestConfig.adf.hostIdentity, silentLogin);
loginSSOPage.clickOnSSOButton();
browser.ignoreSynchronization = true;
loginSSOPage.loginAPS(TestConfig.adf.adminEmail, TestConfig.adf.adminPassword);
loginSSOPage.loginSSOIdentityService(TestConfig.adf.adminEmail, TestConfig.adf.adminPassword);
});
beforeEach((done) => {

View File

@@ -47,7 +47,7 @@ describe('Edit task filters cloud', () => {
settingsPage.setProviderBpmSso(TestConfig.adf.hostBPM, TestConfig.adf.hostSso, TestConfig.adf.hostIdentity, silentLogin);
loginSSOPage.clickOnSSOButton();
browser.ignoreSynchronization = true;
loginSSOPage.loginAPS(TestConfig.adf.adminEmail, TestConfig.adf.adminPassword);
loginSSOPage.loginSSOIdentityService(TestConfig.adf.adminEmail, TestConfig.adf.adminPassword);
await tasksService.init(TestConfig.adf.adminEmail, TestConfig.adf.adminPassword);
assignedTask = await tasksService.createStandaloneTask(assignedTaskName, simpleApp);

View File

@@ -80,7 +80,7 @@ describe('People Groups Cloud Component', () => {
settingsPage.setProviderBpmSso(TestConfig.adf.hostBPM, TestConfig.adf.hostSso, TestConfig.adf.hostIdentity, silentLogin);
loginSSOPage.clickOnSSOButton();
browser.ignoreSynchronization = true;
loginSSOPage.loginAPS(TestConfig.adf.adminEmail, TestConfig.adf.adminPassword);
loginSSOPage.loginSSOIdentityService(TestConfig.adf.adminEmail, TestConfig.adf.adminPassword);
navigationBarPage.navigateToPeopleGroupCloudPage();
});

View File

@@ -57,7 +57,7 @@ describe('Process list cloud', () => {
settingsPage.setProviderBpmSso(TestConfig.adf.hostBPM, TestConfig.adf.hostSso, TestConfig.adf.hostIdentity, silentLogin);
loginSSOPage.clickOnSSOButton();
browser.ignoreSynchronization = true;
loginSSOPage.loginAPS(user, password);
loginSSOPage.loginSSOIdentityService(user, password);
navigationBarPage.clickConfigEditorButton();
configEditorPage.clickEditProcessCloudConfiguration();

View File

@@ -55,7 +55,7 @@ describe('Process filters cloud', () => {
settingsPage.setProviderBpmSso(TestConfig.adf.hostBPM, TestConfig.adf.hostSso, TestConfig.adf.hostIdentity, silentLogin);
loginSSOPage.clickOnSSOButton();
browser.ignoreSynchronization = true;
loginSSOPage.loginAPS(user, password);
loginSSOPage.loginSSOIdentityService(user, password);
await processDefinitionService.init(user, password);
let processDefinition = await processDefinitionService.getProcessDefinitions(simpleApp);

View File

@@ -52,7 +52,7 @@ describe('Process list cloud', () => {
settingsPage.setProviderBpmSso(TestConfig.adf.hostBPM, TestConfig.adf.hostSso, TestConfig.adf.hostIdentity, silentLogin);
loginSSOPage.clickOnSSOButton();
browser.ignoreSynchronization = true;
loginSSOPage.loginAPS(user, password);
loginSSOPage.loginSSOIdentityService(user, password);
await processDefinitionService.init(user, password);
let processDefinition = await processDefinitionService.getProcessDefinitions(simpleApp);

View File

@@ -48,7 +48,7 @@ describe('Start Process', () => {
settingsPage.setProviderBpmSso(TestConfig.adf.hostBPM, TestConfig.adf.hostSso, TestConfig.adf.hostIdentity, silentLogin);
loginSSOPage.clickOnSSOButton();
browser.ignoreSynchronization = true;
loginSSOPage.loginAPS(user, password);
loginSSOPage.loginSSOIdentityService(user, password);
navigationBarPage.navigateToProcessServicesCloudPage();
appListCloudComponent.checkApsContainer();
done();

View File

@@ -53,7 +53,7 @@ describe('Start Task', () => {
settingsPage.setProviderBpmSso(TestConfig.adf.hostBPM, TestConfig.adf.hostSso, TestConfig.adf.hostIdentity, silentLogin);
loginSSOPage.clickOnSSOButton();
browser.ignoreSynchronization = true;
loginSSOPage.loginAPS(user, password);
loginSSOPage.loginSSOIdentityService(user, password);
navigationBarPage.navigateToProcessServicesCloudPage();
appListCloudComponent.checkApsContainer();
appListCloudComponent.checkAppIsDisplayed(appName);

View File

@@ -54,7 +54,7 @@ describe('Task Header cloud component', () => {
settingsPage.setProviderBpmSso(TestConfig.adf.hostBPM, TestConfig.adf.hostSso, TestConfig.adf.hostIdentity, silentLogin);
loginSSOPage.clickOnSSOButton();
browser.ignoreSynchronization = true;
loginSSOPage.loginAPS(user, password);
loginSSOPage.loginSSOIdentityService(user, password);
await tasksService.init(user, password);
let createdTaskId = await tasksService.createStandaloneTask(basicCreatedTaskName, simpleApp);

View File

@@ -46,7 +46,7 @@ describe('Task filters cloud', () => {
settingsPage.setProviderBpmSso(TestConfig.adf.hostBPM, TestConfig.adf.hostSso, TestConfig.adf.hostIdentity, silentLogin);
loginSSOPage.clickOnSSOButton();
browser.ignoreSynchronization = true;
loginSSOPage.loginAPS(user, password);
loginSSOPage.loginSSOIdentityService(user, password);
});
beforeEach((done) => {

View File

@@ -68,7 +68,7 @@ describe('Edit task filters and task list properties', () => {
settingsPage.setProviderBpmSso(TestConfig.adf.hostBPM, TestConfig.adf.hostSso, TestConfig.adf.hostIdentity, silentLogin);
loginSSOPage.clickOnSSOButton();
browser.ignoreSynchronization = true;
loginSSOPage.loginAPS(user, password);
loginSSOPage.loginSSOIdentityService(user, password);
navigationBarPage.clickConfigEditorButton();

View File

@@ -48,7 +48,7 @@ describe('Task list cloud - selection', () => {
settingsPage.setProviderBpmSso(TestConfig.adf.hostBPM, TestConfig.adf.hostSso, TestConfig.adf.hostIdentity, silentLogin);
loginSSOPage.clickOnSSOButton();
browser.ignoreSynchronization = true;
loginSSOPage.loginAPS(user, password);
loginSSOPage.loginSSOIdentityService(user, password);
await tasksService.init(user, password);
for (let i = 0; i < noOfTasks; i++) {

View File

@@ -57,7 +57,7 @@ describe('Task filters cloud', () => {
settingsPage.setProviderBpmSso(TestConfig.adf.hostBPM, TestConfig.adf.hostSso, TestConfig.adf.hostIdentity, silentLogin);
loginSSOPage.clickOnSSOButton();
browser.ignoreSynchronization = true;
loginSSOPage.loginAPS(user, password);
loginSSOPage.loginSSOIdentityService(user, password);
await tasksService.init(user, password);
await tasksService.createStandaloneTask(createdTaskName, simpleApp);

View File

@@ -3,14 +3,15 @@
* @class config.test.config
*/
var HOST = process.env.URL_HOST_ADF;
const HOST = process.env.URL_HOST_ADF;
const HOST_BPM = process.env.URL_HOST_BPM_ADF;
const HOST_SSO = process.env.URL_HOST_SSO_ADF;
const HOST_IDENTITY = process.env.URL_HOST_IDENTITY;
var USERNAME = process.env.USERNAME_ADF;
var PASSWORD = process.env.PASSWORD_ADF;
var EMAIL = process.env.EMAIL_ADF;
var TIMEOUT = parseInt(process.env.TIMEOUT, 10);
const USERNAME = process.env.USERNAME_ADF;
const PASSWORD = process.env.PASSWORD_ADF;
const EMAIL = process.env.EMAIL_ADF;
const TIMEOUT = parseInt(process.env.TIMEOUT, 10);
const PROXY = process.env.PROXY_HOST_ADF;
module.exports = {
@@ -52,9 +53,16 @@ module.exports = {
hostBPM: "http://" + HOST_BPM,
hostSso: "http://" + HOST_SSO,
clientIdSso: "alfresco",
hostIdentity: "http://" + HOST_IDENTITY
hostSso: function () {
return "http://" + (HOST_SSO ? HOST_SSO : (PROXY + '/auth/realms/alfresco'));
}(),
hostIdentity: function () {
console.log((PROXY + '/auth'));
return "http://" + (HOST_IDENTITY ? HOST_IDENTITY : (PROXY + '/auth/admin/realms/alfresco'));
}()
},

View File

@@ -26,7 +26,7 @@ export class LoginSSOPage {
header = element(by.id('adf-header'));
loginError = element(by.css(`div[data-automation-id="login-error"]`));
loginAPS(username, password) {
loginSSOIdentityService(username, password) {
BrowserVisibility.waitUntilElementIsVisible(this.usernameField);
this.enterUsername(username);
this.enterPassword(password);

View File

@@ -15,13 +15,10 @@ async function main() {
hostEcm: program.host
});
console.log(program.username + program.password);
await this.alfrescoJsApi.login(program.username, program.password);
await deletetSite(this.alfrescoJsApi);
await emptyTrashCan(this.alfrescoJsApi);
}
async function emptyTrashCan(alfrescoJsApi) {

View File

@@ -15,11 +15,11 @@ show_help() {
echo "-u or --username"
echo "-p or --password"
echo "-e or --email"
echo "-b or --browser run the test in the browsrwer (No headless mode)"
echo "-b or --browser run the test in the browser (No headless mode)"
echo "-s or --spec run a single test file"
echo "-f or --folder run a single folder test"
echo "--seleniumServer configure a selenium server to use to run the e2e test"
echo "-proxy or --proxy proxy Back end URL to use only possibel to use with -dev option"
echo "-proxy or --proxy proxy Back end URL to use only possible to use with -dev option"
echo "-dev or --dev run it against local development environment it will deploy on localhost:4200 the current version of your branch"
echo "-host or --host URL of the Front end to test"
echo "-host_bpm URL of the Back end to test"