Skip to content

Commit

Permalink
Fix test-playwright scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
TrulsStenrud committed Feb 21, 2024
1 parent 745ffd9 commit d6f0050
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"test:e2e:docker:update-snapshots": "DOCKER=true playwright test --update-snapshots",
"playwright:clear-cache": "rm -rf playwright/.cache",
"test:component": "npm run playwright:clear-cache && playwright test -c playwright-ct.config.ts",
"test:component:docker": "npm ci && npm run playwright:clear-cache && playwright test -c playwright-ct.config.ts",
"posttest:component": "npm run playwright:clear-cache",
"test:component:ci": "CI=true npm run test:component",
"test:component:update-snapshots": "npm run playwright:clear-cache && playwright test -c playwright-ct.config.ts --update-snapshots",
Expand Down
6 changes: 3 additions & 3 deletions test-playwright-component-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ set -eu
#
# Some more work is needed to make it cross-platform.

cmd="npm run test:component"
cmd="npm run test:component:docker"
if [ "${1:-}" = "--update" ]; then
cmd="$cmd:update-snapshots"
shift
fi


docker_image=mcr.microsoft.com/playwright:v1.40.0-jammy
playwrightVersion=$(cat package.json | jq -r '.devDependencies."@playwright/experimental-ct-react"')
docker_image=mcr.microsoft.com/playwright:v$playwrightVersion-jammy
code=1

if [ -d "playwright/.cache" ] ; then
Expand Down
3 changes: 2 additions & 1 deletion test-playwright-e2e-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ else
base_url=http://host.docker.internal:3000
fi

docker_image=mcr.microsoft.com/playwright:v1.40.0-jammy
playwrightVersion=$(cat package.json | jq -r '.devDependencies."@playwright/test"')
docker_image=mcr.microsoft.com/playwright:v$playwrightVersion-jammy

docker pull "$docker_image"

Expand Down

0 comments on commit d6f0050

Please sign in to comment.