Enable tests and add a newly created user to run the tests. (#4796)

* enabled tests and added the new user to run the tests.

* lint fix

* adding a new user and add the user to hr group which will be used when deploying the apps.

* Test commit

* adding a new user and add the user to hr group which will be used when deploying the apps.

* linting fixes

* crc's moved the roles constants to identityService.

* crc's moved the roles constants to identityService.

* wrapped the createIdentityUser and assign Role calls into 1 method and used in the tests.

* wrapped the createIdentityUser and assign Role calls into 1 method and used in the tests.

* Added a method in identityService to pass the required roles to be added in a string array.

* linting fixes

* added the command line arguments to run the e2e tests -identity_admin_email and -identity_admin_password

* added the command line arguments to run the e2e tests -identity_admin_email and -identity_admin_password

* crc's, removed the step to add user to the hr group, as not needed in this test.

* renamed the E2E travis variable to end with identity.

* replaced the candidateuserapp with candidatebaseapp

* replaced candidateuserapp with candidatebaseapp

* replaced candidateuserapp with candidatebaseapp

* replaced candidateuserapp with candidatebaseapp

* timeout wait for the test to pass.

* crc's
This commit is contained in:
Geeta Mandakini Ayyalasomayajula
2019-06-06 11:12:05 +01:00
committed by Eugenio Romano
parent 3d73e94b5d
commit e65e32e0cf
30 changed files with 504 additions and 253 deletions

View File

@@ -263,7 +263,7 @@ async function deployApp(apiService, app, name) {
"version": app.entry.name,
"security": [{"role": "APS_ADMIN", "groups": [], "users": ["admin.adf"]}, {
"role": "APS_USER",
"groups": [],
"groups": ["hr"],
"users": ["admin.adf"]
}]
};

View File

@@ -17,6 +17,8 @@ show_help() {
echo "--env"
echo "-u or --username"
echo "-p or --password"
echo "-identity_admin_email"
echo "-identity_admin_password"
echo "-e or --email"
echo "-b or --browser run the test in the browser (No headless mode)"
echo "-s or --spec run a single test file"
@@ -46,6 +48,14 @@ set_password(){
PASSWORD=$1
export PASSWORD_ADF=$PASSWORD
}
set_identity_admin_email(){
IDENTITY_ADMIN_EMAIL=$1
export IDENTITY_ADMIN_EMAIL=$IDENTITY_ADMIN_EMAIL
}
set_identity_admin_password(){
IDENTITY_ADMIN_PASSWORD=$1
export IDENTITY_ADMIN_PASSWORD=$IDENTITY_ADMIN_PASSWORD
}
set_email(){
EMAIL=$1
export EMAIL_ADF=$EMAIL
@@ -149,6 +159,8 @@ while [[ $1 == -* ]]; do
-h|--help|-\?) show_help; exit 0;;
-u|--username) set_username $2; shift 2;;
-p|--password) set_password $2; shift 2;;
-identity_admin_email) set_identity_admin_email $2; shift 2;;
-identity_admin_password) set_identity_admin_password $2; shift 2;;
-e|--email) set_email $2; shift 2;;
-f|--folder) set_test_folder $2; shift 2;;
-timeout|--timeout) set_timeout $2; shift 2;;

View File

@@ -12,7 +12,7 @@ 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_CHECK=$(echo node ./scripts/check-env/check-activiti-env.js --host "$E2E_HOST_BPM" --oauth "$E2E_HOST_SSO" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" --client 'activiti' || exit 1 )
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" --use-dist )
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" --use-dist )
if [[ $AFFECTED_LIBS =~ "$CONTEXT_ENV$" || $TRAVIS_PULL_REQUEST == "false" ]];
then