mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-12 17:04:57 +00:00
[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:
parent
57a162fcf0
commit
339a6e7a18
@ -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);
|
||||
|
@ -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 = {
|
||||
|
@ -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": ""
|
||||
|
@ -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);
|
||||
};
|
||||
|
@ -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`;
|
||||
}()
|
||||
|
||||
},
|
||||
|
@ -175,7 +175,7 @@ exports.config = {
|
||||
|
||||
directConnect: DIRECT_CONNECCT,
|
||||
|
||||
baseUrl: "http://" + HOST,
|
||||
baseUrl: HOST,
|
||||
|
||||
params: {
|
||||
config: {
|
||||
|
@ -9,5 +9,5 @@ AFFECTED_LIBS="$(./scripts/affected-libs.sh -gnu -b $TRAVIS_BRANCH)";
|
||||
if [[ $AFFECTED_LIBS =~ "content-services$" || $AFFECTED_E2E = "e2e" || $TRAVIS_PULL_REQUEST == "false" ]];
|
||||
then
|
||||
node ./scripts/check-env/check-cs-env.js --host "$E2E_HOST" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" || exit 1;
|
||||
./scripts/test-e2e-lib.sh -host localhost:4200 -proxy "$E2E_HOST" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" -e "$E2E_EMAIL" --folder content-services --skip-lint --use-dist -b || exit 1;
|
||||
./scripts/test-e2e-lib.sh -host http://localhost:4200 -proxy "$E2E_HOST" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" -e "$E2E_EMAIL" --folder content-services --skip-lint --use-dist -b || exit 1;
|
||||
fi;
|
||||
|
@ -10,5 +10,5 @@ if [[ $AFFECTED_LIBS =~ "core$" || $AFFECTED_E2E = "e2e" || $TRAVIS_PULL_REQUEST
|
||||
then
|
||||
node ./scripts/check-env/check-ps-env.js --host "$E2E_HOST" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" || exit 1;
|
||||
node ./scripts/check-env/check-cs-env.js --host "$E2E_HOST" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" || exit 1;
|
||||
./scripts/test-e2e-lib.sh -host localhost:4200 -proxy "$E2E_HOST" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" -e "$E2E_EMAIL" --folder core --skip-lint -save --use-dist -b || exit 1;
|
||||
./scripts/test-e2e-lib.sh -host http://localhost:4200 -proxy "$E2E_HOST" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" -e "$E2E_EMAIL" --folder core --skip-lint -save --use-dist -b || exit 1;
|
||||
fi;
|
||||
|
@ -9,5 +9,5 @@ AFFECTED_LIBS="$(./scripts/affected-libs.sh -gnu -b $TRAVIS_BRANCH)";
|
||||
if [[ $AFFECTED_LIBS =~ "process-services-cloud$" || $AFFECTED_E2E = "e2e" || $TRAVIS_PULL_REQUEST == "false" ]];
|
||||
then
|
||||
node ./scripts/check-env/check-ps-env.js --host "$E2E_HOST" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" || exit 1;
|
||||
./scripts/test-e2e-lib.sh -host localhost:4200 -proxy "$E2E_HOST" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" -e "$E2E_EMAIL" --folder insights --skip-lint --use-dist || exit 1;
|
||||
./scripts/test-e2e-lib.sh -host http://localhost:4200 -proxy "$E2E_HOST" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" -e "$E2E_EMAIL" --folder insights --skip-lint --use-dist || exit 1;
|
||||
fi;
|
||||
|
@ -8,6 +8,6 @@ AFFECTED_E2E="$(./scripts/affected-folder.sh -b $TRAVIS_BRANCH -f "e2e")";
|
||||
AFFECTED_LIBS="$(./scripts/affected-libs.sh -gnu -b $TRAVIS_BRANCH)";
|
||||
if [[ $AFFECTED_LIBS =~ "process-services-cloud$" || $AFFECTED_E2E = "e2e" || $TRAVIS_PULL_REQUEST == "false" ]];
|
||||
then
|
||||
node ./scripts/check-env/check-activiti-env.js --host "$E2E_HOST_BPM" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" --client 'activiti' || exit 1;
|
||||
./scripts/test-e2e-lib.sh -host localhost:4200 -proxy "$E2E_HOST_BPM" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" -e "$E2E_EMAIL" --folder process-services-cloud --skip-lint --use-dist -b || exit 1;
|
||||
node ./scripts/check-env/check-activiti-env.js --host "$E2E_HOST" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" --client 'activiti' || exit 1;
|
||||
./scripts/test-e2e-lib.sh -host http://localhost:4200 -proxy "$E2E_HOST" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" -e "$E2E_EMAIL" -host_sso "$E2E_HOST_IDENTITY" -host_bpm "$E2E_HOST_BPM" -host_identity "$E2E_HOST_IDENTITY" --folder process-services-cloud --skip-lint --use-dist -b -save || exit 1;
|
||||
fi;
|
||||
|
@ -9,5 +9,5 @@ AFFECTED_LIBS="$(./scripts/affected-libs.sh -gnu -b $TRAVIS_BRANCH)";
|
||||
if [[ $AFFECTED_LIBS =~ "process-services$" || $AFFECTED_E2E = "e2e" || $TRAVIS_PULL_REQUEST == "false" ]];
|
||||
then
|
||||
node ./scripts/check-env/check-ps-env.js --host "$E2E_HOST" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" || exit 1;
|
||||
./scripts/test-e2e-lib.sh -host localhost:4200 -proxy "$E2E_HOST" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" -e "$E2E_EMAIL" --folder process-services --skip-lint --use-dist -b || exit 1;
|
||||
./scripts/test-e2e-lib.sh -host http://localhost:4200 -proxy "$E2E_HOST" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" -e "$E2E_EMAIL" --folder process-services --skip-lint --use-dist -b || exit 1;
|
||||
fi;
|
||||
|
@ -9,5 +9,5 @@ AFFECTED_LIBS="$(./scripts/affected-libs.sh -gnu -b $TRAVIS_BRANCH)";
|
||||
if [[ $AFFECTED_LIBS =~ "content-services$" || $AFFECTED_E2E = "e2e" || $TRAVIS_PULL_REQUEST == "false" ]];
|
||||
then
|
||||
node ./scripts/check-env/check-cs-env.js --host "$E2E_HOST" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" || exit 1;
|
||||
./scripts/test-e2e-lib.sh -host localhost:4200 -proxy "$E2E_HOST" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" -e "$E2E_EMAIL" --folder search --skip-lint --use-dist -save -b || exit 1;
|
||||
./scripts/test-e2e-lib.sh -host http://localhost:4200 -proxy "$E2E_HOST" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" -e "$E2E_EMAIL" --folder search --skip-lint --use-dist -save -b || exit 1;
|
||||
fi;
|
||||
|
Loading…
x
Reference in New Issue
Block a user