Skip to content
This repository has been archived by the owner on Oct 8, 2024. It is now read-only.

Commit

Permalink
NEXT-17697 - Support recovery e2e env
Browse files Browse the repository at this point in the history
  • Loading branch information
pweyck committed Oct 14, 2021
1 parent a33e78b commit 7214b36
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 4 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,4 @@ chromedriver.log
### misc
.DS_Store
/composer.lock
.uniqueid.txt
1 change: 1 addition & 0 deletions dev-ops/common/actions/init-composer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ rm -rf dev-ops/analyze/vendor

composer update --no-interaction --optimize-autoloader --no-scripts
composer install --no-interaction --optimize-autoloader --working-dir=dev-ops/analyze
if [ -e platform/src/Recovery ]; then composer install --no-interaction --optimize-autoloader --working-dir=platform/src/Recovery; fi

if grep -q static-analyze platform/composer.json; then composer update --working-dir=platform; fi
2 changes: 1 addition & 1 deletion dev-ops/e2e/actions/prepare-environment.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#DESCRIPTION: Install dependencies and prepare database for Cypress usage

npm install --prefix vendor/shopware/platform/src/"__CYPRESS_ENV__"/Resources/app/"$(echo "__CYPRESS_ENV__" | tr '[:upper:]' '[:lower:]')"/test/e2e
if [ "__CYPRESS_ENV__" = "Recovery" ]; then cd platform/src/Recovery/Test/e2e; pwd; ls -las; npm install; else npm install --prefix platform/src/"__CYPRESS_ENV__"/Resources/app/"$(echo "__CYPRESS_ENV__" | tr '[:upper:]' '[:lower:]')"/test/e2e; fi
./psh.phar init-test-databases
./psh.phar e2e:dump-db

Expand Down
8 changes: 6 additions & 2 deletions dev-ops/e2e/scripts/open-local.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@ export APP_ENV=e2e
printf "\nCypress environment: ${CYPRESS_ENV}\n"
printf "App-URL: ${CYPRESS_baseUrl}\n"

# Start Cypress test runner
cd "./platform/src/$CYPRESS_ENV/Resources/app/$(echo $CYPRESS_ENV | tr '[:upper:]' '[:lower:]')/test/e2e" || exit
if [ $CYPRESS_ENV == "Recovery" ]; then
cd "./platform/src/Recovery/Test/e2e"
else
cd "./platform/src/$CYPRESS_ENV/Resources/app/$(echo $CYPRESS_ENV | tr '[:upper:]' '[:lower:]')/test/e2e" || exit
fi

# Start Cypress test runner
npm run open "${CYPRESS_PARAMS}"
7 changes: 6 additions & 1 deletion dev-ops/e2e/scripts/run-local.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,10 @@ bin/console cache:clear
bin/console e2e:dump-db

# Start Cypress in CLI
cd "./platform/src/$CYPRESS_ENV/Resources/app/$(echo $CYPRESS_ENV | tr '[:upper:]' '[:lower:]')/test/e2e" || exit
if [ $CYPRESS_ENV == "Recovery" ]; then
cd "./platform/src/Recovery/Test/e2e"
else
cd "./platform/src/$CYPRESS_ENV/Resources/app/$(echo $CYPRESS_ENV | tr '[:upper:]' '[:lower:]')/test/e2e" || exit
fi

./node_modules/.bin/cypress run $CYPRESS_PARAMS

0 comments on commit 7214b36

Please sign in to comment.