Skip to content

Commit

Permalink
ci: update protractor dection logic
Browse files Browse the repository at this point in the history
  • Loading branch information
sinedied committed Aug 25, 2022
1 parent 050c387 commit 762e42c
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions scripts/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,18 +59,21 @@ do
ngx new --no-analytics --automate "$CWD/$file" "$TEST_APP_NAME" --no-insights
npm run test:ci

USE_PROTRACTOR=$(npm list --depth 0 --parseable protractor)
echo
echo "Unit tests completed."
echo

if [ ! -z "$USE_PROTRACTOR" ]; then
if [ -n "$(cat package.json | grep protractor)" ]; then
echo "Setting up puppeteer for protractor..."

# force specific puppeteer/webdriver version to match up
if [ "$NGX_PACKAGE_MANAGER" == "yarn" ]; then
yarn add -D puppeteer@16.2.0
yarn run webdriver-manager update --versions.chrome 104.0.5112.79 --gecko=false
yarn add -D webdriver-manager
yarn run webdriver-manager update --versions.chrome '104.0.5112.79' --gecko false
else
npm i -D puppeteer@16.2.0
npx webdriver-manager update --versions.chrome 104.0.5112.79 --gecko=false
npm i -D webdriver-manager
npx webdriver-manager update --versions.chrome '104.0.5112.79' --gecko false
fi
# force usage of local chrome binary, in headless mode
PROTRACTOR_CHROME_BIN=$(node -p "require('puppeteer').executablePath()") \
Expand All @@ -80,8 +83,16 @@ do
npm run e2e --if-present
fi

echo
echo "E2E tests completed."
echo

npm run build -- --no-progress

echo
echo "Build completed."
echo

if [ -n "$TEST_ANDROID" ]; then

# fix for Android SDK 31
Expand Down

0 comments on commit 762e42c

Please sign in to comment.