Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto tests #212

Open
wants to merge 4 commits into
base: backend_dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .github/workflows/auto_pr_backend_dev_to_dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,13 @@ jobs:
with:
source_branch: "backend_dev" # If blank, default: triggered branch
destination_branch: "dev" # If blank, default: master
pr_title: "Weekly auto PR from ${{ github.ref }} into `dev` branch" # Title of pull request
pr_title: "Weekly auto PR from `backend_dev` into `dev` branch" # Title of pull request
pr_body: | # Full markdown support, requires pr_title to be set
:crown: *An automated PR*

Weekly automated PR from `backend_dev` to `dev` branch

_Created by [repo-sync/pull-request](https://github.com/repo-sync/pull-request)_
pr_template: ".github/PULL_REQUEST_TEMPLATE.md" # Path to pull request template, requires pr_title to be set, excludes pr_body
pr_reviewer: "@BatoolMM, @RealRichi3" # Comma-separated list (no spaces)
pr_assignee: "@RealRichi3" # Comma-separated list (no spaces)
pr_label: "auto-pr, backend-dev" # Comma-separated list (no spaces)
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/auto_pr_frontend_dev_to_dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,13 @@ jobs:
with:
source_branch: "frontend_dev" # If blank, default: triggered branch
destination_branch: "dev" # If blank, default: master
pr_title: "Weekly auto PR from ${{ github.ref }} into `dev` branch" # Title of pull request
pr_title: "Weekly auto PR from `frontend_dev` into `dev` branch" # Title of pull request
pr_body: | # Full markdown support, requires pr_title to be set
:crown: *An automated PR*

Weekly automated PR from `frontend_dev` to `dev` branch

_Created by [repo-sync/pull-request](https://github.com/repo-sync/pull-request)_
pr_template: ".github/PULL_REQUEST_TEMPLATE.md" # Path to pull request template, requires pr_title to be set, excludes pr_body
pr_reviewer: "@BatoolMM, @sandygudie" # Comma-separated list (no spaces)
pr_assignee: "@sandygudie" # Comma-separated list (no spaces)
pr_label: "auto-pr, front-end" # Comma-separated list (no spaces)
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/automated_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ jobs:
echo 'testasdfasdfasdf' >> ./.env.test
cat .env.test
pwd
printf "${{ secrets.ENV_TEST}}" >> ./.env.test

- run: printf "${{ secrets.ENV_TEST}}" >> ./.env.test

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
Expand Down
4 changes: 2 additions & 2 deletions API/src/test/auth.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -422,9 +422,9 @@ describe('User Authentication for Signup, Email verification, login and password
}
})

it('should return status code 400 for wrong auth token in request params', async () => {
it('should return status code 401 for wrong auth token in request params', async () => {
/*
Should return 400 for wrong auth token in request params
Should return 401 for wrong auth token in request params

- check statuscode
- check message property in response body
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- `08/02/2023` Add setup/introduction guide to project documentation [#184](https://github.com/Open-Science-Community-Saudi-Arabia/MOOCs/pull/184)
- `08/02/2023` Add Changelog section to project documentation [#189](https://github.com/Open-Science-Community-Saudi-Arabia/MOOCs/pull/189)
- `08/02/2023` Add server setup to render documentation [#190](https://github.com/Open-Science-Community-Saudi-Arabia/MOOCs/pull/190)
- `23/02/2023` Add github action to automate running of tests [#201](https://github.com/Open-Science-Community-Saudi-Arabia/MOOCs/pull/201)
- `24/02/2023` Update tests for `/forgotpassword` and `/resetpassword` routes [#204](https://github.com/Open-Science-Community-Saudi-Arabia/MOOCs/pull/204)

### `Fixed`
- `21/01/2023` Fixed API deployment from returning `cb.apply not a function` error [#168](https://github.com/Open-Science-Community-Saudi-Arabia/MOOCs/pull/168)
- `28/01/2023` Review and fixed bugs in auth API [#181](https://github.com/Open-Science-Community-Saudi-Arabia/MOOCs/pull/181)
- `06/02/2023` Fixed title of schedule PR to match source branch [#188](https://github.com/Open-Science-Community-Saudi-Arabia/MOOCs/pull/188)
- `20/02/2023` Fixed documentation deployment not rendering html docs [#196](https://github.com/Open-Science-Community-Saudi-Arabia/MOOCs/pull/196)
- `23/03/2023` Fixed test suites for `/signup` and `/login` routes [#201](https://github.com/Open-Science-Community-Saudi-Arabia/MOOCs/pull/201)


### `Dependencies`
Expand Down
Loading