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: E-Commerce-API/readme.md
+20Lines changed: 20 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,9 +1,15 @@
1
1
# Project Brief: E-Commerce API
2
2
3
+
You are a developer building an Express application to connect your e-commerce database to a shop front. Your client requires a fully tested API so you will write this application TDD-style: writing the test first and then the code to make the test pass. There is a starter test given to help you, that satisfies the first user story.
4
+
5
+
How will you make this test pass?
6
+
3
7
## User Stories
4
8
5
9
As a developer, I want to add new API endpoints to the NodeJS application for the cyf-ecommerce-api, so that I can improve the functionality of the application.
6
10
11
+
As a developer, I want to build up my API using TDD - writing the test first and then iterating : adding one feature to pass one unit test.
12
+
7
13
- As a user, I want to view a list of all products with their prices and supplier names.
8
14
- As a user, I want to search for products by name.
9
15
- As a user, I want to view a single customer by their ID.
@@ -18,6 +24,11 @@ As a developer, I want to add new API endpoints to the NodeJS application for th
18
24
19
25
## Acceptance Criteria
20
26
27
+
-[ ] Each user story has an accompanying unit test
28
+
-[ ] Secrets are not stored in the codebase
29
+
30
+
<details>
31
+
<summary>Try writing out your own acceptance criteria from the user stories before looking here</summary>
21
32
-[ ] Endpoint `/products` should return a list of all product names with their prices and supplier names.
22
33
-[ ] Endpoint `/products` should filter the list of products by name using a query parameter, even if the parameter is not used.
23
34
-[ ] Endpoint `/customers/:customerId` should load a single customer by their ID.
@@ -29,3 +40,12 @@ As a developer, I want to add new API endpoints to the NodeJS application for th
29
40
-[ ] Endpoint `/orders/:orderId` should delete an existing order and all associated order items.
30
41
-[ ] Endpoint `/customers/:customerId` should delete an existing customer only if the customer doesn't have any orders.
31
42
-[ ] Endpoint `/customers/:customerId/orders` should load all the orders along with the items in the orders of a specific customer. The information returned should include order references, order dates, product names, unit prices, suppliers, and quantities.
43
+
</details>
44
+
45
+
### Sanity check!
46
+
47
+
In this project, you must write the test first.
48
+
49
+
It's better to turn in a smaller set of user stories than to turn in untested features.
50
+
51
+
If you're running out of time, scope down your application rather than commit untested code. Cut your _scope_, not your quality.
0 commit comments