You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Go to https://console.aws.amazon.com/ and login. Choose S3 from Service folder and click `Create bucket`. Following the instruction to create S3 bucket.
@@ -74,6 +86,7 @@ Go to `mock-api` folder and run command `npm run start` to start the mock-api li
74
86
3. Seed/Insert data to tables: `npm run seed-tables`
75
87
4. Initialize/Clear database in default environment: `npm run init-db`
76
88
5. View table data in default environment: `npm run view-data <ModelName>`, ModelName can be `Challenge`, `ChallengeType`, `ChallengeSetting`, `AuditLog`, `Phase`, `TimelineTemplate`or `Attachment`
89
+
6. Create Elasticsearch index: `npm run init-db`, or to re-create index: `npm run init-db force`
77
90
78
91
### Notes
79
92
- The seed data are located in `src/scripts/seed`
@@ -83,12 +96,48 @@ Go to `mock-api` folder and run command `npm run start` to start the mock-api li
83
96
- Install dependencies `npm install`
84
97
- Run lint `npm run lint`
85
98
- Run lint fix `npm run lint:fix`
99
+
- initialize Elasticsearch, create configured Elasticsearch index if not present: `npm run init-es`,
100
+
or re-create the index: `npm run init-es force`
86
101
- Create tables `npm run create-tables`
87
102
- Clear and init db `npm run init-db`
88
103
- Start app `npm start`
89
104
- App is running at `http://localhost:3000`
90
105
- Start mock-api, go to `mock-api` folder and `npm start`, mock api is running at `http://localhost:4000`
91
106
107
+
## Running tests
108
+
109
+
Before running tests, DynamoDB tables should be created, ES index should be initialized, mock API should be started and
110
+
various config parameters are properly set.
111
+
Seeding db data is not needed.
112
+
113
+
### Running unit tests
114
+
115
+
To run unit tests alone
116
+
117
+
```bash
118
+
npm run test
119
+
```
120
+
121
+
To run unit tests with coverage report
122
+
123
+
```bash
124
+
npm run test:cov
125
+
```
126
+
127
+
### Running integration tests
128
+
129
+
To run integration tests alone
130
+
131
+
```bash
132
+
npm run e2e
133
+
```
134
+
135
+
To run integration tests with coverage report
136
+
137
+
```bash
138
+
npm run e2e:cov
139
+
```
140
+
92
141
## Verification
93
142
Refer to the verification document `Verification.md`
0 commit comments