Skip to content

Commit

Permalink
Fix cd-ing into app root
Browse files Browse the repository at this point in the history
  • Loading branch information
Fredrik Lassen committed Nov 22, 2024
1 parent d86619e commit 650d905
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion commands/host/1x-playwright-host-install
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ fi

# Install basic
echo -e "${GREEN}Adjust .npmrc and installing @dxp/playwright-tools: ${NC}"
pushd test/playwright && echo '@dxp:registry=https://git.1xinternet.de/api/v4/packages/npm/' >> .npmrc && npm add -D @dxp/playwright-tools ; popd
pushd $DDEV_APPROOT/test/playwright && echo '@dxp:registry=https://git.1xinternet.de/api/v4/packages/npm/' >> .npmrc && npm add -D @dxp/playwright-tools ; popd

echo -e "\n${CYAN}Please check above for any comments/errors: you might have to run 'npx to test/playwright\n\n"
echo -e "${GREEN}To run tests change to 'test/playwright/' directory ('cd $DDEV_APPROOT/test/playwright/') and run 'npx playwright test example'\n"
3 changes: 2 additions & 1 deletion commands/host/1x-playwright-install
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ else
ddev_hostname=`ddev status -j | ddev exec jq -r .raw.hostnames[0]`
# @todo: better templating of this, e.g. we normally *don't* test in parallel in 4 browsers ...
# Make this work on MacOS and Linux >.<
cd $DDEV_APPROOT
if [[ $OSTYPE == darwin* ]]; then
pushd test/playwright && sed -i '' "s@// baseURL: 'http://127.0.0.1:3000',@baseURL: 'https://${ddev_hostname}',\n ignoreHTTPSErrors: true,@g" playwright.config.ts && popd
else
Expand All @@ -40,4 +41,4 @@ ddev install-playwright

# Install basic
echo -e "${GREEN}Adjust .npmrc and installing @dxp/playwright-tools: ${NC}"
pushd test/playwright && echo '@dxp:registry=https://git.1xinternet.de/api/v4/packages/npm/' >> .npmrc && npm add -D @dxp/playwright-tools ; popd
pushd $DDEV_APPROOT/test/playwright && echo '@dxp:registry=https://git.1xinternet.de/api/v4/packages/npm/' >> .npmrc && npm add -D @dxp/playwright-tools ; popd

0 comments on commit 650d905

Please sign in to comment.