Skip to content

Commit

Permalink
BC 4742 add env template (#136)
Browse files Browse the repository at this point in the history
  • Loading branch information
UzaeirKhan authored Aug 24, 2023
1 parent 7f8e6d2 commit 41b3ba7
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 6 deletions.
13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,26 +9,27 @@ Frameworks:
### Prepare development environment

Install or make sure Chrome browser (at least) have it in your development machine

1) Install [Node v18](https://nodejs.org/dist/)
2) Install [Git](https://git-scm.com/downloads)
3) Install [Github Desktop App](https://desktop.github.com/) (Optional)
3) Install IDE of your choice e.g. [VS code](https://code.visualstudio.com/download)
4) Install VS code extensions:
4) Install IDE of your choice e.g. [VS code](https://code.visualstudio.com/download)
5) Install VS code extensions:
- [Cucumber (Gherkin) Full Support](https://marketplace.visualstudio.com/items?itemName=alexkrechik.cucumberautocomplete)
- [EditorConfig](https://marketplace.visualstudio.com/items?itemName=EditorConfig.EditorConfig)
- [EditorConfig](https://marketplace.visualstudio.com/items?itemName=EditorConfig.EditorConfig)

### How to setup/run Cypress tests locally

1) Clone the project
2) Add `cypress.env.json` in the root folder with credentials and environment settings.
2) Rename [`cypress.env.template.json`](/cypress.env.template.json) to `cypress.env.json` in the root folder with credentials available in 1Password.
3) Execute the following command in terminal `npm install` or `npm i` for installing the required packages
4) Execute the following command in terminal to run the tests in Cypress runner (UI) `npm run cy:open`
5) Execute the following command in terminal to run the tests in headless mode `npm run cy:run`
6) For running specific scenario: Run `npm run tag:only` and set tag `@only` above the scenario you want to run

### Framework Structure

```
```text
(root)
|
|---- .github (containing github workflows)
Expand All @@ -55,7 +56,7 @@ Install or make sure Chrome browser (at least) have it in your development machi
|---- .gitattributes
|---- .gitignore
|---- reporter.js (for generating html reports)
|---- cypress.env.json (credentials & environment variables)
|---- cypress.env.template.json (credentials & environment variables - rename the file as mentioned above)
|---- cypress.config.json (cypress related settings)
|---- LICENSE
|---- package-lock.json
Expand Down
26 changes: 26 additions & 0 deletions cypress.env.template.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"BRB": "",
"NBC": "",
"DEFAULT": "",
"TEACHER_1_EMAIL": "",
"TEACHER_1_PASSWORD": "",
"TEACHER_1_FIRST_NAME": "",
"TEACHER_1_LAST_NAME": "",
"TEACHER_2_EMAIL": "",
"TEACHER_2_PASSWORD": "",
"TEACHER_2_FIRST_NAME": "",
"TEACHER_2_LAST_NAME": "",
"STUDENT_1_EMAIL": "",
"STUDENT_1_PASSWORD": "",
"STUDENT_2_EMAIL": "",
"STUDENT_2_PASSWORD": "",
"ADMIN_1_EMAIL": "",
"ADMIN_1_PASSWORD": "",
"EXPERT_1_EMAIL": "",
"EXPERT_1_PASSWORD": "",
"STUDENT_EXTERN": "",
"STUDENT_EXTERN_PASSWORD": "",
"STUDENT_PASSWORD_CHANGE_EMAIL": "",
"STUDENT_PASSWORD_CHANGE_OLD_PWD": "",
"STUDENT_PASSWORD_CHANGE_NEW_PWD": ""
}

0 comments on commit 41b3ba7

Please sign in to comment.