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
Copy file name to clipboardExpand all lines: README.md
+89-17
Original file line number
Diff line number
Diff line change
@@ -4,9 +4,10 @@
4
4
This application allows consumers to search complaints submitted to the CFPB by other consumers.
5
5
6
6
#### Technology Stack
7
+
7
8
This application is written in JavaScript and [Less](http://lesscss.org) within
8
9
the [React](https://facebook.github.io/react/) + [Redux](http://redux.js.org/)
9
-
framework. It uses [Webpack](http://webpack.github.io/docs/) at runtime to
10
+
framework. It uses [Webpack](http://webpack.github.io/docs/) at runtime to
10
11
manage module loading.
11
12
12
13
The code is written with the [ES6](http://es6-features.org/) feature set
@@ -20,6 +21,7 @@ Unit testing of the application is performed within
20
21
[yarn](https://yarnpkg.com/) is used to manage the build/test/deploy cycle.
21
22
22
23
#### Screenshot
24
+
23
25

24
26
25
27
## Dependencies
@@ -48,19 +50,20 @@ Please see the subsection Configuring in [INSTALL](INSTALL.md#configuring)
48
50
#### Developing code
49
51
50
52
###### Prerequisites
53
+
51
54
This application depends on the [Public Complaints API](https://github.com/cfpb/ccdb5-api)
52
55
to be available.
53
56
54
57
For local development, you will need to the following:
55
58
56
-
*[Run consumerfinance.gov locally (which includes the API)](https://github.com/cfpb/consumerfinance.gov#quickstart).
57
-
*[Fill the local Elasticsearch with data](https://github.com/cfpb/ccdb-data-pipeline/blob/main/INSTALL.md).
59
+
-[Run consumerfinance.gov locally (which includes the API)](https://github.com/cfpb/consumerfinance.gov#quickstart).
60
+
-[Fill the local Elasticsearch with data](https://github.com/cfpb/ccdb-data-pipeline/blob/main/INSTALL.md).
58
61
59
-
***Note:*** The Public Complaints API runs as part of consumerfinance.gov, but you can run the API as an independent app:
62
+
**_Note:_** The Public Complaints API runs as part of consumerfinance.gov, but you can run the API as an independent app:
60
63
61
-
* Ensure the consumerfinance.gov python container is stopped with `docker-compose stop python`.
62
-
*[Install the API](https://github.com/cfpb/ccdb5-api#setup--running) and run it with `python manage.py runserver`.
63
-
* Edit [`env.js`](https://github.com/cfpb/ccdb5-ui/blob/main/config/env.js#L104) to point`ccdbApiUrl.dev` to the locally running API (likely at `http://localhost:8000/`).
64
+
- Ensure the consumerfinance.gov python container is stopped with `docker-compose stop python`.
65
+
-[Install the API](https://github.com/cfpb/ccdb5-api#setup--running) and run it with `python manage.py runserver`.
66
+
- Edit [`env.js`](https://github.com/cfpb/ccdb5-ui/blob/main/config/env.js#L104) to point `ccdbApiUrl.dev` to the locally running API (likely at `http://localhost:8000/`).
64
67
65
68
###### Code-Build cycle
66
69
@@ -80,6 +83,7 @@ Enter `Control-C` to exit development mode
80
83
## How to test the software
81
84
82
85
#### Unit testing
86
+
83
87
To launch the JavaScript test runner in interactive watch/test mode:
84
88
85
89
```bash
@@ -100,9 +104,11 @@ Timeouts and the local `baseUrl` are set in cypress.json
100
104
### To run Cypress tests locally
101
105
102
106
- Set your node env to development:
107
+
103
108
```bash
104
109
export NODE_ENV=development
105
110
```
111
+
106
112
You can run the tests in headless mode and just see results, or you can open the Cypress test-runner, which lets you choose tests and watch them run in a Chrome browser. Having the live browser allows you to see page state during tests, and you can open Chrome dev tools to check console errors and network requests.
107
113
108
114
To run local tests and just see results:
@@ -124,6 +130,7 @@ yarn run cypress open --browser chrome
124
130
```
125
131
126
132
### To run against a server
133
+
127
134
You can also run Cypress tests against a server by passing a `baseUrl` config with the path to the server's consumer complaints search page.
128
135
129
136
**Note**: If you run against a server that has Django's `DEBUG=False` setting,
@@ -134,6 +141,70 @@ Our internal DEV servers can be deployed with `DEBUG=True` for running Cypress t
134
141
yarn run cypress run --browser chrome --headless --config baseUrl=https://[DEV SERVER URL]/data-research/consumer-complaints/search/
135
142
```
136
143
144
+
## Release management
145
+
146
+
Ready to publish changes to npm?
147
+
148
+
### Config prep:
149
+
150
+
1. If you don't have a `.env` file,
151
+
copy it from the sample file with `cp .env_SAMPLE .env`.
0 commit comments