You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`docker compose up --no-build --detach valkey postgres gateway core editoast`
44
44
- Running front with `docker compose up --build --detach front`
45
45
46
-
Now you can run the test with `cd front/ && yarn e2e-tests`.
46
+
Now you can run the test with `cd front/ && npm run e2e-tests`.
47
47
48
-
If you are using a Linux distribution not supported by playwright (which only supports Windows, macOS and Ubuntu/Debian),
49
-
you can instead start the tests inside a docker container using `osrd/scripts/run-front-playwright-container.sh`.
50
-
You may pass the same options and arguments to this script as you would to `yarn e2e-tests` or `yarn playwright test`.
48
+
If you are using a Linux distribution not supported by playwright (which only supports Windows,
49
+
macOS and Ubuntu/Debian), you can instead start the tests inside a docker container using
50
+
`osrd/scripts/run-front-playwright-container.sh`. You may pass the same options and arguments to
51
+
this script as you would to `npm run e2e-tests` or `npx playwright test`.
51
52
52
-
> [!CAUTION] If you try to run `yarn start` instead of running it through docker, you'll notice it
53
-
> doesn't work because the gateway can't access your local port from inside a container. 2
53
+
> [!CAUTION] If you try to run `npm run start` instead of running it through docker, you'll notice
54
+
> it doesn't work because the gateway can't access your local port from inside a container. 2
54
55
> solutions:
55
56
>
56
57
> - run all the components locally (you might keep Postgres and Valkey in containers)
@@ -63,9 +64,9 @@ these videos as artifacts.
63
64
64
65
You may also want to explore the documentation of the test framework
65
66
[Playwright](https://playwright.dev/). For example, try launching each test independently using
66
-
`yarn playwright test --ui`, debug a test with `yarn playwright test --debug`, or launch a specified
67
-
test of a specified test file with a specified browser once with for example
68
-
`yarn playwright test 011-op-times-and-stops-tab.spec.ts -g "should correctly set and display times and stops tables" --project=firefox --retries=0`.
67
+
`npm run playwright test --ui`, debug a test with `npm run playwright test --debug`, or launch a
68
+
specified test of a specified test file with a specified browser once with for example
69
+
`npm run playwright test 011-op-times-and-stops-tab.spec.ts -g "should correctly set and display times and stops tables" --project=firefox --retries=0`.
69
70
70
71
## Design rules
71
72
@@ -106,8 +107,8 @@ organized in folders.
106
107
**The components propose the main JS/TS file and eventually another folder with same name containing
107
108
some minor subcomponents linked to.**
108
109
109
-
- components/
110
-
- views/
110
+
- components/
111
+
- views/
111
112
-[editor/](#infrastructure-editor-editor)
112
113
- components/
113
114
-[opendata/](#opendata-importation-opendata)
@@ -210,8 +211,8 @@ All common code (and shared components) supposed to be in `common/`.
210
211
211
212
- ESLint is used as linter and prettier as formatter. Both are configured as devDependencies to
212
213
enforce default eslint configuration eventually overidden by
213
-
[airbnb rules](https://airbnb.io/javascript/) translation. A few rules (see eslintrc) has
214
-
been disabled and will be re-enabled in the near future):
214
+
[airbnb rules](https://airbnb.io/javascript/) translation. A few rules (see eslintrc) has been
215
+
disabled and will be re-enabled in the near future):
215
216
- 'no-named-as-default': 'off',
216
217
- 'react/jsx-props-no-spreading': 0,
217
218
- 'react/static-property-placement': 0,
@@ -225,7 +226,7 @@ All common code (and shared components) supposed to be in `common/`.
You may also use `npm run lint-fix` to format/lint.
229
230
230
231
## Dependencies
231
232
@@ -252,12 +253,15 @@ You may also use `yarn lint-fix` to format/lint.
252
253
- jsdocs
253
254
254
255
### Updating Dependencies
255
-
When `package.json` changes (new packages or updated versions), developers may have issues running the app with Docker. New packages or versions might not be recognized by Docker.
256
+
257
+
When `package.json` changes (new packages or updated versions), developers may have issues running
258
+
the app with Docker. New packages or versions might not be recognized by Docker.
256
259
257
260
To fix this, follow these steps:
258
261
259
-
1. After pulling new changes, run `yarn install` to update local dependencies.
260
-
2. If issues persist, delete `node_modules` and run `yarn install` again.
261
-
3. Run `docker compose build --no-cache` to rebuild Docker images from scratch with new dependencies.
262
+
1. After pulling new changes, run `npm install` to update local dependencies.
263
+
2. If issues persist, delete `node_modules` and run `npm install` again.
264
+
3. Run `docker compose build --no-cache` to rebuild Docker images from scratch with new
265
+
dependencies.
262
266
263
267
This ensures developers can run the app with the latest dependencies using Docker.
0 commit comments