Skip to content

Commit ee40939

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

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
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/docker/Dockerfile.playwright

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
ARG PLAYWRIGHT_VERSION=latest
22
FROM mcr.microsoft.com/playwright:$PLAYWRIGHT_VERSION
33

4-
COPY front/package.json front/yarn.lock /app/front/
4+
COPY front/package.json front/package-lock.json /app/front/
55
WORKDIR /app/front
6-
RUN yarn install --frozen-lockfile
6+
RUN npm install --frozen-lockfile
77

88
COPY front /app/front/
99
COPY tests /app/tests

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)