@@ -52,10 +52,18 @@ bb integration-test/integration_test.bb http://localhost:3000 --watch --interval
|
||||
| # | Test | Checks |
|
||||
|---|------|--------|
|
||||
| 1 | `GET /` returns 200 | HTTP status code |
|
||||
| 2 | `Content-Type` header | `text/plain` |
|
||||
| 3 | Response body | Contains expected Clojure/Ring content |
|
||||
| 4 | Not HTML | Confirms plain text response |
|
||||
| 2 | `Content-Type` header | `text/html` |
|
||||
| 3 | Response body | The HTML shell: mount point and `/js/main.js` script tag |
|
||||
| 4 | `GET /js/main.js` | 200, JavaScript, non-empty, contains the UI's `/api/add` call |
|
||||
| 5 | `HEAD /` works | HTTP 200 |
|
||||
| 6 | `GET /api/ping` | 200, body `pong` |
|
||||
| 7 | `GET /swagger.json` | 200, JSON, references `/api/ping` |
|
||||
| 8 | `GET /api-docs` | 200, `text/html` |
|
||||
| 9 | `GET /api/add?x=2&y=3` | 200, EDN `{:result 5}` |
|
||||
| 10 | `GET /api/add` with bad params | 400 for a missing or non-numeric param |
|
||||
|
||||
Test 4 needs the compiled UI, which the Docker image includes (`script/integration-test`
|
||||
builds it). Against a locally running server, run `script/ui-build` first.
|
||||
|
||||
## Line Coverage
|
||||
|
||||
|
||||
Reference in New Issue
Block a user