mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ACS-259] refactor login page (#5733)
* refator login page * refator login page * remove obsolete classes and move what is needed in the test pck * fix const * revert modify * remove duplicate browser property * fix build * fix * fix * fix lint * move drop action in testing remove not necessary space js-api centralize content * first refactor use js-api * fix protractor * refactor test config * simplify properties fix namings * ps cloud simplify remove unused js files * id fix * fix search test simplify environment var step 1 * fix lint * first user iteration fix * fix model * unify use of apiService * first step automatic user creation Identity * refactor creation user content-services * refactor creation user search * refactor creation user core * process service refactoring 1 * process service refactoring 1 * process service refactoring 2 * fix process * appconfig * fix process util * fix gallery * fix "this" reference issues * fix incorrect import paths * fix core * some fixes * allign * fix some test remove structure folder and move in actions * fixes * move folders in the right place * fix * fix rebase * solve build issue * fix e2e * change init aae * order api and some fixes * fix possible not valid password * fix some ps test * replace host port also in objects * Update app-config.service.ts * fix process * fix process test * process service cloud fix * fiexs * modify init script * fix two test * remove unused property * host issue * not use npx * fix ps cloud test Co-authored-by: Denys Vuika <denys.vuika@gmail.com>
This commit is contained in:
@@ -10,10 +10,10 @@ fs.readFile(configPath, (err, appConfigString) => {
|
||||
if (err) throw err;
|
||||
let appConfig = JSON.parse(appConfigString);
|
||||
appConfig.providers = process.env.PROVIDERS || 'ALL';
|
||||
appConfig.bpmHost = (process.env.PROXY_HOST_ADF || process.env.URL_HOST_BPM_ADF || process.env.URL_HOST_ADF);
|
||||
appConfig.bpmHost = (process.env.PROXY_HOST_ADF || process.env.URL_HOST_ADF);
|
||||
appConfig.ecmHost = (process.env.PROXY_HOST_ADF || process.env.URL_HOST_ADF);
|
||||
appConfig.identityHost = process.env.URL_HOST_IDENTITY;
|
||||
appConfig.oauth2.host = process.env.URL_HOST_SSO_ADF;
|
||||
appConfig.identityHost = (process.env.HOST_SSO + '/auth/admin/realms/alfresco');
|
||||
appConfig.oauth2.host = (process.env.HOST_SSO + '/auth/realms/alfresco');
|
||||
appConfig.notificationDefaultDuration = process.env.NOTIFICATION_LAST || 8000;
|
||||
appConfig.authType = process.env.AUTH_TYPE || 'BASIC';
|
||||
|
||||
|
@@ -23,12 +23,12 @@ async function main() {
|
||||
|
||||
async function checkEnv() {
|
||||
try {
|
||||
this.alfrescoJsApi = new alfrescoApi.AlfrescoApiCompatibility({
|
||||
const alfrescoJsApi = new alfrescoApi.AlfrescoApiCompatibility({
|
||||
provider: 'ECM',
|
||||
hostEcm: program.host
|
||||
});
|
||||
|
||||
await this.alfrescoJsApi.login(program.username, program.password);
|
||||
await alfrescoJsApi.login(program.username, program.password);
|
||||
} catch (e) {
|
||||
console.log('Login error environment down or inaccessible');
|
||||
counter++;
|
||||
@@ -46,12 +46,12 @@ async function checkEnv() {
|
||||
async function checkDiskSpaceFullEnv() {
|
||||
try {
|
||||
|
||||
this.alfrescoJsApi = new alfrescoApi.AlfrescoApiCompatibility({
|
||||
const alfrescoJsApi = new alfrescoApi.AlfrescoApiCompatibility({
|
||||
provider: 'ECM',
|
||||
hostEcm: program.host
|
||||
});
|
||||
|
||||
await this.alfrescoJsApi.login(program.username, program.password);
|
||||
await alfrescoJsApi.login(program.username, program.password);
|
||||
|
||||
let folder;
|
||||
|
||||
@@ -88,7 +88,7 @@ async function checkDiskSpaceFullEnv() {
|
||||
}
|
||||
);
|
||||
|
||||
this.alfrescoJsApi.node.deleteNode(uploadedFile.entry.id, {permanent: true});
|
||||
alfrescoJsApi.node.deleteNode(uploadedFile.entry.id, {permanent: true});
|
||||
} catch (error) {
|
||||
counter++;
|
||||
|
||||
|
@@ -20,12 +20,12 @@ async function main() {
|
||||
|
||||
async function checkEnv() {
|
||||
try {
|
||||
this.alfrescoJsApi = new alfrescoApi.AlfrescoApiCompatibility({
|
||||
const alfrescoJsApi = new alfrescoApi.AlfrescoApiCompatibility({
|
||||
provider: 'BPM',
|
||||
hostBpm: program.host
|
||||
});
|
||||
|
||||
await this.alfrescoJsApi.login(program.username, program.password);
|
||||
await alfrescoJsApi.login(program.username, program.password);
|
||||
} catch (e) {
|
||||
console.log('Login error environment down or inaccessible');
|
||||
counter++;
|
||||
|
@@ -35,18 +35,21 @@ async function main() {
|
||||
|
||||
host = program.host;
|
||||
|
||||
let alfrescoJsApi;
|
||||
|
||||
try {
|
||||
this.alfrescoJsApi = new alfrescoApi.AlfrescoApiCompatibility(config);
|
||||
await this.alfrescoJsApi.login(program.username, program.password);
|
||||
alfrescoJsApi = new alfrescoApi.AlfrescoApiCompatibility(config);
|
||||
await alfrescoJsApi.login(program.username, program.password);
|
||||
} catch (e) {
|
||||
console.log('Login error' + e);
|
||||
return;
|
||||
}
|
||||
|
||||
for (const key of Object.keys(RESOURCES_CLOUD.ACTIVITI_CLOUD_APPS)) {
|
||||
await deleteApp(alfrescoJsApi, RESOURCES_CLOUD.ACTIVITI_CLOUD_APPS[key].name);
|
||||
}
|
||||
|
||||
let notRunning = await getNotRunningApps(this.alfrescoJsApi);
|
||||
let notRunning = await getNotRunningApps(alfrescoJsApi);
|
||||
|
||||
if (notRunning && notRunning.length > 0) {
|
||||
console.log(JSON.stringify(notRunning));
|
||||
|
@@ -10,25 +10,25 @@ async function main() {
|
||||
.option('-u, --username [type]', 'username RANCHER')
|
||||
.parse(process.argv);
|
||||
|
||||
this.alfrescoJsApi = new alfrescoApi.AlfrescoApiCompatibility({
|
||||
const alfrescoJsApi = new alfrescoApi.AlfrescoApiCompatibility({
|
||||
provider: 'ECM',
|
||||
hostEcm: program.host
|
||||
});
|
||||
|
||||
try {
|
||||
await this.alfrescoJsApi.login(program.username, program.password);
|
||||
await alfrescoJsApi.login(program.username, program.password);
|
||||
} catch (error) {
|
||||
console.log(JSON.stringify(error));
|
||||
}
|
||||
|
||||
console.log('====== Clean Root ======');
|
||||
await cleanRoot(this.alfrescoJsApi);
|
||||
await cleanRoot(alfrescoJsApi);
|
||||
|
||||
console.log('====== Clean Sites ======');
|
||||
await deleteSite(this.alfrescoJsApi);
|
||||
await deleteSite(alfrescoJsApi);
|
||||
|
||||
console.log('====== Empty Trash ======');
|
||||
await emptyTrashCan(this.alfrescoJsApi);
|
||||
await emptyTrashCan(alfrescoJsApi);
|
||||
}
|
||||
|
||||
async function cleanRoot(alfrescoJsApi) {
|
||||
@@ -75,7 +75,7 @@ async function emptyTrashCan(alfrescoJsApi) {
|
||||
}
|
||||
|
||||
async function deleteSite(alfrescoJsApi) {
|
||||
let listSites = await this.alfrescoJsApi.core.sitesApi.getSites();
|
||||
let listSites = alfrescoJsApi.core.sitesApi.getSites();
|
||||
|
||||
if (listSites.list.pagination.totalItems > 1) {
|
||||
for (let i = 0; i < listSites.list.entries.length; i++) {
|
||||
|
@@ -26,8 +26,6 @@ show_help() {
|
||||
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"
|
||||
echo "-host_identity URL of the identity service backend to test"
|
||||
echo "-host_sso the entire path including the name of the realm"
|
||||
echo "-save save the error screenshot and report in the remote env"
|
||||
echo "-timeout or --timeout override the timeout foe the wait utils"
|
||||
@@ -69,19 +67,9 @@ set_host(){
|
||||
export URL_HOST_ADF=$HOST
|
||||
}
|
||||
|
||||
set_host_bpm(){
|
||||
HOST_BPM=$1
|
||||
export URL_HOST_BPM_ADF=$HOST_BPM
|
||||
}
|
||||
|
||||
set_host_sso(){
|
||||
HOST_SSO=$1
|
||||
export URL_HOST_SSO_ADF=$HOST_SSO
|
||||
}
|
||||
|
||||
set_host_identity(){
|
||||
HOST_IDENTITY=$1
|
||||
export URL_HOST_IDENTITY=$HOST_IDENTITY
|
||||
export HOST_SSO=$HOST_SSO
|
||||
}
|
||||
|
||||
set_specs(){
|
||||
@@ -182,9 +170,7 @@ while [[ $1 == -* ]]; do
|
||||
-s|--seleniumServer) set_selenium $2; shift 2;;
|
||||
-host|--host) set_host $2; shift 2;;
|
||||
-log|--log) set_log; shift ;;
|
||||
-host_bpm|--host_bpm) set_host_bpm $2; shift 2;;
|
||||
-host_sso|--host_sso) set_host_sso $2; shift 2;;
|
||||
-host_identity|--host_identity) set_host_identity $2; shift 2;;
|
||||
-l|--lint) lint; shift;;
|
||||
-m|--maxInstances) max_instances $2; shift 2;;
|
||||
-vjsapi) version_js_api $2; shift 2;;
|
||||
|
@@ -4,7 +4,9 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
cd $DIR/../../../
|
||||
|
||||
CONTEXT_ENV="content-services"
|
||||
export CONTEXT_ENV="content-services"
|
||||
export PROVIDER='ECM'
|
||||
export AUTH_TYPE='BASIC'
|
||||
|
||||
./scripts/git-util/check-branch-updated.sh -b $TRAVIS_BRANCH || exit 1;
|
||||
|
||||
|
@@ -4,7 +4,9 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
cd $DIR/../../../
|
||||
|
||||
CONTEXT_ENV="core"
|
||||
export CONTEXT_ENV="core"
|
||||
export PROVIDER='ALL'
|
||||
export AUTH_TYPE='BASIC'
|
||||
|
||||
./scripts/git-util/check-branch-updated.sh -b $TRAVIS_BRANCH || exit 1;
|
||||
|
||||
|
@@ -2,6 +2,9 @@
|
||||
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
export PROVIDER='BPM'
|
||||
export AUTH_TYPE='BASIC'
|
||||
|
||||
cd $DIR/../../../
|
||||
|
||||
./scripts/git-util/check-branch-updated.sh -b $TRAVIS_BRANCH || exit 1;
|
||||
|
@@ -4,8 +4,8 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
cd $DIR/../../../
|
||||
|
||||
CONTEXT_ENV="process-services-cloud"
|
||||
export PROVIDERS="BPMN"
|
||||
export CONTEXT_ENV="process-services-cloud"
|
||||
export PROVIDER="ALL"
|
||||
export AUTH_TYPE="OAUTH"
|
||||
|
||||
./scripts/git-util/check-branch-updated.sh -b $TRAVIS_BRANCH || exit 1;
|
||||
@@ -13,9 +13,9 @@ export AUTH_TYPE="OAUTH"
|
||||
AFFECTED_LIBS="$(./scripts/affected-libs.sh -gnu -b $TRAVIS_BRANCH)";
|
||||
AFFECTED_E2E="$(./scripts/git-util/affected-folder.sh -b $TRAVIS_BRANCH -f "e2e/$CONTEXT_ENV")";
|
||||
|
||||
RUN_E2E=$(echo ./scripts/test-e2e-lib.sh -host http://localhost:4200 -proxy "$E2E_HOST_BPM" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" -e "$E2E_EMAIL" -host_sso "$E2E_HOST_SSO" -host_bpm "$E2E_HOST_BPM" -host_identity "$E2E_HOST_IDENTITY" -identity_admin_email "$E2E_ADMIN_EMAIL_IDENTITY" -identity_admin_password "$E2E_ADMIN_PASSWORD_IDENTITY" -prefix $TRAVIS_BUILD_NUMBER --use-dist -m 2 -save )
|
||||
RUN_E2E=$(echo ./scripts/test-e2e-lib.sh -host http://localhost:4200 -proxy "$E2E_HOST_BPM" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" -e "$E2E_EMAIL" -host_sso "$E2E_HOST_SSO" -identity_admin_email "$E2E_ADMIN_EMAIL_IDENTITY" -identity_admin_password "$E2E_ADMIN_PASSWORD_IDENTITY" -prefix $TRAVIS_BUILD_NUMBER --use-dist -m 2 -save )
|
||||
|
||||
npx @alfresco/adf-cli init-aae-env --host "$E2E_HOST_BPM" --oauth "$E2E_HOST_SSO" --modelerUsername "$E2E_MODELER_USERNAME" --modelerPassword "$E2E_MODELER_PASSWORD" --devopsUsername "$E2E_DEVOPS_USERNAME" --devopsPassword "$E2E_DEVOPS_PASSWORD" --clientId 'activiti' || exit 1
|
||||
./node_modules/@alfresco/adf-cli/bin/adf-cli init-aae-env --host "$E2E_HOST_BPM" --oauth "$E2E_HOST_SSO" --modelerUsername "$E2E_MODELER_USERNAME" --modelerPassword "$E2E_MODELER_PASSWORD" --devopsUsername "$E2E_DEVOPS_USERNAME" --devopsPassword "$E2E_DEVOPS_PASSWORD" --clientId 'activiti' || exit 1
|
||||
node ./scripts/check-env/check-cs-env.js --host "$E2E_HOST_BPM" -u "$E2E_ADMIN_EMAIL_IDENTITY" -p "$E2E_ADMIN_PASSWORD_IDENTITY" || exit 1
|
||||
|
||||
if [[ $AFFECTED_LIBS =~ "testing" || $AFFECTED_LIBS =~ "$CONTEXT_ENV" || $TRAVIS_PULL_REQUEST == "false" ]];
|
||||
|
@@ -4,7 +4,9 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
cd $DIR/../../../
|
||||
|
||||
CONTEXT_ENV="process-services"
|
||||
export CONTEXT_ENV="process-services"
|
||||
export PROVIDER='BPM'
|
||||
export AUTH_TYPE='BASIC'
|
||||
|
||||
./scripts/git-util/check-branch-updated.sh -b $TRAVIS_BRANCH || exit 1;
|
||||
|
||||
|
@@ -4,7 +4,9 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
cd $DIR/../../../
|
||||
|
||||
CONTEXT_ENV="search"
|
||||
export CONTEXT_ENV="search"
|
||||
export PROVIDER='ECM'
|
||||
export AUTH_TYPE='BASIC'
|
||||
|
||||
./scripts/git-util/check-branch-updated.sh -b $TRAVIS_BRANCH || exit 1;
|
||||
|
||||
|
Reference in New Issue
Block a user