Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions commands/host/1x-playwright-install
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,16 @@ ddev restart

ddev exec -d /var/www/html/ "mkdir -p test/playwright"

# To install with npx.
pushd $DDEV_APPROOT/test/playwright && npx --yes @1xinternet/create-dxp-playwright --lang=Javascript --quiet
# Let's make sure all the @dxp-scoped package is defined.
DXP_REGISTRY=$(ddev exec "npm config get @dxp:registry")

if [ -z "$DXP_REGISTRY" ] ; then
echo "The @dxp-scope is not configured inside the container aborting. Consider running the command 'ddev 1x-token-setup'!"
exit 1
fi

# Use our forked starterkit https://github.com/1xINTERNET/create-dxp-playwright to scaffold.
ddev exec -d /var/www/html/test/playwright "npx --yes @1xinternet/create-dxp-playwright --lang=Javascript --quiet"

# Install playwright *inside* the ddev container (see lullabot/ddev-playwright)
ddev install-playwright