This application is not to be deployed to any publicly available address on behalf of the contributors.
It is nothing more than a proof of concept completed in the context of a project-based course.
The contributors are not responsible or liable for the use of this software.
Nathaniel Caron
Carter James MacLennan
Joao Viana Rocha Pontes
Sahil Saini
Frederic Verret
git fetch
git checkout -b <new_branch_name> origin/dev
git push -u origin HEAD
- Replace
<new_branch_name>
with the name of your branch. Your branch name should include the ticket number (e.g.,DBO-4
) along with optional descriptive words (e.g.,DBO-5-refactor-authentication
,DBO-8-user-content-cache-key
,DBO-15-make-retina-avatars
) so that others can see what is being worked on. push -u
is an easy way to push the branch to the remote repository and get the "upstream tracking" set up correctly.- Remember to move the Trello card to "In progress".
- Remember to commit & push often as you make changes and work on the feature.
- Before pushing changes to the repo, make sure you run the unit tests & code linting and fix any issues:
npm run test npm run lint
Remember that both backend & frontend have their own tests & lint settings so if you modify both you should run these commands in both directories.
- If others are also working on the same branch as you, you might need to pull their changes using
git pull
(orgit pull --rebase
). - If other PRs are merged into
dev
before yours, you will need to pull the new changes fromdev
usinggit pull origin dev
.
Go to our repository page, select your branch, then select "Compare & pull request".
- Make sure the base branch is
dev
(this means your work will be merged intodev
). - Add a title (what feature did you work on?), and a description if you have details to add.
- If your code is ready for review, click "Create Pull Request". If you are not done working on it, use the dropdown and select "Create Draft Pull Request" (once you are done, you can mark it as ready for review).
- Remember to move the Trello card to "In PR"
- Wait for at least 1 dev review (another dev does an overview of your code to make sure there are no major issues/things missing). After at least 1 dev review, you can move the Trello card to "Ready for test".
- The designated tester will pull the branch locally, run all automated tests, do some manual testing to verify the functionality, and record the testing results in a comment on the PR. (the tester will add themselves to the Trello card and move the card to "In Test" so we know who is doing it)
- If tester found issues, they will tell the developer (Trello card moves back to "In progress" until issue is fixes, then the review process restarts).
- If tester has not found issues, they will approve the request & merge it into
dev
.
- Once merged, move the Trello card to "Done"
- Good job!
When setting up your environment for the first time I recommend installing npm-merge-driver
. This will auto-resolve any conflicts that happen in the package-lock.json file when merging with someone else's changes (those conflicts are a pain to do manually). Just run this command once you have installed node.js
on your computer: (The --global
will install it globally for your computer so you will have it for all projects)
npx npm-merge-driver install --global
- Note: If there are also conflicts in
package.json
, you will have to solve those manually. Once you have fixed it, runnpm install --package-lock-only
to fix thepackage-lock.json
accordingly. - Source: https://npm.community/t/dealing-with-package-lock-json-conflicts/902
To run the Express service locally, use the following commands inside of the Service directory:
npm install
npm run dev
To run the service using pm2, use the following commands inside of the Service directory:
npm install
pm2 start app.js
To kill the process run by pm2, use the following command inside of the Service directory:
pm2 stop app.js
pm2 must be installed globally in order to use the above commands:
npm install pm2 -g
To run the React app locally in development mode, use the following command inside of the application directory:
npm start
Open http://localhost:3000 to view it in the browser.
The page will reload if you make edits.
You will also see any lint errors in the console.
npm test
Launches the test runner in the interactive watch mode.
npm run build
Builds the app for production to the build
folder.
To run all the unit test use the following command:
npm run test
To run jest covearge for the entier product run the following command:
npm run test:coverage
To see the unit test changes in real time, and to automatically run the tests when the files are changed use the follwoing command:
npm run test:watch
All API feature files can be run using the following maven command inside of the automation directory:
mvn test -Dtest=ServiceTests -Dkarate.env="dev"
All UI feature files can be run using the following maven command inside of the automation directory:
mvn test -Dtest=UiTests -Dkarate.env="dev"
Feature files can be run individually in Intellij IDEA by right-clicking on the feature and selecting the green play button (a run configureation is required).
Tests results reports can be found here:
Automation/target/karate-reports/
All API feature files should be placed in the api
directory.
All UI feature files should be placed in the ui
directory.
All UI feature files should have the @ui
tag at the top of the file.