Closed XanderVertegaal closed 10 months ago
Tests fail because the runner cannot find version.ts
.
The file is there in my codebase, but it has apparently been added to .gitignore
as part of the cookie-cutter set up. Does either of you know what the usual practice is?
Tests fail because the runner cannot find
version.ts
.The file is there in my codebase, but it has apparently been added to
.gitignore
as part of the cookie-cutter set up. Does either of you know what the usual practice is?
I think this should be generated by node build/build-pre.js
, but perhaps it's missing from the cookiecutter template? here's an example from another repo: https://github.com/UUDigitalHumanitieslab/gretel-django/blob/develop/web-ui/package.json#L8
I had the same issue with version.ts not being there. Another problem was that for some reason frontend/package.json
did not contain the run scripts stop
and serve
, so that yarn start
from the root directory did not work. If I add these things manually the application runs fine!
It seems that both problems occur because there are some things missing in frontend/package.json
. Perhaps something went wrong in the cookiecutter? In any case you could try copying the commands from the GrETEL repo that Ben pointed at.
The functional tests are failing because conftest.py
has the wrong value of --base-address
. It should be localhost:4200
instead of localhost:8000
, because in development mode (after running yarn start
) the frontend is programmed to proxy backend requests to the server on port 8000. In production mode it is the other way around. Unfortunately this is not well documented and officially localhost:8000
should work in both development and production mode, but in the current cookiecutter setup it doesn't and that causes some confusion every now and then.
UPDATE: looking further I am not so sure if --base-address should be changed, because in the GitHub actions config file I see that the functional tests are run with production mode settings, so localhost:8000
should be correct (and localhost:4200
will fail because this port is not in use at all in production mode, because the frontend is statically served in that case). I think this is because of problem with the proxy configuration in the backend, that we had more often. Indeed the production mode (yarn start-p
) is broken now, we will have to fix this as soon as we deploy
Perhaps the best to do now is disable the functional tests for now in the CI procedure (by replacing yarn test
with yarn test-back && yarn test-front
on the last line of .github/workflows/test.yml
). As soon as we have production mode working, we can restore it.
Tests run successfully now! 🥳 Thanks for the comments and proposed fixes! I have made a few small changes. Have a look if you agree with them; then I will merge this branch into develop.
ParsePort front-end
Features:
Known issue: