Bluemoon Solutions is a software company tasked with working on an inventory management system, this system allows the users to list, add, edit, and delete inventory items. Your task is to create a react native app that utilises the async storage to store, update, retrieve, and delete data.
- Design is not a requirement but can give extra points.
- Use React Navigation 5 for the navigation.
- Initialise a fresh react native project setup for Typescript.
- Use the Async Sotrage as a data store for the items.
Create a screen that shows the list of items, this should show each item's name, price, and total stock, this will be the home screen displayed when the user launches the app. This should also have a button for adding more items.
Create a screen that shows a form that allows users create new items and add them to the inventory, a user should be able to enter the item's name, total stock, price, and description. All fields should be validated to meet the following.
- Name is required, and must be unique.
- Total stock is required and must be a number.
- Price is required and must be a number.
- Description is required and must have at least three words.
Create a screen that shows a form that allows users edit an existing item in the inventory, a user should be able to edit the item's name, total stock, price, and description. All fields should be validated to meet the following.
- Name is required and must be unique.
- Total stock is required and must be a number.
- Price is required and must be a number.
- Description is required and must have at least three words.
On the edit screen show a button beneath the form that allows users delete the currently viewed item from their inventory, ensure the user confirms the action, before they continue.
- Write tests to create snapshots of each screen.
- Write tests that ensure the confirmation pop up is shown when trying to delete an existing items.
- Write tests to ensure users are taken to the edit screen after tapping on an existing item in the inventory list.
- Write CRUD tests for your async storage operations to ensure Create, Update, Delete, and Get are all called accordingly.
Submit your work with a link to the project on Github.