[ADF-4587] Fix e2e tests (#4757)

* Fix user_info test

* Removing duplication and hardcoded protocol

* Fix linting and update script

* Removing hardcoded protocol

* Add protocol to scripts

* Fix C260117

* Enable screenshots for cloud tests

* Update process-services-cloud-e2e.sh
This commit is contained in:
cristinaj
2019-05-22 10:15:12 +01:00
committed by Denys Vuika
parent 57a162fcf0
commit 339a6e7a18
12 changed files with 16 additions and 21 deletions
@@ -17,7 +17,6 @@
import { LoginSSOPage, SettingsPage } from '@alfresco/adf-testing';
import TestConfig = require('../test.config');
import { NavigationBarPage } from '../pages/adf/navigationBarPage';
import { UserInfoPage } from '@alfresco/adf-testing';
import { IdentityService, ApiService } from '@alfresco/adf-testing';
@@ -25,7 +24,6 @@ describe('User Info - SSO', () => {
const settingsPage = new SettingsPage();
const loginSSOPage = new LoginSSOPage();
const navigationBarPage = new NavigationBarPage();
const userInfoPage = new UserInfoPage();
let silentLogin, identityUser;
let identityService: IdentityService;
@@ -54,7 +52,6 @@ describe('User Info - SSO', () => {
});
it('[C290066] Should display UserInfo when login using SSO', () => {
navigationBarPage.navigateToProcessServicesCloudPage();
userInfoPage.clickUserProfile();
expect(userInfoPage.getSsoHeaderTitle()).toEqual(identityUser.firstName + ' ' + identityUser.lastName);
expect(userInfoPage.getSsoTitle()).toEqual(identityUser.firstName + ' ' + identityUser.lastName);
+1 -1
View File
@@ -3,7 +3,7 @@ var HOST = process.env.URL_HOST_ADF;
let proxy = require('http-proxy-middleware');
let targetProxy = 'http://' + (PROXY_HOST_ADF || HOST);
let targetProxy = (PROXY_HOST_ADF || HOST);
let fallback = require('connect-history-api-fallback');
module.exports = {
+2 -2
View File
@@ -3,7 +3,7 @@ var HOST = process.env.URL_HOST_ADF;
module.exports = {
"/alfresco": {
"target": "http://" + (PROXY_HOST_ADF || HOST),
"target": (PROXY_HOST_ADF || HOST),
"secure": false,
"pathRewrite": {
"^/alfresco/alfresco": ""
@@ -18,7 +18,7 @@ module.exports = {
}
},
"/activiti-app": {
"target": "http://" + (PROXY_HOST_ADF || HOST),
"target": (PROXY_HOST_ADF || HOST),
"secure": false,
"pathRewrite": {
"^/activiti-app/activiti-app": ""
+1 -3
View File
@@ -45,14 +45,12 @@ var APIUtils = function () {
*/
this.getBaseURL = function (application, urlComponentsParam) {
var urlComponents = {};
urlComponents.protocol = TestConfig[application].protocol;
urlComponents.hostname = TestConfig[application].host;
urlComponents.port = TestConfig[application].port;
urlComponents.path = TestConfig[application].apiContextRoot;
Object.assign(urlComponents, urlComponentsParam);
return url(urlComponents.protocol
+ "://" + urlComponents.hostname
return url(urlComponents.hostname
+ (urlComponents.port !== "" ? ":" + urlComponents.port : ""),
urlComponents.path);
};
+4 -4
View File
@@ -24,7 +24,7 @@ module.exports = {
/**
* base
*/
url: "http://" + HOST,
url: HOST,
/**
* adf port
@@ -51,7 +51,7 @@ module.exports = {
*/
adminPassword: PASSWORD,
hostBPM: "https://" + ( HOST_BPM || PROXY || HOST),
hostBPM: HOST_BPM || PROXY || HOST,
clientIdSso: "alfresco",
@@ -66,7 +66,7 @@ module.exports = {
baseUrl = HOST;
}
return `https://${baseUrl}/auth/realms/alfresco`;
return `${baseUrl}/auth/realms/alfresco`;
}(),
hostIdentity: function () {
@@ -83,7 +83,7 @@ module.exports = {
}
return `https://${baseUrl}/auth/admin/realms/alfresco`;
return `${baseUrl}/auth/admin/realms/alfresco`;
}()
},