This is my code test work for Patient Zero.
This project is a cheese seller page, so the customer can buy the cheese and put it into a cart then checkout.
React, Redux, Redux-saga, Typescript, Material-UI, Styled Component, Cypress
- Add a dialog for each cheese card, so the user can see the details of each cheese.
- Add a checkout button in the cart slider, so user can send the order to the backend after they click the button
- Add a purchase history dialog if the user click the recent purchase button
- Build UI Test when for #2, the test will automatically add cheeses to the cart and click the checkout button. It will also check the button is disabled if the cart is empty.
- The UI is simple and need to be improved makes it looks better.
- The backend don't have a real database, curretly the orders will be saved in memory.
- The purchase record only save the ID of each cheese, so the user can only see the ID number of the cheese they have purchased before This can be solved if we have a real database, so the cheeses details can be populated by the ID in the database layer.
- The application working fine in Google Chrome but not looks good in other browser.
- The application don't have responsive design.
In the project directory, you can run:
Installs package dependencies (node v14.15.0)
Builds and runs the app in the development mode.
The browser will be automatically launched under http://localhost:9000.
The server backend will start listening on http://localhost:3000
I have 2 test for the purchase button:
- Send order to the backend server successful Check the order is send to the order successfully
- does not allow users to send empty order Check the order cannot be send if it is empty
npm install
npm test