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
+20-11Lines changed: 20 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,23 +4,32 @@ You are a developer building an Express application to connect your e-commerce d
4
4
5
5
How will you make this test pass?
6
6
7
+
## Learning Objectives
8
+
9
+
- Write unit tests for new API endpoints
10
+
- Implement new API endpoints that meet user requirements
11
+
- Practice TDD development workflow
12
+
- Handle errors for invalid data inputs
13
+
- Use Git feature branch workflow
14
+
- Manage secrets in a shared codebase
15
+
7
16
## User Stories
8
17
9
18
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.
10
19
11
20
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
21
13
-
- As a user, I want to view a list of all products with their prices and supplier names.
14
-
- As a user, I want to search for products by name.
15
-
- As a user, I want to view a single customer by their ID.
16
-
- As a user, I want to create a new customer with their name, address, city, and country.
17
-
- As a user, I want to create a new product.
18
-
- As a user, I want to create a new product availability with a price and supplier ID, and get an error if the price is not a positive integer or if either the product or supplier ID does not exist.
19
-
- As a user, I want to create a new order for a customer with an order date and reference number, and get an error if the customer ID is invalid.
20
-
- As a user, I want to update an existing customer's information with their name, address, city, and country.
21
-
- As a user, I want to delete an existing order and all associated order items.
22
-
- As a user, I want to delete an existing customer only if they do not have any orders.
23
-
- As a user, I want to view all orders with their items for a specific customer, including order references, dates, product names, unit prices, suppliers, and quantities.
22
+
1. As a user, I want to view a list of all products with their prices and supplier names.
23
+
1. As a user, I want to search for products by name.
24
+
1. As a user, I want to view a single customer by their ID.
25
+
1. As a user, I want to create a new customer with their name, address, city, and country.
26
+
1. As a user, I want to create a new product.
27
+
1. As a user, I want to create a new product availability with a price and supplier ID, and get an error if the price is not a positive integer or if either the product or supplier ID does not exist.
28
+
1. As a user, I want to create a new order for a customer with an order date and reference number, and get an error if the customer ID is invalid.
29
+
1. As a user, I want to update an existing customer's information with their name, address, city, and country.
30
+
1. As a user, I want to delete an existing order and all associated order items.
31
+
1. As a user, I want to delete an existing customer only if they do not have any orders.
32
+
1. As a user, I want to view all orders with their items for a specific customer, including order references, dates, product names, unit prices, suppliers, and quantities.
0 commit comments