Skip to content

Commit 487659a

Browse files
committed
fixup! fixup! fixup! front: switch from yarn to npm
1 parent e715a27 commit 487659a

File tree

3 files changed

+8
-26
lines changed

3 files changed

+8
-26
lines changed

front/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Launches end to end tests.
3838

3939
It requires:
4040

41-
- Install playwright dependencies `cd ./front/ && yarn playwright install --with-deps`
41+
- Install playwright dependencies `cd ./front/ && npx playwright install --with-deps`
4242
- Backend containers to be up:
4343
`docker compose up --no-build --detach valkey postgres gateway core editoast`
4444
- Running front with `docker compose up --build --detach front`
@@ -48,7 +48,7 @@ Now you can run the test with `cd front/ && npm run e2e-tests`.
4848
If you are using a Linux distribution not supported by playwright (which only supports Windows,
4949
macOS and Ubuntu/Debian), you can instead start the tests inside a docker container using
5050
`osrd/scripts/run-front-playwright-container.sh`. You may pass the same options and arguments to
51-
this script as you would to `yarn e2e-tests` or `yarn playwright test`.
51+
this script as you would to `npm run e2e-tests` or `npx playwright test`.
5252

5353
> [!CAUTION] If you try to run `npm run start` instead of running it through docker, you'll notice
5454
> it doesn't work because the gateway can't access your local port from inside a container. 2

front/package-lock.json

+4-22
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scripts/run-front-playwright-container.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ if ! command -v jq &> /dev/null; then
1111
exit 1
1212
fi
1313
cd front
14-
VERSION=$(yarn list --pattern playwright --json | jq -r '.data.trees[].name | split("@")[-1]' | sort -u)
14+
VERSION=$(npm list --pattern playwright --json | jq -r '.dependencies["@playwright/test"].version' | sort -u)
1515
if [ "$(echo "$VERSION" | wc -l)" -ne 1 ]; then
1616
echo "Error: Zero or multiple playwright versions found: $VERSION" >&2
1717
exit 1
@@ -40,4 +40,4 @@ docker run -it --rm \
4040
-v "$PWD/front/playwright-report:/app/front/playwright-report" \
4141
-v "$PWD/front/test-results:/app/front/test-results" \
4242
-u "$(stat -c %u:%g .)" \
43-
osrd-playwright:latest yarn playwright test "${args[@]}"
43+
osrd-playwright:latest npx playwright test "${args[@]}"

0 commit comments

Comments
 (0)