Skip to content

Commit

Permalink
[ADF-1960] automated C315180, C310200 and C313200 (#5891)
Browse files Browse the repository at this point in the history
* [ADF-1960] automated C315180, C310200 and C313200

* Add log and some fixes for scripts

* fix scripts e2e

Co-authored-by: Eugenio Romano <eugenio.romano@alfresco.com>
  • Loading branch information
2 people authored and mcchrys committed Jul 22, 2020
1 parent fc5f383 commit 0b10c7d
Show file tree
Hide file tree
Showing 8 changed files with 235 additions and 137 deletions.
142 changes: 76 additions & 66 deletions e2e/process-services-cloud/task-form-cloud-component-tab.e2e.ts

Large diffs are not rendered by default.

170 changes: 124 additions & 46 deletions e2e/process-services-cloud/task-form-cloud-component.e2e.ts

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion e2e/protractor.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ let specs = function () {

if (LIST_SPECS && LIST_SPECS !== '') {
arraySpecs = LIST_SPECS.split(',');
arraySpecs = arraySpecs.map((el) => './' + el);
arraySpecs = arraySpecs.map((el) => './' + el.replace('e2e/', ''));

specExists(arraySpecs);
} else {
Expand Down
13 changes: 8 additions & 5 deletions scripts/travis/e2e/content-services-e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,18 @@ fi;
#-b is needed to run the Folder upload test that are not workin in Headless chrome
RUN_E2E=$(echo ./scripts/test-e2e-lib.sh -host http://localhost:4200 -proxy "$E2E_HOST" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" -e "$E2E_EMAIL" --use-dist -b -save -m 4 || exit 1)
if [[ $AFFECTED_LIBS =~ "testing" || $AFFECTED_LIBS =~ "$CONTEXT_ENV" || "${TRAVIS_EVENT_TYPE}" == "push" ]]; then
echo "Run all e2e $CONTEXT_ENV"
$RUN_CHECK
$RUN_E2E --folder $CONTEXT_ENV
else if [[ $AFFECTED_E2E = "e2e/$CONTEXT_ENV" ]];
then
else if [[ $AFFECTED_E2E == "e2e/$CONTEXT_ENV" ]]; then
echo "Run affected e2e"

HEAD_SHA_BRANCH="$(git merge-base origin/$TRAVIS_BRANCH HEAD)"
LIST_SPECS="$(git diff --name-only $HEAD_SHA_BRANCH HEAD | grep "^e2e/$CONTEXT_ENV" | paste -sd , -)"
if [[ $LIST_SPECS != "" ]];
then
echo "Run $CONTEXT_ENV e2e based on the sha $HEAD_SHA_BRANCH with the specs: "$LIST_SPECS

echo "Run $CONTEXT_ENV e2e based on the sha $HEAD_SHA_BRANCH with the specs: "$LIST_SPECS

if [[ $LIST_SPECS != "" ]]; then
$RUN_CHECK
$RUN_E2E --specs "$LIST_SPECS"
fi
Expand Down
12 changes: 7 additions & 5 deletions scripts/travis/e2e/core-e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,18 @@ fi;
./node_modules/@alfresco/adf-cli/bin/adf-cli check-cs-env --host "$E2E_HOST" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" || exit 1
RUN_E2E=$(echo ./scripts/test-e2e-lib.sh -host http://localhost:4200 -proxy "$E2E_HOST" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" -e "$E2E_EMAIL" --use-dist -m 2 || exit 1)

if [[ $AFFECTED_LIBS =~ "testing" || $AFFECTED_LIBS =~ "$CONTEXT_ENV" || "${TRAVIS_EVENT_TYPE}" == "push" ]];
then
if [[ $AFFECTED_LIBS =~ "testing" || $AFFECTED_LIBS =~ "$CONTEXT_ENV" || "${TRAVIS_EVENT_TYPE}" == "push" ]]; then
echo "Run all e2e $CONTEXT_ENV"
$RUN_E2E --folder $CONTEXT_ENV || exit 1
else if [[ $AFFECTED_E2E = "e2e/$CONTEXT_ENV" ]];
then
else if [[ $AFFECTED_E2E == "e2e/$CONTEXT_ENV" ]]; then
echo "Run affected e2e"
HEAD_SHA_BRANCH="$(git merge-base origin/$TRAVIS_BRANCH HEAD)"
LIST_SPECS="$(git diff --name-only $HEAD_SHA_BRANCH HEAD | grep "^e2e/$CONTEXT_ENV" | paste -sd , -)"

echo "Run $CONTEXT_ENV e2e based on the sha $HEAD_SHA_BRANCH with the specs: "$LIST_SPECS

if [[ $LIST_SPECS != "" ]];
then
echo "Run $CONTEXT_ENV e2e based on the sha $HEAD_SHA_BRANCH with the specs: "$LIST_SPECS
$RUN_E2E --specs "$LIST_SPECS" || exit 1
fi
fi
Expand Down
14 changes: 7 additions & 7 deletions scripts/travis/e2e/process-services-cloud-e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,20 @@ check_env(){
./node_modules/@alfresco/adf-cli/bin/adf-cli check-cs-env --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_EVENT_TYPE}" == "push" ]];
then
echo "Case 1 - adf-testing has been changed";
if [[ $AFFECTED_LIBS =~ "testing" || $AFFECTED_LIBS =~ "$CONTEXT_ENV" || "${TRAVIS_EVENT_TYPE}" == "push" ]]; then
echo "Run all e2e $CONTEXT_ENV"
check_env;
$RUN_E2E --folder $CONTEXT_ENV
else if [[ $AFFECTED_E2E = "e2e/$CONTEXT_ENV" ]];
then
echo "Case 2 - e2e/$CONTEXT_ENV folder has been changed";
else if [[ $AFFECTED_E2E == "e2e/$CONTEXT_ENV" ]]; then
echo "Run affected e2e"
check_env;
HEAD_SHA_BRANCH="$(git merge-base origin/$TRAVIS_BRANCH HEAD)"
LIST_SPECS="$(git diff --name-only $HEAD_SHA_BRANCH HEAD | grep "^e2e/$CONTEXT_ENV/" | paste -sd , -)"

echo "Run $CONTEXT_ENV e2e based on the sha $HEAD_SHA_BRANCH with the specs: "$LIST_SPECS

if [[ $LIST_SPECS != "" ]];
then
echo "Run $CONTEXT_ENV e2e based on the sha $HEAD_SHA_BRANCH with the specs: "$LIST_SPECS
$RUN_E2E --specs "$LIST_SPECS"
fi
fi
Expand Down
13 changes: 8 additions & 5 deletions scripts/travis/e2e/process-services-e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,19 @@ fi;
./node_modules/@alfresco/adf-cli/bin/adf-cli check-ps-env --host "$E2E_HOST" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" || exit 1
RUN_E2E=$(echo ./scripts/test-e2e-lib.sh -host http://localhost:4200 -proxy "$E2E_HOST" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" -e "$E2E_EMAIL" --use-dist -m 2 || exit 1)

if [[ $AFFECTED_LIBS =~ "testing" || $AFFECTED_LIBS =~ "$CONTEXT_ENV" || "${TRAVIS_EVENT_TYPE}" == "push" ]];
then
if [[ $AFFECTED_LIBS =~ "testing" || $AFFECTED_LIBS =~ "$CONTEXT_ENV" || "${TRAVIS_EVENT_TYPE}" == "push" ]]; then
echo "Run all e2e $CONTEXT_ENV"
$RUN_E2E --folder $CONTEXT_ENV
else if [[ $AFFECTED_E2E = "e2e/$CONTEXT_ENV" ]];
then
else if [[ $AFFECTED_E2E == "e2e/$CONTEXT_ENV" ]]; then
echo "Run affected e2e"

HEAD_SHA_BRANCH="$(git merge-base origin/$TRAVIS_BRANCH HEAD)"
LIST_SPECS="$(git diff --name-only $HEAD_SHA_BRANCH HEAD | grep "^e2e/$CONTEXT_ENV/" | paste -sd , -)"

echo "Run $CONTEXT_ENV e2e based on the sha $HEAD_SHA_BRANCH with the specs: "$LIST_SPECS

if [[ $LIST_SPECS != "" ]];
then
echo "Run $CONTEXT_ENV e2e based on the sha $HEAD_SHA_BRANCH with the specs: "$LIST_SPECS
$RUN_E2E --specs "$LIST_SPECS"
fi
fi
Expand Down
6 changes: 4 additions & 2 deletions scripts/travis/e2e/search-e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,15 @@ RUN_E2E=$(echo ./scripts/test-e2e-lib.sh -host http://localhost:4200 -proxy "$E2
if [[ $AFFECTED_LIBS =~ "testing" || $AFFECTED_LIBS =~ "content-services" || "${TRAVIS_EVENT_TYPE}" == "push" ]];
then
$RUN_E2E --folder $CONTEXT_ENV
else if [[ $AFFECTED_E2E = "e2e/$CONTEXT_ENV" ]];
else if [[ $AFFECTED_E2E == "e2e/$CONTEXT_ENV" ]];
then
HEAD_SHA_BRANCH="$(git merge-base origin/$TRAVIS_BRANCH HEAD)"
LIST_SPECS="$(git diff --name-only $HEAD_SHA_BRANCH HEAD | grep "^e2e/$CONTEXT_ENV" | paste -sd , -)"

echo "Run $CONTEXT_ENV e2e based on the sha $HEAD_SHA_BRANCH with the specs: "$LIST_SPECS

if [[ $LIST_SPECS != "" ]];
then
echo "Run $CONTEXT_ENV e2e based on the sha $HEAD_SHA_BRANCH with the specs: "$LIST_SPECS
$RUN_E2E --specs "$LIST_SPECS"
fi
fi
Expand Down

0 comments on commit 0b10c7d

Please sign in to comment.