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
Copy file name to clipboardExpand all lines: README.md
+87-9Lines changed: 87 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -192,49 +192,70 @@ The functional tests use a set of selectors that are generated from each of the
192
192
193
193
To run the functional tests first runner needs to be spin up with:
194
194
195
-
`RUNNER_ENV_FILE=.functional-tests.env make run`
195
+
```shell
196
+
RUNNER_ENV_FILE=.functional-tests.env make run
197
+
```
196
198
197
199
This will set the correct environment variables for running the functional tests.
198
200
199
201
Then you can run:
200
202
201
-
`make test-functional`
203
+
```shell
204
+
make test-functional
205
+
```
202
206
203
207
This will delete the `tests/functional/generated_pages` directory and regenerate all the files in it from the schemas.
204
208
205
209
You can also individually run the `generate_pages` and `test_functional` yarn scripts:
206
210
207
-
`yarn generate_pages; yarn test_functional`
211
+
```shell
212
+
yarn generate_pages
213
+
yarn test_functional
214
+
```
215
+
208
216
209
217
To generate the pages manually you can run the `generate_pages` scripts with the schema directory. Run it from the `tests/functional` directory as follows:
Refer to our [profiling document](doc/profiling.md).
412
433
434
+
---
435
+
413
436
## Updating / Installing dependencies
414
437
438
+
### Python
415
439
To add a new dependency, use `pipenv install [package-name]`, which not only installs the package but Pipenv will also go to the trouble of updating the Pipfile as well.
416
440
417
441
NB: both the Pipfile and Pipfile.lock files are required in source control to accurately pin dependencies.
442
+
443
+
### JavaScript
444
+
To add a new dependency, use `yarn add [package-name]` and `yarn` to install all the packages locally.
445
+
446
+
---
447
+
448
+
## Testing Design System changes (locally) without pushing to actual CDN
449
+
450
+
### On [Design System](https://github.com/ONSdigital/design-system) Repo
451
+
Checkout branch with new changes on
452
+
453
+
You will need to install the Design System dependencies to do this so run `yarn` in the terminal if you haven't
454
+
You will also need to install gulp
455
+
456
+
Then in the terminal run:
457
+
458
+
```shell
459
+
yarn cdn-bundle
460
+
cd build
461
+
browser-sync start --cwd -s --http --port 5678
462
+
```
463
+
464
+
You should now see output indicating that files are being served from `localhost:5678`. So main.css for example will now be served on `http://localhost:5678//css/main.css`
465
+
466
+
Now switch to the eQ Questionnaire Runner Repo
467
+
468
+
### On eQ Questionnaire Runner Repo
469
+
In a separate terminal window/tab:
470
+
Checkout the runner branch you want to test on
471
+
472
+
Edit your .development.env with following:
473
+
474
+
```shell
475
+
CDN_URL=http://localhost:5678
476
+
CDN_ASSETS_PATH=
477
+
```
478
+
479
+
Edit the Makefile to remove `load-design-system-templates` from the build command. Should now look like this:
480
+
481
+
```shell
482
+
build: load-schemas translate
483
+
```
484
+
485
+
Run `make load-design-system-templates` in the terminal to make sure you have the Design System templates loaded
486
+
487
+
Then edit the first line in the `templates/layout/_template.njk` file to remove the version number. Should now look like this:
488
+
489
+
```shell
490
+
{% set release_version = "" %}
491
+
```
492
+
493
+
Then spin up launcher and runner with `make dev-compose-up` and `make run`
494
+
495
+
Now when navigating to localhost:8000 and launching a schema, this will now be using the local cdn with the changes from the Design System branch
0 commit comments