Page History
...
Based on the setup above, here's how to test a new User Interface / Frontend Pull Request in the "dspace-angular" project: https://github.com/DSpace/dspace-angular/pulls
First, if your Frontend is currently running in Docker, let's stop itThese test instructions assume you are already running both the Frontend & Backend. If not, follow the instructions above, and then start them both:
Code Block # MoveStart into your "dspace-angular" directory where the frontend code is cd dspace-angularbackend cd DSpace docker-compose -p d7 up -d # Shutdown yourStart frontend Docker containers (Note: your backend will still be running. That's OK) cd ../dspace-angular docker-compose -p d7 -f docker/docker-compose.yml downup -d
Move into the directory where your Frontend code is:
Code Block cd dspace-angular
Find the number of the Pull Request you want to test (it'll be the "#[number]" displayed after the PR name, or the end of the PR's URL). Checkout the code from that PR using it's number:
Code Block # This would checkout https://github.com/DSpace/dspace-angular/pull/1383 for testing gh pr checkout 1383
Now, rebuild & restart your frontend based on that PR's code:
Code Block docker-compose -p d7 -f docker/docker-compose.yml build
Once it's done, restart the frontend:
Code Block up -d --build # Even after the build completes, it make take a few minutes for the frontend to restart # You can check the status using "logs -f" docker-compose -p d7 -f docker/docker-compose.yml uplogs -df # (Click Ctrl+C to exit logs view)
- Now test the User Interface to see if the changes made in that PR look to work properly. The PR's description should describe how to test it and what you should see.
- If you notice any odd behavior, check for errors in the UI using your browser's DevTools. See Troubleshoot an error#FindingtheErrorMessageintheUserInterface
- Based on what you find, add a comment to the PR. If it works, congratulate the developer. If it doesn't, let them know the error you saw (and what you clicked on when that error occurred).
...
Some frontend bugs or features also require backend changes. Here's how to install those backend PR changes. Yes, you can even test a backend PR and frontend PR at the same time by following the instructions in both "Testing a Frontend PR" and "Testing a Backend PR".
First, if your Backend is currently running in Docker, let's stop itThese test instructions assume you are already running both the Frontend & Backend. If not, follow the instructions above, and then start them both:
Code Block # Move into your "DSpace" directory where theStart backend code is cd DSpace # Shutdown your backend Docker containers (Note: your frontend will still be running. That's OK)docker-compose -p d7 up -d # Start frontend cd ../dspace-angular docker-compose -p d7 down -f docker/docker-compose.yml up -d
First, move into the directory where your Backend code is
Code Block cd DSpace
Find the number of the Pull Request you want to test (it'll be the "#[number]" displayed after the PR name, or the end of the PR's URL). Checkout the code from that PR using it's number:
Code Block # This would checkout https://github.com/DSpace/DSpace/pull/8007 for testing gh pr checkout 8007
Now, rebuild & restart your backend based on that PR's code:
Code Block docker-compose -f docker-compose.ymlp d7 up -fd docker-compose-cli.yml build
Once it's done, restart the backend:
Code Block -build # Even after the build completes, it make take a few minutes for the backend to restart # You can check the status using "logs -f" docker-compose -p d7 uplogs -df # (Click Ctrl+C to exit logs view)
- Now test the User Interface to see if the changes made in that PR look to work properly. If there was a corresponding UI PR, make sure you also follow the instructions in "Testing a Frontend PR" to install that PR as well.
- If you notice any odd behavior, check for errors in the UI using your browser's DevTools. See Troubleshoot an error#FindingtheErrorMessageintheUserInterface
- Based on what you find, add a comment to the PR. If it works, congratulate the developer. If it doesn't, let them know the error you saw (and what you clicked on when that error occurred).
Other Tips
Need to shutdown everything?
Code Block |
---|
# From either the "DSpace" or "dspace-angular" folder
docker-compose -p d7 down |
Need to revert back to the "main" codebase (i.e. uninstall the PR code)?
Code Block |
---|
# Checkout the main code git checkout main # Pull down any latest changes git pull # Rebuild/restart the frontend or backend # For frontend: docker-compose -p d7 -f docker/docker-compose.yml up -d --build # For backend: docker-compose -p d7 up -d --build |